All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Henrique Barboza <danielhb413@gmail.com>
To: qemu-devel@nongnu.org
Cc: qemu-ppc@nongnu.org, danielhb413@gmail.com,
	peter.maydell@linaro.org, "Bernhard Beschow" <shentey@gmail.com>,
	"Cédric Le Goater" <clg@kaod.org>
Subject: [PULL 12/15] hw/ppc/e500: Resolve variable shadowing
Date: Tue, 20 Dec 2022 10:52:48 -0300	[thread overview]
Message-ID: <20221220135251.155176-13-danielhb413@gmail.com> (raw)
In-Reply-To: <20221220135251.155176-1-danielhb413@gmail.com>

From: Bernhard Beschow <shentey@gmail.com>

Assign to the outer variable instead which even saves some code.

Signed-off-by: Bernhard Beschow <shentey@gmail.com>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Message-Id: <20221216145709.271940-6-shentey@gmail.com>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
---
 hw/ppc/e500.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/hw/ppc/e500.c b/hw/ppc/e500.c
index 53876af866..fee14ff8b3 100644
--- a/hw/ppc/e500.c
+++ b/hw/ppc/e500.c
@@ -908,7 +908,7 @@ void ppce500_init(MachineState *machine)
     bool kernel_as_payload;
     hwaddr bios_entry = 0;
     target_long payload_size;
-    struct boot_info *boot_info;
+    struct boot_info *boot_info = NULL;
     int dt_size;
     int i;
     unsigned int smp_cpus = machine->smp.cpus;
@@ -963,7 +963,6 @@ void ppce500_init(MachineState *machine)
         /* Register reset handler */
         if (!i) {
             /* Primary CPU */
-            struct boot_info *boot_info;
             boot_info = g_new0(struct boot_info, 1);
             qemu_register_reset(ppce500_cpu_reset, cpu);
             env->load_info = boot_info;
@@ -1263,7 +1262,6 @@ void ppce500_init(MachineState *machine)
     }
     assert(dt_size < DTB_MAX_SIZE);
 
-    boot_info = env->load_info;
     boot_info->entry = bios_entry;
     boot_info->dt_base = dt_base;
     boot_info->dt_size = dt_size;
-- 
2.38.1



  parent reply	other threads:[~2022-12-20 13:54 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-20 13:52 [PULL 00/15] ppc queue Daniel Henrique Barboza
2022-12-20 13:52 ` [PULL 01/15] MAINTAINERS: downgrade PPC KVM/TCG CPUs and pSeries to 'Odd Fixes' Daniel Henrique Barboza
2022-12-20 13:52 ` [PULL 02/15] hw/sd/sdhci: MMIO region is implemented in 32-bit accesses Daniel Henrique Barboza
2022-12-20 13:52 ` [PULL 03/15] hw/sd/sdhci: Support big endian SD host controller interfaces Daniel Henrique Barboza
2022-12-20 13:52 ` [PULL 04/15] hw/ppc/e500: Add Freescale eSDHC to e500plat Daniel Henrique Barboza
2022-12-20 13:52 ` [PULL 05/15] target/ppc/kvm: Add missing "cpu.h" and "exec/hwaddr.h" Daniel Henrique Barboza
2022-12-20 13:52 ` [PULL 06/15] hw/ppc/vof: Do not include the full "cpu.h" Daniel Henrique Barboza
2022-12-20 13:52 ` [PULL 07/15] hw/ppc/spapr: Reduce "vof.h" inclusion Daniel Henrique Barboza
2022-12-20 13:52 ` [PULL 08/15] target/ppc/mmu_common: Log which effective address had no TLB entry found Daniel Henrique Barboza
2022-12-20 13:52 ` [PULL 09/15] target/ppc/mmu_common: Fix table layout of "info tlb" HMP command Daniel Henrique Barboza
2022-12-20 13:52 ` [PULL 10/15] hw/ppc/virtex_ml507: Prefer local over global variable Daniel Henrique Barboza
2022-12-20 13:52 ` [PULL 11/15] hw/ppc/e500: Prefer local variable over qdev_get_machine() Daniel Henrique Barboza
2022-12-20 13:52 ` Daniel Henrique Barboza [this message]
2022-12-20 13:52 ` [PULL 13/15] hw/ppc/e500: Move comment to more appropriate place Daniel Henrique Barboza
2022-12-20 13:52 ` [PULL 14/15] target/ppc: Implement the DEXCR and HDEXCR Daniel Henrique Barboza
2022-12-20 13:52 ` [PULL 15/15] target/ppc: Check DEXCR on hash{st, chk} instructions Daniel Henrique Barboza
2022-12-20 21:34 ` [PULL 00/15] ppc queue Peter Maydell
2022-12-20 22:13   ` Philippe Mathieu-Daudé
2022-12-21 10:25     ` Daniel Henrique Barboza

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=20221220135251.155176-13-danielhb413@gmail.com \
    --to=danielhb413@gmail.com \
    --cc=clg@kaod.org \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    --cc=shentey@gmail.com \
    /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.