From: Marc Zyngier <marc.zyngier@arm.com>
To: Zhen Lei <thunder.leizhen@huawei.com>
Cc: Thomas Gleixner <tglx@linutronix.de>,
Jason Cooper <jason@lakedaemon.net>,
linux-kernel <linux-kernel@vger.kernel.org>,
Zefan Li <lizefan@huawei.com>,
"huxinwei@huawei.com" <huxinwei@huawei.com>,
Tianhong Ding <dingtianhong@huawei.com>,
Kefeng Wang <wangkefeng.wang@huawei.com>
Subject: Re: [PATCH 1/1] irqchip/gicv3: remove duplicated parameter testing
Date: Wed, 1 Apr 2015 08:23:33 +0100 [thread overview]
Message-ID: <20150401082333.59e70a50@why.wild-wind.fr.eu.org> (raw)
In-Reply-To: <1427871298-11976-1-git-send-email-thunder.leizhen@huawei.com>
On Wed, 1 Apr 2015 07:54:58 +0100
Zhen Lei <thunder.leizhen@huawei.com> 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 <thunder.leizhen@huawei.com>
> ---
> 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.
prev parent reply other threads:[~2015-04-01 7:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-01 6:54 Zhen Lei
2015-04-01 7:23 ` Marc Zyngier [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150401082333.59e70a50@why.wild-wind.fr.eu.org \
--to=marc.zyngier@arm.com \
--cc=dingtianhong@huawei.com \
--cc=huxinwei@huawei.com \
--cc=jason@lakedaemon.net \
--cc=linux-kernel@vger.kernel.org \
--cc=lizefan@huawei.com \
--cc=tglx@linutronix.de \
--cc=thunder.leizhen@huawei.com \
--cc=wangkefeng.wang@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®