From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932460AbcIBPod (ORCPT ); Fri, 2 Sep 2016 11:44:33 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:54525 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932236AbcIBPob (ORCPT ); Fri, 2 Sep 2016 11:44:31 -0400 Date: Fri, 2 Sep 2016 17:42:09 +0200 (CEST) From: Thomas Gleixner To: Sebastian Frias cc: Marc Zyngier , Jason Cooper , LKML , Mason Subject: Re: [PATCH 2/2] genirq: Generic chip: factorise code using irq_get_domain_generic_chip() In-Reply-To: <579F5C69.8070006@laposte.net> Message-ID: References: <579F5C69.8070006@laposte.net> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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