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


Groups > linux.kernel > #1406051 > unrolled thread

[PATCH] genirq: Fix missing return value in irq_destroy_ipi()

Started byMatt Redfearn <matt.redfearn@imgtec.com>
First post2016-05-24 12:50 +0200
Last post2016-05-24 15:50 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] genirq: Fix missing return value in irq_destroy_ipi() Matt Redfearn <matt.redfearn@imgtec.com> - 2016-05-24 12:50 +0200
    [tip:irq/urgent] genirq: Fix missing return value in  irq_destroy_ipi() tip-bot for Matt Redfearn <tipbot@zytor.com> - 2016-05-24 15:50 +0200

#1406051 — [PATCH] genirq: Fix missing return value in irq_destroy_ipi()

FromMatt Redfearn <matt.redfearn@imgtec.com>
Date2016-05-24 12:50 +0200
Subject[PATCH] genirq: Fix missing return value in irq_destroy_ipi()
Message-ID<rCi4p-28v-5@gated-at.bofh.it>
Commit 7cec18a3906b ("genirq: Add error code reporting to
irq_{reserve,destroy}_ipi") changed the return type of irq_destroy_ipi
to int, but missed adding a value to one return statement. Fix this to
silence the resultant compiler warning:

kernel/irq/ipi.c In function ‘irq_destroy_ipi’:
kernel/irq/ipi.c:128:3: warning: ‘return’ with no value, in function returning non-void [-Wreturn-type]
  return;
  ^
Fixes: 7cec18a3906b ("genirq: Add error code reporting to
irq_{reserve,destroy}_ipi")
Signed-off-by: Matt Redfearn <matt.redfearn@imgtec.com>

---

 kernel/irq/ipi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/irq/ipi.c b/kernel/irq/ipi.c
index c42742208e5e..89b49f6773f0 100644
--- a/kernel/irq/ipi.c
+++ b/kernel/irq/ipi.c
@@ -125,7 +125,7 @@ int irq_destroy_ipi(unsigned int irq, const struct cpumask *dest)
 
 	domain = data->domain;
 	if (WARN_ON(domain == NULL))
-		return;
+		return -EINVAL;
 
 	if (!irq_domain_is_ipi(domain)) {
 		pr_warn("Trying to destroy a non IPI domain!\n");
-- 
2.5.0

[toc] | [next] | [standalone]


#1406188 — [tip:irq/urgent] genirq: Fix missing return value in irq_destroy_ipi()

Fromtip-bot for Matt Redfearn <tipbot@zytor.com>
Date2016-05-24 15:50 +0200
Subject[tip:irq/urgent] genirq: Fix missing return value in irq_destroy_ipi()
Message-ID<rCkSB-3SQ-17@gated-at.bofh.it>
In reply to#1406051
Commit-ID:  59fa5860204ffc95128d60cba9f54f9740a42c7d
Gitweb:     http://git.kernel.org/tip/59fa5860204ffc95128d60cba9f54f9740a42c7d
Author:     Matt Redfearn <matt.redfearn@imgtec.com>
AuthorDate: Tue, 24 May 2016 11:42:30 +0100
Committer:  Thomas Gleixner <tglx@linutronix.de>
CommitDate: Tue, 24 May 2016 15:40:14 +0200

genirq: Fix missing return value in irq_destroy_ipi()

Commit 7cec18a3906b changed the return type of irq_destroy_ipi to int, but
missed adding a value to one return statement. Fix this to silence the
resulting compiler warning:

kernel/irq/ipi.c In function ‘irq_destroy_ipi’:
kernel/irq/ipi.c:128:3: warning: ‘return’ with no value, in function returning non-void [-Wreturn-type]

Fixes: 7cec18a3906b "genirq: Add error code reporting to irq_{reserve,destroy}_ipi"
Signed-off-by: Matt Redfearn <matt.redfearn@imgtec.com>
Cc: linux-mips@linux-mips.org
Link: http://lkml.kernel.org/r/1464086550-24734-1-git-send-email-matt.redfearn@imgtec.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>

---
 kernel/irq/ipi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/irq/ipi.c b/kernel/irq/ipi.c
index c427422..89b49f6 100644
--- a/kernel/irq/ipi.c
+++ b/kernel/irq/ipi.c
@@ -125,7 +125,7 @@ int irq_destroy_ipi(unsigned int irq, const struct cpumask *dest)
 
 	domain = data->domain;
 	if (WARN_ON(domain == NULL))
-		return;
+		return -EINVAL;
 
 	if (!irq_domain_is_ipi(domain)) {
 		pr_warn("Trying to destroy a non IPI domain!\n");

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web