[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 07/44] ppc/pnv: Remove useless variable
From: |
David Gibson |
Subject: |
[PULL 07/44] ppc/pnv: Remove useless variable |
Date: |
Thu, 30 Sep 2021 15:43:49 +1000 |
From: Cédric Le Goater <clg@kaod.org>
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>
---
hw/ppc/pnv.c | 7 +++----
1 file 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,
--
2.31.1
- [PULL 00/44] ppc-for-6.2 queue 20210930, David Gibson, 2021/09/30
- [PULL 01/44] host-utils: Fix overflow detection in divu128(), David Gibson, 2021/09/30
- [PULL 05/44] ppc/spapr: Add a POWER10 DD2 CPU, David Gibson, 2021/09/30
- [PULL 11/44] docs/system: ppc: Update the URL for OpenPOWER firmware images, David Gibson, 2021/09/30
- [PULL 04/44] i386/kvm: Replace abs64() with uabs64() from host-utils, David Gibson, 2021/09/30
- [PULL 10/44] ppc/pnv: Rename "id" to "quad-id" in PnvQuad, David Gibson, 2021/09/30
- [PULL 06/44] ppc/pnv: Add a comment on the "primary-topology-index" property, David Gibson, 2021/09/30
- [PULL 02/44] host-utils: fix missing zero-extension in divs128, David Gibson, 2021/09/30
- [PULL 07/44] ppc/pnv: Remove useless variable,
David Gibson <=
- [PULL 14/44] memory_hotplug.c: handle dev->id = NULL in acpi_memory_hotplug_write(), David Gibson, 2021/09/30
- [PULL 16/44] spapr_drc.c: do not error_report() when drc->dev->id == NULL, David Gibson, 2021/09/30
- [PULL 03/44] host-utils: introduce uabs64(), David Gibson, 2021/09/30
- [PULL 12/44] ppc/pnv: Add an assert when calculating the RAM distribution on chips, David Gibson, 2021/09/30
- [PULL 13/44] target/ppc: fix setting of CR flags in bcdcfsq, David Gibson, 2021/09/30
- [PULL 18/44] qapi/qdev.json: add DEVICE_UNPLUG_GUEST_ERROR QAPI event, David Gibson, 2021/09/30
- [PULL 20/44] memory_hotplug.c: send DEVICE_UNPLUG_GUEST_ERROR in acpi_memory_hotplug_write(), David Gibson, 2021/09/30
- [PULL 09/44] ppc/xive: Export xive_tctx_word2() helper, David Gibson, 2021/09/30
- [PULL 15/44] spapr.c: handle dev->id in spapr_memory_unplug_rollback(), David Gibson, 2021/09/30
- [PULL 19/44] spapr: use DEVICE_UNPLUG_GUEST_ERROR to report unplug errors, David Gibson, 2021/09/30