All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Cédric Le Goater" <clg@kaod.org>
To: David Gibson <david@gibson.dropbear.id.au>, Greg Kurz <groug@kaod.org>
Cc: qemu-ppc@nongnu.org, qemu-devel@nongnu.org,
	"Cédric Le Goater" <clg@kaod.org>
Subject: [PATCH 4/8] ppc/pnv: Remove useless variable
Date: Wed, 1 Sep 2021 11:41:49 +0200	[thread overview]
Message-ID: <20210901094153.227671-5-clg@kaod.org> (raw)
In-Reply-To: <20210901094153.227671-1-clg@kaod.org>

Signed-off-by: Cédric Le Goater <clg@kaod.org>
---
 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 2f5358b70c95..a62e90b15e27 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



  parent reply	other threads:[~2021-09-01  9:43 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-01  9:41 [PATCH 0/8] ppc: cleanups Cédric Le Goater
2021-09-01  9:41 ` [PATCH 1/8] docs/system: ppc: Update the URL for OpenPOWER firmware images Cédric Le Goater
2021-09-01 10:10   ` Greg Kurz
2021-09-01 11:25     ` Cédric Le Goater
2021-09-01  9:41 ` [PATCH 2/8] ppc/spapr: Add a POWER10 DD2 CPU Cédric Le Goater
2021-09-01 10:11   ` Greg Kurz
2021-09-02  1:34   ` David Gibson
2021-09-01  9:41 ` [PATCH 3/8] ppc/pnv: Add a comment on the "primary-topology-index" property Cédric Le Goater
2021-09-02  1:36   ` David Gibson
2021-09-01  9:41 ` Cédric Le Goater [this message]
2021-09-02  1:36   ` [PATCH 4/8] ppc/pnv: Remove useless variable David Gibson
2021-09-01  9:41 ` [PATCH 5/8] ppc/pnv: Add an assert when calculating the RAM distribution on chips Cédric Le Goater
2021-09-02  1:37   ` David Gibson
2021-09-02  6:28     ` Cédric Le Goater
2021-09-02  6:33       ` David Gibson
2021-09-01  9:41 ` [PATCH 6/8] ppc/xive: Export priority_to_ipb() helper Cédric Le Goater
2021-09-02  1:38   ` David Gibson
2021-09-01  9:41 ` [PATCH 7/8] ppc/xive: Export xive_tctx_word2() helper Cédric Le Goater
2021-09-02  1:38   ` David Gibson
2021-09-01  9:41 ` [PATCH 8/8] ppc/pnv: Rename "id" to "quad-id" in PnvQuad Cédric Le Goater
2021-09-02  1:39   ` David Gibson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210901094153.227671-5-clg@kaod.org \
    --to=clg@kaod.org \
    --cc=david@gibson.dropbear.id.au \
    --cc=groug@kaod.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.