qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH for-5.2] spapr: Avoid some integer conversions in spapr_phb_realize()
@ 2020-07-28  9:14 Greg Kurz
  2020-07-28 11:51 ` Markus Armbruster
  2020-07-29  2:54 ` David Gibson
  0 siblings, 2 replies; 5+ messages in thread
From: Greg Kurz @ 2020-07-28  9:14 UTC (permalink / raw)
  To: David Gibson; +Cc: qemu-ppc, Markus Armbruster, qemu-devel

Without this patch, the irq number gets converted uselessly from int
to int32_t, back and forth.

This doesn't fix an actual issue, it's just to make the code neater.

Suggested-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Greg Kurz <groug@kaod.org>
---

This is a follow-up to my previous "spapr: Simplify error handling in
spapr_phb_realize()" patch. Maybe worth squashing it there ?
---
 hw/ppc/spapr_pci.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c
index 59441e2117f3..0a418f1e6711 100644
--- a/hw/ppc/spapr_pci.c
+++ b/hw/ppc/spapr_pci.c
@@ -1964,7 +1964,7 @@ static void spapr_phb_realize(DeviceState *dev, Error **errp)
 
     /* Initialize the LSI table */
     for (i = 0; i < PCI_NUM_PINS; i++) {
-        int32_t irq = SPAPR_IRQ_PCI_LSI + sphb->index * PCI_NUM_PINS + i;
+        int irq = SPAPR_IRQ_PCI_LSI + sphb->index * PCI_NUM_PINS + i;
 
         if (smc->legacy_irq_allocation) {
             irq = spapr_irq_findone(spapr, errp);




^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-07-31  5:23 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-28  9:14 [PATCH for-5.2] spapr: Avoid some integer conversions in spapr_phb_realize() Greg Kurz
2020-07-28 11:51 ` Markus Armbruster
2020-07-29  2:54 ` David Gibson
2020-07-30 16:55   ` Greg Kurz
2020-07-31  3:22     ` David Gibson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).