linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hanjun Guo <guohanjun@huawei.com>
To: MaJun <majun258@huawei.com>,
	linux-kernel@vger.kernel.org, marc.zyngier@arm.com,
	linux-acpi@vger.kernel.org, rjw@rjwysocki.net, lenb@kernel.org
Cc: dingtianhong@huawei.com
Subject: Re: [PATCH] ACPI: fix the process flow for 0 which return from acpi_register_gsi
Date: Wed, 12 Oct 2016 10:05:53 +0800	[thread overview]
Message-ID: <57FD9A81.5020701@huawei.com> (raw)
In-Reply-To: <1476235256-10744-1-git-send-email-majun258@huawei.com>

On 2016/10/12 9:20, MaJun wrote:
> The return value 0 from acpi_register_gsi() means irq mapping failed.
> So, we should process this case in else branch.
>
> Signed-off-by: MaJun <majun258@huawei.com>
> ---
>  drivers/acpi/resource.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/acpi/resource.c b/drivers/acpi/resource.c
> index 56241eb..9918326 100644
> --- a/drivers/acpi/resource.c
> +++ b/drivers/acpi/resource.c
> @@ -416,7 +416,7 @@ static void acpi_dev_get_irqresource(struct resource *res, u32 gsi,
>  
>  	res->flags = acpi_dev_irq_flags(triggering, polarity, shareable);
>  	irq = acpi_register_gsi(NULL, gsi, triggering, polarity);
> -	if (irq >= 0) {
> +	if (irq > 0) {

On x86 or IA64, irq 0 is a valid irq number as far as I know.

Thanks
Hanjun


  reply	other threads:[~2016-10-12  2:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-12  1:20 [PATCH] ACPI: fix the process flow for 0 which return from acpi_register_gsi MaJun
2016-10-12  2:05 ` Hanjun Guo [this message]
  -- strict thread matches above, loose matches on Subject: below --
2016-12-01  7:41 Majun
2016-12-01  7:43 ` majun (Euler7)

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=57FD9A81.5020701@huawei.com \
    --to=guohanjun@huawei.com \
    --cc=dingtianhong@huawei.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=majun258@huawei.com \
    --cc=marc.zyngier@arm.com \
    --cc=rjw@rjwysocki.net \
    /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;
as well as URLs for NNTP newsgroup(s).