Message ID | 20250429132200.605611-2-peter.maydell@linaro.org |
---|---|
State | New |
Headers | show |
Series | target/arm: Remove TYPE_AARCH64_CPU class | expand |
On 29/4/25 15:21, Peter Maydell wrote: > We're about to make a change that removes the only other use > of the 'cpu' local variable in mb_cpu_initfn(); since the > DEVICE() casts work fine with the Object*, use that instead, > so that we can remove the local variable when we make the > following change. > > Signed-off-by: Peter Maydell <peter.maydell@linaro.org> > --- > target/microblaze/cpu.c | 10 +++++----- > 1 file changed, 5 insertions(+), 5 deletions(-) Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
On Tue, Apr 29, 2025 at 02:21:54PM +0100, Peter Maydell wrote: > We're about to make a change that removes the only other use > of the 'cpu' local variable in mb_cpu_initfn(); since the > DEVICE() casts work fine with the Object*, use that instead, > so that we can remove the local variable when we make the > following change. > Reviewed-by: Edgar E. Iglesias <edgar.iglesias@amd.com> > Signed-off-by: Peter Maydell <peter.maydell@linaro.org> > --- > target/microblaze/cpu.c | 10 +++++----- > 1 file changed, 5 insertions(+), 5 deletions(-) > > diff --git a/target/microblaze/cpu.c b/target/microblaze/cpu.c > index 00a2730de4d..d92a43191bd 100644 > --- a/target/microblaze/cpu.c > +++ b/target/microblaze/cpu.c > @@ -333,11 +333,11 @@ static void mb_cpu_initfn(Object *obj) > > #ifndef CONFIG_USER_ONLY > /* Inbound IRQ and FIR lines */ > - qdev_init_gpio_in(DEVICE(cpu), microblaze_cpu_set_irq, 2); > - qdev_init_gpio_in_named(DEVICE(cpu), mb_cpu_ns_axi_dp, "ns_axi_dp", 1); > - qdev_init_gpio_in_named(DEVICE(cpu), mb_cpu_ns_axi_ip, "ns_axi_ip", 1); > - qdev_init_gpio_in_named(DEVICE(cpu), mb_cpu_ns_axi_dc, "ns_axi_dc", 1); > - qdev_init_gpio_in_named(DEVICE(cpu), mb_cpu_ns_axi_ic, "ns_axi_ic", 1); > + qdev_init_gpio_in(DEVICE(obj), microblaze_cpu_set_irq, 2); > + qdev_init_gpio_in_named(DEVICE(obj), mb_cpu_ns_axi_dp, "ns_axi_dp", 1); > + qdev_init_gpio_in_named(DEVICE(obj), mb_cpu_ns_axi_ip, "ns_axi_ip", 1); > + qdev_init_gpio_in_named(DEVICE(obj), mb_cpu_ns_axi_dc, "ns_axi_dc", 1); > + qdev_init_gpio_in_named(DEVICE(obj), mb_cpu_ns_axi_ic, "ns_axi_ic", 1); > #endif > > /* Restricted 'endianness' property is equivalent of 'little-endian' */ > -- > 2.43.0 >
On 4/29/25 06:21, Peter Maydell wrote: > We're about to make a change that removes the only other use > of the 'cpu' local variable in mb_cpu_initfn(); since the > DEVICE() casts work fine with the Object*, use that instead, > so that we can remove the local variable when we make the > following change. > > Signed-off-by: Peter Maydell<peter.maydell@linaro.org> > --- > target/microblaze/cpu.c | 10 +++++----- > 1 file changed, 5 insertions(+), 5 deletions(-) Reviewed-by: Richard Henderson <richard.henderson@linaro.org> r~
diff --git a/target/microblaze/cpu.c b/target/microblaze/cpu.c index 00a2730de4d..d92a43191bd 100644 --- a/target/microblaze/cpu.c +++ b/target/microblaze/cpu.c @@ -333,11 +333,11 @@ static void mb_cpu_initfn(Object *obj) #ifndef CONFIG_USER_ONLY /* Inbound IRQ and FIR lines */ - qdev_init_gpio_in(DEVICE(cpu), microblaze_cpu_set_irq, 2); - qdev_init_gpio_in_named(DEVICE(cpu), mb_cpu_ns_axi_dp, "ns_axi_dp", 1); - qdev_init_gpio_in_named(DEVICE(cpu), mb_cpu_ns_axi_ip, "ns_axi_ip", 1); - qdev_init_gpio_in_named(DEVICE(cpu), mb_cpu_ns_axi_dc, "ns_axi_dc", 1); - qdev_init_gpio_in_named(DEVICE(cpu), mb_cpu_ns_axi_ic, "ns_axi_ic", 1); + qdev_init_gpio_in(DEVICE(obj), microblaze_cpu_set_irq, 2); + qdev_init_gpio_in_named(DEVICE(obj), mb_cpu_ns_axi_dp, "ns_axi_dp", 1); + qdev_init_gpio_in_named(DEVICE(obj), mb_cpu_ns_axi_ip, "ns_axi_ip", 1); + qdev_init_gpio_in_named(DEVICE(obj), mb_cpu_ns_axi_dc, "ns_axi_dc", 1); + qdev_init_gpio_in_named(DEVICE(obj), mb_cpu_ns_axi_ic, "ns_axi_ic", 1); #endif /* Restricted 'endianness' property is equivalent of 'little-endian' */
We're about to make a change that removes the only other use of the 'cpu' local variable in mb_cpu_initfn(); since the DEVICE() casts work fine with the Object*, use that instead, so that we can remove the local variable when we make the following change. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> --- target/microblaze/cpu.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)