Message ID | 20230210163744.32182-6-philmd@linaro.org |
---|---|
State | New |
Headers | show |
Series | hw/isa: More housekeeping | expand |
On 2/10/23 06:37, Philippe Mathieu-Daudé wrote: > The following code: > > /* ISA devices */ > i8259 = i8259_init(isa_bus, ...); > > gives the false idea that the function is creating a i8259 > device. Instead this function returns an array of input IRQs. > Rename the variable to clarify: > > /* ISA devices */ > isa_irqs_in = i8259_init(isa_bus, ...); > > Signed-off-by: Philippe Mathieu-Daudé<philmd@linaro.org> > --- > hw/mips/jazz.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) Reviewed-by: Richard Henderson <richard.henderson@linaro.org> r~
diff --git a/hw/mips/jazz.c b/hw/mips/jazz.c index 6aefe9a61b..fc7898006c 100644 --- a/hw/mips/jazz.c +++ b/hw/mips/jazz.c @@ -130,7 +130,7 @@ static void mips_jazz_init(MachineState *machine, MIPSCPU *cpu; MIPSCPUClass *mcc; CPUMIPSState *env; - qemu_irq *i8259; + qemu_irq *isa_irqs_in; rc4030_dma *dmas; IOMMUMemoryRegion *rc4030_dma_mr; MemoryRegion *isa_mem = g_new(MemoryRegion, 1); @@ -248,8 +248,8 @@ static void mips_jazz_init(MachineState *machine, isa_bus = isa_bus_new(NULL, isa_mem, isa_io, &error_abort); /* ISA devices */ - i8259 = i8259_init(isa_bus, env->irq[4]); - isa_bus_irqs(isa_bus, i8259); + isa_irqs_in = i8259_init(isa_bus, env->irq[4]); + isa_bus_irqs(isa_bus, isa_irqs_in); i8257_dma_init(isa_bus, 0); pit = i8254_pit_init(isa_bus, 0x40, 0, NULL); pcspk_init(isa_new(TYPE_PC_SPEAKER), isa_bus, pit);
The following code: /* ISA devices */ i8259 = i8259_init(isa_bus, ...); gives the false idea that the function is creating a i8259 device. Instead this function returns an array of input IRQs. Rename the variable to clarify: /* ISA devices */ isa_irqs_in = i8259_init(isa_bus, ...); Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> --- hw/mips/jazz.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)