From: Philippe Mathieu-Daudé Date: Tue, 21 Oct 2025 08:43:39 +0000 (+0200) Subject: hw/ppc/spapr: Inline few SPAPR_IRQ_* uses X-Git-Tag: v10.2.0-rc1~48^2~27 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3d8939da6fcf191220e0668e778c4b98ff6d8316;p=thirdparty%2Fqemu.git hw/ppc/spapr: Inline few SPAPR_IRQ_* uses Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Chinmay Rath Link: https://lore.kernel.org/qemu-devel/20251021084346.73671-6-philmd@linaro.org Signed-off-by: Harsh Prateek Bora --- diff --git a/hw/ppc/spapr_events.c b/hw/ppc/spapr_events.c index 548a190ce8..892ddc7f8f 100644 --- a/hw/ppc/spapr_events.c +++ b/hw/ppc/spapr_events.c @@ -1041,16 +1041,14 @@ void spapr_clear_pending_hotplug_events(SpaprMachineState *spapr) void spapr_events_init(SpaprMachineState *spapr) { - int epow_irq = SPAPR_IRQ_EPOW; - - spapr_irq_claim(spapr, epow_irq, false, &error_fatal); + spapr_irq_claim(spapr, SPAPR_IRQ_EPOW, false, &error_fatal); QTAILQ_INIT(&spapr->pending_events); spapr->event_sources = spapr_event_sources_new(); spapr_event_sources_register(spapr->event_sources, EVENT_CLASS_EPOW, - epow_irq); + SPAPR_IRQ_EPOW); /* NOTE: if machine supports modern/dedicated hotplug event source, * we add it to the device-tree unconditionally. This means we may @@ -1061,12 +1059,10 @@ void spapr_events_init(SpaprMachineState *spapr) * checking that it's enabled. */ if (spapr->use_hotplug_event_source) { - int hp_irq = SPAPR_IRQ_HOTPLUG; - - spapr_irq_claim(spapr, hp_irq, false, &error_fatal); + spapr_irq_claim(spapr, SPAPR_IRQ_HOTPLUG, false, &error_fatal); spapr_event_sources_register(spapr->event_sources, EVENT_CLASS_HOT_PLUG, - hp_irq); + SPAPR_IRQ_HOTPLUG); } spapr->epow_notifier.notify = spapr_powerdown_req;