[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH for-5.2] spapr: Avoid some integer conversions in spapr_phb_reali
From: |
Greg Kurz |
Subject: |
[PATCH for-5.2] spapr: Avoid some integer conversions in spapr_phb_realize() |
Date: |
Tue, 28 Jul 2020 11:14:13 +0200 |
User-agent: |
StGit/0.21 |
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);
- [PATCH for-5.2] spapr: Avoid some integer conversions in spapr_phb_realize(),
Greg Kurz <=