From: bp@alien8•de (Borislav Petkov)
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCH v3 1/2] acpi: Fix proper return code for function acpi_gsi_to_irq
Date: Tue, 12 Jan 2016 19:32:28 +0100 [thread overview]
Message-ID: <20160112183228.GK30558@pd.tnic> (raw)
In-Reply-To: <CAGDN=za9Pjm0B0OMJevgesBdkm=XOGyU7jXXfWqk+dLSo7BVtQ@mail.gmail.com>
On Tue, Jan 12, 2016 at 10:26:04AM -0800, Tuan Phan wrote:
> So are you good with it?
How about this instead:
---
diff --git a/drivers/acpi/gsi.c b/drivers/acpi/gsi.c
index fa4585a6914e..e42f6b7eac13 100644
--- a/drivers/acpi/gsi.c
+++ b/drivers/acpi/gsi.c
@@ -46,17 +46,22 @@ static unsigned int acpi_gsi_get_irq_type(int trigger, int polarity)
* Returns: linux IRQ number on success (>0)
* -EINVAL on failure
*/
-int acpi_gsi_to_irq(u32 gsi, unsigned int *irq)
+int acpi_gsi_to_irq(u32 gsi)
{
+ unsigned int irq;
+
struct irq_domain *d = irq_find_matching_fwnode(acpi_gsi_domain_id,
DOMAIN_BUS_ANY);
- *irq = irq_find_mapping(d, gsi);
+ irq = irq_find_mapping(d, gsi);
/*
* *irq == 0 means no mapping, that should
* be reported as a failure
*/
- return (*irq > 0) ? *irq : -EINVAL;
+ if (irq > 0)
+ return irq;
+ else
+ return -EINVAL;
}
EXPORT_SYMBOL_GPL(acpi_gsi_to_irq);
--
Regards/Gruss,
Boris.
ECO tip #101: Trim your mails when you reply.
next prev parent reply other threads:[~2016-01-12 18:32 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-07 0:51 [PATCH v3 0/2] acpi: apei: Bug fix to enable APEI support for ARMv8 Loc Ho
2015-11-07 0:51 ` [PATCH v3 1/2] acpi: Fix proper return code for function acpi_gsi_to_irq Loc Ho
2016-01-10 11:07 ` Borislav Petkov
2016-01-11 22:04 ` Tuan Phan
2016-01-11 22:13 ` Borislav Petkov
2016-01-11 22:41 ` Tuan Phan
2016-01-12 14:36 ` Borislav Petkov
2016-01-12 18:26 ` Tuan Phan
2016-01-12 18:32 ` Borislav Petkov [this message]
2016-01-12 18:46 ` Tuan Phan
2016-01-12 19:21 ` Borislav Petkov
2016-01-12 18:59 ` Marc Zyngier
2016-01-12 19:13 ` Tuan Phan
2016-01-12 19:32 ` Marc Zyngier
2016-01-12 20:01 ` Tuan Phan
2016-01-13 8:40 ` Marc Zyngier
2015-11-07 0:51 ` [PATCH v3 2/2] acpi: apei: Enable APEI multiple GHES source to share an single external IRQ Loc Ho
2016-01-09 0:30 ` [PATCH v3 0/2] acpi: apei: Bug fix to enable APEI support for ARMv8 Loc Ho
2016-01-10 11:08 ` 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=20160112183228.GK30558@pd.tnic \
--to=bp@alien8$(echo .)de \
--cc=linux-arm-kernel@lists$(echo .)infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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