[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PATCH for-2.12 v2 02/12] ppc/xics: remove useless if conditi
From: |
Cédric Le Goater |
Subject: |
[Qemu-ppc] [PATCH for-2.12 v2 02/12] ppc/xics: remove useless if condition |
Date: |
Thu, 9 Nov 2017 11:14:29 +0100 |
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
- [Qemu-ppc] [PATCH for-2.12 v2 00/12] spapr: introduce an IRQ allocator at the machine level, Cédric Le Goater, 2017/11/09
- [Qemu-ppc] [PATCH for-2.12 v2 01/12] spapr: add pseries 2.12 machine type, Cédric Le Goater, 2017/11/09
- [Qemu-ppc] [PATCH for-2.12 v2 02/12] ppc/xics: remove useless if condition,
Cédric Le Goater <=
- [Qemu-ppc] [PATCH for-2.12 v2 03/12] spapr: introduce new XICSFabric operations for an IRQ allocator, Cédric Le Goater, 2017/11/09
- [Qemu-ppc] [PATCH for-2.12 v2 04/12] spapr: move current IRQ allocation under the machine, Cédric Le Goater, 2017/11/09
- [Qemu-ppc] [PATCH for-2.12 v2 05/12] spapr: introduce an IRQ allocator using a bitmap, Cédric Le Goater, 2017/11/09
- [Qemu-ppc] [PATCH for-2.12 v2 06/12] spapr: store a reference IRQ bitmap, Cédric Le Goater, 2017/11/09
- [Qemu-ppc] [PATCH for-2.12 v2 07/12] spapr: introduce an 'irq_base' number, Cédric Le Goater, 2017/11/09
- [Qemu-ppc] [PATCH for-2.12 v2 08/12] spapr: remove the use of ics_valid_irq(), Cédric Le Goater, 2017/11/09
- [Qemu-ppc] [PATCH for-2.12 v2 09/12] spapr: introduce a XICSFabric irq_is_lsi() operation, Cédric Le Goater, 2017/11/09
- [Qemu-ppc] [PATCH for-2.12 v2 10/12] spapr: split the IRQ number space for LSI interrupts, Cédric Le Goater, 2017/11/09
- [Qemu-ppc] [PATCH for-2.12 v2 11/12] sparp: merge ics_set_irq_type() in irq_alloc_block() operation, Cédric Le Goater, 2017/11/09
- [Qemu-ppc] [PATCH for-2.12 v2 12/12] spapr: use sPAPRMachineState in spapr_ics_ prototypes, Cédric Le Goater, 2017/11/09