mirror of https://github.com/xemu-project/xemu.git
hw/arm/allwinner: Clean up local variable shadowing
Fix: hw/arm/allwinner-r40.c:412:14: error: declaration shadows a local variable [-Werror,-Wshadow] for (int i = 0; i < AW_R40_NUM_MMCS; i++) { ^ hw/arm/allwinner-r40.c:299:14: note: previous declaration is here unsigned i; ^ Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Message-ID: <20230904161235.84651-10-philmd@linaro.org> Signed-off-by: Markus Armbruster <armbru@redhat.com>
This commit is contained in:
parent
c7f14e4898
commit
2f6037a235
|
@ -296,10 +296,9 @@ static void allwinner_r40_realize(DeviceState *dev, Error **errp)
|
||||||
{
|
{
|
||||||
const char *r40_nic_models[] = { "gmac", "emac", NULL };
|
const char *r40_nic_models[] = { "gmac", "emac", NULL };
|
||||||
AwR40State *s = AW_R40(dev);
|
AwR40State *s = AW_R40(dev);
|
||||||
unsigned i;
|
|
||||||
|
|
||||||
/* CPUs */
|
/* CPUs */
|
||||||
for (i = 0; i < AW_R40_NUM_CPUS; i++) {
|
for (unsigned i = 0; i < AW_R40_NUM_CPUS; i++) {
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Disable secondary CPUs. Guest EL3 firmware will start
|
* Disable secondary CPUs. Guest EL3 firmware will start
|
||||||
|
@ -335,7 +334,7 @@ static void allwinner_r40_realize(DeviceState *dev, Error **errp)
|
||||||
* maintenance interrupt signal to the appropriate GIC PPI inputs,
|
* maintenance interrupt signal to the appropriate GIC PPI inputs,
|
||||||
* and the GIC's IRQ/FIQ/VIRQ/VFIQ interrupt outputs to the CPU's inputs.
|
* and the GIC's IRQ/FIQ/VIRQ/VFIQ interrupt outputs to the CPU's inputs.
|
||||||
*/
|
*/
|
||||||
for (i = 0; i < AW_R40_NUM_CPUS; i++) {
|
for (unsigned i = 0; i < AW_R40_NUM_CPUS; i++) {
|
||||||
DeviceState *cpudev = DEVICE(&s->cpus[i]);
|
DeviceState *cpudev = DEVICE(&s->cpus[i]);
|
||||||
int ppibase = AW_R40_GIC_NUM_SPI + i * GIC_INTERNAL + GIC_NR_SGIS;
|
int ppibase = AW_R40_GIC_NUM_SPI + i * GIC_INTERNAL + GIC_NR_SGIS;
|
||||||
int irq;
|
int irq;
|
||||||
|
@ -494,7 +493,7 @@ static void allwinner_r40_realize(DeviceState *dev, Error **errp)
|
||||||
qdev_get_gpio_in(DEVICE(&s->gic), AW_R40_GIC_SPI_EMAC));
|
qdev_get_gpio_in(DEVICE(&s->gic), AW_R40_GIC_SPI_EMAC));
|
||||||
|
|
||||||
/* Unimplemented devices */
|
/* Unimplemented devices */
|
||||||
for (i = 0; i < ARRAY_SIZE(r40_unimplemented); i++) {
|
for (unsigned i = 0; i < ARRAY_SIZE(r40_unimplemented); i++) {
|
||||||
create_unimplemented_device(r40_unimplemented[i].device_name,
|
create_unimplemented_device(r40_unimplemented[i].device_name,
|
||||||
r40_unimplemented[i].base,
|
r40_unimplemented[i].base,
|
||||||
r40_unimplemented[i].size);
|
r40_unimplemented[i].size);
|
||||||
|
|
Loading…
Reference in New Issue