[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] [PATCH for-2.12 v3 02/11] ppc/xics: remove useless if con
From: |
David Gibson |
Subject: |
Re: [Qemu-ppc] [PATCH for-2.12 v3 02/11] ppc/xics: remove useless if condition |
Date: |
Mon, 13 Nov 2017 16:28:11 +1100 |
User-agent: |
Mutt/1.9.1 (2017-09-22) |
On Fri, Nov 10, 2017 at 03:20:08PM +0000, Cédric Le Goater wrote:
> 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;
>
Applied to ppc-for-2.12.
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
signature.asc
Description: PGP signature
[Qemu-ppc] [PATCH for-2.12 v3 04/11] spapr: move current IRQ allocation under the machine, Cédric Le Goater, 2017/11/10
[Qemu-ppc] [PATCH for-2.12 v3 05/11] spapr: introduce an IRQ allocator using a bitmap, Cédric Le Goater, 2017/11/10