Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1563033 > unrolled thread

[PATCH v4 3/4] x86/platform/intel-mid: Don't shadow error code of mp_map_gsi_to_irq()

Started byAndy Shevchenko <andriy.shevchenko@linux.intel.com>
First post2017-01-19 20:40 +0100
Last post2017-01-20 10:20 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH v4 3/4] x86/platform/intel-mid: Don't shadow error code of mp_map_gsi_to_irq() Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2017-01-19 20:40 +0100
    [tip:x86/platform] x86/platform/intel-mid: Don't shadow error code  of mp_map_gsi_to_irq() tip-bot for Andy Shevchenko <tipbot@zytor.com> - 2017-01-20 10:20 +0100

#1563033 — [PATCH v4 3/4] x86/platform/intel-mid: Don't shadow error code of mp_map_gsi_to_irq()

FromAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Date2017-01-19 20:40 +0100
Subject[PATCH v4 3/4] x86/platform/intel-mid: Don't shadow error code of mp_map_gsi_to_irq()
Message-ID<t1qIW-5ER-13@gated-at.bofh.it>
When call mp_map_gsi_to_irq() and return its error code do not shadow it.
Note that 0 is not an error.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 arch/x86/platform/intel-mid/device_libs/platform_mrfld_wdt.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/arch/x86/platform/intel-mid/device_libs/platform_mrfld_wdt.c b/arch/x86/platform/intel-mid/device_libs/platform_mrfld_wdt.c
index 3f1f1c77d090..8a10a56f2840 100644
--- a/arch/x86/platform/intel-mid/device_libs/platform_mrfld_wdt.c
+++ b/arch/x86/platform/intel-mid/device_libs/platform_mrfld_wdt.c
@@ -28,9 +28,9 @@ static struct platform_device wdt_dev = {
 
 static int tangier_probe(struct platform_device *pdev)
 {
-	int gsi;
 	struct irq_alloc_info info;
 	struct intel_mid_wdt_pdata *pdata = pdev->dev.platform_data;
+	int gsi, irq;
 
 	if (!pdata)
 		return -EINVAL;
@@ -38,10 +38,10 @@ static int tangier_probe(struct platform_device *pdev)
 	/* IOAPIC builds identity mapping between GSI and IRQ on MID */
 	gsi = pdata->irq;
 	ioapic_set_alloc_attr(&info, cpu_to_node(0), 1, 0);
-	if (mp_map_gsi_to_irq(gsi, IOAPIC_MAP_ALLOC, &info) <= 0) {
-		dev_warn(&pdev->dev, "cannot find interrupt %d in ioapic\n",
-			 gsi);
-		return -EINVAL;
+	irq = mp_map_gsi_to_irq(gsi, IOAPIC_MAP_ALLOC, &info);
+	if (irq < 0) {
+		dev_warn(&pdev->dev, "cannot find interrupt %d in ioapic\n", gsi);
+		return irq;
 	}
 
 	return 0;
-- 
2.11.0

[toc] | [next] | [standalone]


#1563398 — [tip:x86/platform] x86/platform/intel-mid: Don't shadow error code of mp_map_gsi_to_irq()

Fromtip-bot for Andy Shevchenko <tipbot@zytor.com>
Date2017-01-20 10:20 +0100
Subject[tip:x86/platform] x86/platform/intel-mid: Don't shadow error code of mp_map_gsi_to_irq()
Message-ID<t1Dwt-5pq-1@gated-at.bofh.it>
In reply to#1563033
Commit-ID:  939533955d1f1d51e8e37d7d675646ce9d55534b
Gitweb:     http://git.kernel.org/tip/939533955d1f1d51e8e37d7d675646ce9d55534b
Author:     Andy Shevchenko <andriy.shevchenko@linux.intel.com>
AuthorDate: Thu, 19 Jan 2017 21:24:24 +0200
Committer:  Thomas Gleixner <tglx@linutronix.de>
CommitDate: Fri, 20 Jan 2017 10:07:41 +0100

x86/platform/intel-mid: Don't shadow error code of mp_map_gsi_to_irq()

When call mp_map_gsi_to_irq() and return its error code do not shadow it.
Note that 0 is not an error.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: http://lkml.kernel.org/r/20170119192425.189899-4-andriy.shevchenko@linux.intel.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>

---
 arch/x86/platform/intel-mid/device_libs/platform_mrfld_wdt.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/arch/x86/platform/intel-mid/device_libs/platform_mrfld_wdt.c b/arch/x86/platform/intel-mid/device_libs/platform_mrfld_wdt.c
index 3f1f1c7..8a10a56 100644
--- a/arch/x86/platform/intel-mid/device_libs/platform_mrfld_wdt.c
+++ b/arch/x86/platform/intel-mid/device_libs/platform_mrfld_wdt.c
@@ -28,9 +28,9 @@ static struct platform_device wdt_dev = {
 
 static int tangier_probe(struct platform_device *pdev)
 {
-	int gsi;
 	struct irq_alloc_info info;
 	struct intel_mid_wdt_pdata *pdata = pdev->dev.platform_data;
+	int gsi, irq;
 
 	if (!pdata)
 		return -EINVAL;
@@ -38,10 +38,10 @@ static int tangier_probe(struct platform_device *pdev)
 	/* IOAPIC builds identity mapping between GSI and IRQ on MID */
 	gsi = pdata->irq;
 	ioapic_set_alloc_attr(&info, cpu_to_node(0), 1, 0);
-	if (mp_map_gsi_to_irq(gsi, IOAPIC_MAP_ALLOC, &info) <= 0) {
-		dev_warn(&pdev->dev, "cannot find interrupt %d in ioapic\n",
-			 gsi);
-		return -EINVAL;
+	irq = mp_map_gsi_to_irq(gsi, IOAPIC_MAP_ALLOC, &info);
+	if (irq < 0) {
+		dev_warn(&pdev->dev, "cannot find interrupt %d in ioapic\n", gsi);
+		return irq;
 	}
 
 	return 0;

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web