public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: lho@apm.com (Loc Ho)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v4 1/2] acpi: Fix proper return code for function acpi_gsi_to_irq
Date: Wed, 20 Jan 2016 17:17:38 -0700	[thread overview]
Message-ID: <1453335459-3617-2-git-send-email-lho@apm.com> (raw)
In-Reply-To: <1453335459-3617-1-git-send-email-lho@apm.com>

The function acpi_gsi_to_irq must return 0 on success as the caller
ghes_probe expects an 0 for success. This change also matches x86
implementation.

Signed-off-by: Tuan Phan <tphan@apm.com>
Signed-off-by: Loc Ho <lho@apm.com>
---
 drivers/acpi/gsi.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/acpi/gsi.c b/drivers/acpi/gsi.c
index ee9e0f2..7b109bd 100644
--- a/drivers/acpi/gsi.c
+++ b/drivers/acpi/gsi.c
@@ -24,7 +24,7 @@ static struct fwnode_handle *acpi_gsi_domain_id;
  *
  * irq location updated with irq value [>0 on success, 0 on failure]
  *
- * Returns: linux IRQ number on success (>0)
+ * Returns: 0 on success
  *          -EINVAL on failure
  */
 int acpi_gsi_to_irq(u32 gsi, unsigned int *irq)
@@ -37,7 +37,7 @@ int acpi_gsi_to_irq(u32 gsi, unsigned int *irq)
 	 * *irq == 0 means no mapping, that should
 	 * be reported as a failure
 	 */
-	return (*irq > 0) ? *irq : -EINVAL;
+	return (*irq > 0) ? 0 : -EINVAL;
 }
 EXPORT_SYMBOL_GPL(acpi_gsi_to_irq);
 
-- 
1.7.1

  reply	other threads:[~2016-01-21  0:17 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-21  0:17 [PATCH v4 0/2] acpi: apei: Bug fix to enable APEI support for ARMv8 Loc Ho
2016-01-21  0:17 ` Loc Ho [this message]
2016-01-25 21:23   ` [PATCH v4 1/2] acpi: Fix proper return code for function acpi_gsi_to_irq Loc Ho
2016-01-26  8:31     ` Marc Zyngier
2016-01-26 17:54       ` Loc Ho
2016-01-21  0:17 ` [PATCH v4 2/2] acpi: apei: Enable APEI multiple GHES source to share an single external IRQ Loc Ho
2016-01-25 21:25   ` Loc Ho
2016-01-25 21:54     ` Borislav Petkov

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=1453335459-3617-2-git-send-email-lho@apm.com \
    --to=lho@apm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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