linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ACPI: fix the process flow for 0 which return from acpi_register_gsi
@ 2016-12-01  7:41 Majun
  2016-12-01  7:43 ` majun (Euler7)
  0 siblings, 1 reply; 4+ messages in thread
From: Majun @ 2016-12-01  7:41 UTC (permalink / raw)
  To: linux-kernel, marc.zyngier, linux-acpi, robert.moore, lenb,
	lv.zheng, rafael.j.wysocki, devel, mark.rutland, robh+dt, jason
  Cc: dingtianhong, guohanjun, majun258

From: MaJun <majun258@huawei.com>

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) {
 		res->start = irq;
 		res->end = irq;
 	} else {
-- 
1.7.12.4



^ permalink raw reply related	[flat|nested] 4+ messages in thread
* [PATCH] ACPI: fix the process flow for 0 which return from acpi_register_gsi
@ 2016-10-12  1:20 MaJun
  2016-10-12  2:05 ` Hanjun Guo
  0 siblings, 1 reply; 4+ messages in thread
From: MaJun @ 2016-10-12  1:20 UTC (permalink / raw)
  To: linux-kernel, marc.zyngier, linux-acpi, rjw, lenb
  Cc: dingtianhong, guohanjun, majun258

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) {
 		res->start = irq;
 		res->end = irq;
 	} else {
-- 
1.7.12.4



^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-12-01  7:44 UTC | newest]

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

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).