From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752507AbbDAHWv (ORCPT ); Wed, 1 Apr 2015 03:22:51 -0400 Received: from foss.arm.com ([217.140.101.70]:37171 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751009AbbDAHWs (ORCPT ); Wed, 1 Apr 2015 03:22:48 -0400 Date: Wed, 1 Apr 2015 08:23:33 +0100 From: Marc Zyngier To: Zhen Lei Cc: Thomas Gleixner , Jason Cooper , linux-kernel , Zefan Li , "huxinwei@huawei.com" , Tianhong Ding , Kefeng Wang Subject: Re: [PATCH 1/1] irqchip/gicv3: remove duplicated parameter testing Message-ID: <20150401082333.59e70a50@why.wild-wind.fr.eu.org> In-Reply-To: <1427871298-11976-1-git-send-email-thunder.leizhen@huawei.com> References: <1427871298-11976-1-git-send-email-thunder.leizhen@huawei.com> Organization: ARM Ltd X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.25; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 1 Apr 2015 07:54:58 +0100 Zhen Lei wrote: > Test hardware irq number from small to large, and add a blank above > each comment. To make it more clear. > > Signed-off-by: Zhen Lei > --- > drivers/irqchip/irq-gic-v3.c | 15 +++++++-------- > 1 file changed, 7 insertions(+), 8 deletions(-) > > diff --git a/drivers/irqchip/irq-gic-v3.c b/drivers/irqchip/irq-gic-v3.c > index fd8850d..f43cfa1 100644 > --- a/drivers/irqchip/irq-gic-v3.c > +++ b/drivers/irqchip/irq-gic-v3.c > @@ -611,12 +611,6 @@ static int gic_irq_domain_map(struct irq_domain *d, unsigned int irq, > /* SGIs are private to the core kernel */ > if (hw < 16) > return -EPERM; > - /* Nothing here */ > - if (hw >= gic_data.irq_nr && hw < 8192) > - return -EPERM; > - /* Off limits */ > - if (hw >= GIC_ID_NR) > - return -EPERM; > > /* PPIs */ > if (hw < 32) { > @@ -624,13 +618,17 @@ static int gic_irq_domain_map(struct irq_domain *d, unsigned int irq, > irq_domain_set_info(d, irq, hw, &gic_chip, d->host_data, > handle_percpu_devid_irq, NULL, NULL); > set_irq_flags(irq, IRQF_VALID | IRQF_NOAUTOEN); > + return 0; > } > + > /* SPIs */ > - if (hw >= 32 && hw < gic_data.irq_nr) { > + if (hw < gic_data.irq_nr) { > irq_domain_set_info(d, irq, hw, &gic_chip, d->host_data, > handle_fasteoi_irq, NULL, NULL); > set_irq_flags(irq, IRQF_VALID | IRQF_PROBE); > + return 0; > } > + > /* LPIs */ > if (hw >= 8192 && hw < GIC_ID_NR) { > if (!gic_dist_supports_lpis()) > @@ -638,9 +636,10 @@ static int gic_irq_domain_map(struct irq_domain *d, unsigned int irq, > irq_domain_set_info(d, irq, hw, &gic_chip, d->host_data, > handle_fasteoi_irq, NULL, NULL); > set_irq_flags(irq, IRQF_VALID); > + return 0; > } > > - return 0; > + return -EPERM; > } > > static int gic_irq_domain_xlate(struct irq_domain *d, Can you please explain the problem you're seeing and indicate how the proposed fix is relevant to the problem? So far, I'm only seeing code being moved around for no particular reason ("To make it more clear" is really not enough a reason). Thanks, M. -- Without deviation from the norm, progress is not possible.