[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH for-2.12 v3 02/11] ppc/xics: remove useless if condi
From: |
Cédric Le Goater |
Subject: |
[Qemu-devel] [PATCH for-2.12 v3 02/11] ppc/xics: remove useless if condition |
Date: |
Fri, 10 Nov 2017 15:20:08 +0000 |
The previous code section uses a 'first < 0' test and returns. Therefore,
there is no need to test the 'first' variable against '>= 0' afterwards.
Signed-off-by: Cédric Le Goater <address@hidden>
---
hw/intc/xics_spapr.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/hw/intc/xics_spapr.c b/hw/intc/xics_spapr.c
index d98ea8b13068..e8c0a1b3e903 100644
--- a/hw/intc/xics_spapr.c
+++ b/hw/intc/xics_spapr.c
@@ -329,10 +329,8 @@ int spapr_ics_alloc_block(ICSState *ics, int num, bool lsi,
return -1;
}
- if (first >= 0) {
- for (i = first; i < first + num; ++i) {
- ics_set_irq_type(ics, i, lsi);
- }
+ for (i = first; i < first + num; ++i) {
+ ics_set_irq_type(ics, i, lsi);
}
first += ics->offset;
--
2.13.6
- Re: [Qemu-devel] QEMU 3.0 ?, (continued)
- Re: [Qemu-devel] QEMU 3.0 ?, Paolo Bonzini, 2017/11/23
- Re: [Qemu-devel] QEMU 3.0 ?, Cornelia Huck, 2017/11/23
- Re: [Qemu-devel] QEMU 3.0 ?, Paolo Bonzini, 2017/11/23
- Re: [Qemu-devel] QEMU 3.0 ?, Peter Maydell, 2017/11/23
- Re: [Qemu-devel] QEMU 3.0 ? (was: [PATCH for-2.12 v3 01/11] spapr: add pseries 2.12 machine type), Daniel P. Berrange, 2017/11/23
- Re: [Qemu-devel] QEMU 3.0 ?, Thomas Huth, 2017/11/23
[Qemu-devel] [PATCH for-2.12 v3 02/11] ppc/xics: remove useless if condition,
Cédric Le Goater <=
[Qemu-devel] [PATCH for-2.12 v3 03/11] spapr: introduce new XICSFabric operations for an IRQ allocator, Cédric Le Goater, 2017/11/10
[Qemu-devel] [PATCH for-2.12 v3 04/11] spapr: move current IRQ allocation under the machine, Cédric Le Goater, 2017/11/10