[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PULL 02/24] ppc/xics: remove useless if condition
From: |
David Gibson |
Subject: |
[Qemu-ppc] [PULL 02/24] ppc/xics: remove useless if condition |
Date: |
Fri, 15 Dec 2017 16:54:13 +1100 |
From: Cédric Le Goater <address@hidden>
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>
Reviewed-by: Greg Kurz <address@hidden>
Signed-off-by: David Gibson <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 d98ea8b130..e8c0a1b3e9 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.14.3
- [Qemu-ppc] [PULL 00/24] ppc-for-2.12 queue 20171215, David Gibson, 2017/12/15
- [Qemu-ppc] [PULL 01/24] target/ppc: Use tcg_gen_lookup_and_goto_ptr, David Gibson, 2017/12/15
- [Qemu-ppc] [PULL 02/24] ppc/xics: remove useless if condition,
David Gibson <=
- [Qemu-ppc] [PULL 03/24] spapr: Add pseries-2.12 machine type, David Gibson, 2017/12/15
- [Qemu-ppc] [PULL 10/24] spapr/rtas: disable the decrementer interrupt when a CPU is unplugged, David Gibson, 2017/12/15
- [Qemu-ppc] [PULL 04/24] spapr_cpu_core: instantiate CPUs separately, David Gibson, 2017/12/15
- [Qemu-ppc] [PULL 11/24] spapr/rtas: fix reboot of a a SMP TCG guest, David Gibson, 2017/12/15
- [Qemu-ppc] [PULL 09/24] e500: fix pci host bridge class/type, David Gibson, 2017/12/15
- [Qemu-ppc] [PULL 16/24] spapr: introduce a spapr_irq_set_lsi() helper, David Gibson, 2017/12/15
- [Qemu-ppc] [PULL 23/24] spapr: Assume msi_nonbroken, David Gibson, 2017/12/15
- [Qemu-ppc] [PULL 12/24] spapr/rtas: do not reset the MSR in stop-self command, David Gibson, 2017/12/15
- [Qemu-ppc] [PULL 14/24] ppc/xics: assign of the CPU 'intc' pointer under the core, David Gibson, 2017/12/15
- [Qemu-ppc] [PULL 07/24] pcc: define the Power-saving mode Exit Cause Enable bits in PowerPCCPUClass, David Gibson, 2017/12/15