[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.20.1609021719430.5647@nanos>
Date: Fri, 2 Sep 2016 17:42:09 +0200 (CEST)
From: Thomas Gleixner <tglx@...utronix.de>
To: Sebastian Frias <sf84@...oste.net>
cc: Marc Zyngier <marc.zyngier@....com>,
Jason Cooper <jason@...edaemon.net>,
LKML <linux-kernel@...r.kernel.org>, Mason <slash.tmp@...e.fr>
Subject: Re: [PATCH 2/2] genirq: Generic chip: factorise code using
irq_get_domain_generic_chip()
On Mon, 1 Aug 2016, Sebastian Frias wrote:
> @@ -350,10 +350,10 @@ irq_get_domain_generic_chip(struct irq_domain *d, unsigned int hw_irq)
> int idx;
>
> if (!dgc)
> - return NULL;
> + return ERR_PTR(-ENODEV);
> idx = hw_irq / dgc->irqs_per_chip;
> if (idx >= dgc->num_chips)
> - return NULL;
> + return ERR_PTR(-EINVAL);
This is completely pointless churn. None of the existing callsites cares
about the error value. We can simply split out the guts into a static
function and keep the semantics for irq_get_domain_generic_chip.
I'll fix that up while applying it.
Thanks,
tglx
Powered by blists - more mailing lists