diff options
author | Cédric Le Goater <clg@kaod.org> | 2021-09-01 11:41:49 +0200 |
---|---|---|
committer | David Gibson <david@gibson.dropbear.id.au> | 2021-09-29 19:37:38 +1000 |
commit | 0e5e9ff455dc529ee9e3c485d4543cdcaa04ab8b (patch) | |
tree | 13025cad5d0fdd0ac1d788c0a7281b26f470cfc7 /hw/ppc/pnv.c | |
parent | 40ef88ba77ac84baab3a78171a49829a6cd1d3e0 (diff) |
ppc/pnv: Remove useless variable
Signed-off-by: Cédric Le Goater <clg@kaod.org>
Message-Id: <20210901094153.227671-5-clg@kaod.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'hw/ppc/pnv.c')
-rw-r--r-- | hw/ppc/pnv.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/hw/ppc/pnv.c b/hw/ppc/pnv.c index 2f5358b70c..a62e90b15e 100644 --- a/hw/ppc/pnv.c +++ b/hw/ppc/pnv.c @@ -838,8 +838,7 @@ static void pnv_init(MachineState *machine) for (i = 0; i < pnv->num_chips; i++) { char chip_name[32]; Object *chip = OBJECT(qdev_new(chip_typename)); - int chip_id = i; - uint64_t chip_ram_size = pnv_chip_get_ram_size(pnv, chip_id); + uint64_t chip_ram_size = pnv_chip_get_ram_size(pnv, i); pnv->chips[i] = PNV_CHIP(chip); @@ -850,9 +849,9 @@ static void pnv_init(MachineState *machine) &error_fatal); chip_ram_start += chip_ram_size; - snprintf(chip_name, sizeof(chip_name), "chip[%d]", chip_id); + snprintf(chip_name, sizeof(chip_name), "chip[%d]", i); object_property_add_child(OBJECT(pnv), chip_name, chip); - object_property_set_int(chip, "chip-id", chip_id, &error_fatal); + object_property_set_int(chip, "chip-id", i, &error_fatal); object_property_set_int(chip, "nr-cores", machine->smp.cores, &error_fatal); object_property_set_int(chip, "nr-threads", machine->smp.threads, |