mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Nick Desaulniers <ndesaulniers@google.com>
To: Yoshinori Sato <ysato@users.sourceforge.jp>,
	Rich Felker <dalias@libc.org>
Cc: Nick Desaulniers <ndesaulniers@google.com>,
	Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>,
	Paul Mundt <lethal@linux-sh.org>,
	Guenter Roeck <linux@roeck-us.net>,
	linux-sh@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] sh: check return code of request_irq
Date: Tue, 22 Dec 2020 12:54:01 -0800	[thread overview]
Message-ID: <20201222205402.2269377-1-ndesaulniers@google.com> (raw)
In-Reply-To: <20201212161831.GA28098@roeck-us.net>

request_irq is marked __must_check, but the call in shx3_prepare_cpus
has a void return type, so it can't propagate failure to the caller.
Follow cues from hexagon and just print an error.

Fixes: c7936b9abcf5 ("sh: smp: Hook in to the generic IPI handler for SH-X3 SMP.")
Cc: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
Cc: Paul Mundt <lethal@linux-sh.org>
Reported-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
---
 arch/sh/kernel/cpu/sh4a/smp-shx3.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/arch/sh/kernel/cpu/sh4a/smp-shx3.c b/arch/sh/kernel/cpu/sh4a/smp-shx3.c
index f8a2bec0f260..1261dc7b84e8 100644
--- a/arch/sh/kernel/cpu/sh4a/smp-shx3.c
+++ b/arch/sh/kernel/cpu/sh4a/smp-shx3.c
@@ -73,8 +73,9 @@ static void shx3_prepare_cpus(unsigned int max_cpus)
 	BUILD_BUG_ON(SMP_MSG_NR >= 8);
 
 	for (i = 0; i < SMP_MSG_NR; i++)
-		request_irq(104 + i, ipi_interrupt_handler,
-			    IRQF_PERCPU, "IPI", (void *)(long)i);
+		if (request_irq(104 + i, ipi_interrupt_handler,
+			    IRQF_PERCPU, "IPI", (void *)(long)i))
+			pr_err("Failed to request irq %d\n", i);
 
 	for (i = 0; i < max_cpus; i++)
 		set_cpu_present(i, true);
-- 
2.29.2.729.g45daf8777d-goog


  parent reply	other threads:[~2020-12-22 20:55 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-28 19:33 [PATCH v3] Compiler Attributes: remove CONFIG_ENABLE_MUST_CHECK Masahiro Yamada
2020-11-30  1:04 ` Nathan Chancellor
2020-11-30 18:16 ` Nick Desaulniers
2020-12-02 12:50 ` Miguel Ojeda
2020-12-12 16:18 ` Guenter Roeck
2020-12-13  5:04   ` Miguel Ojeda
2020-12-13 12:55     ` Guenter Roeck
2020-12-13 14:58       ` Miguel Ojeda
2020-12-13 15:16         ` Greg KH
2020-12-13 15:27           ` Miguel Ojeda
2020-12-21  6:18             ` Masahiro Yamada
2020-12-21 10:02               ` Guenter Roeck
2020-12-21 13:51                 ` Miguel Ojeda
2020-12-22 21:03                 ` [PATCH] fs: binfmt_em86: check return code of remove_arg_zero Nick Desaulniers
2021-01-06  2:57                   ` Miguel Ojeda
2020-12-21 13:51               ` [PATCH v3] Compiler Attributes: remove CONFIG_ENABLE_MUST_CHECK Miguel Ojeda
2020-12-13 15:37       ` Matthias Urlichs
2020-12-13 16:32         ` Miguel Ojeda
2020-12-22 20:54   ` Nick Desaulniers [this message]
2020-12-23  6:33     ` [PATCH] sh: check return code of request_irq Masahiro Yamada
2021-01-01 13:50     ` John Paul Adrian Glaubitz
2021-01-01 20:42       ` Miguel Ojeda
2021-01-18 19:00         ` John Paul Adrian Glaubitz

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=20201222205402.2269377-1-ndesaulniers@google.com \
    --to=ndesaulniers@google.com \
    --cc=dalias@libc.org \
    --cc=lethal@linux-sh.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sh@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=miguel.ojeda.sandonis@gmail.com \
    --cc=ysato@users.sourceforge.jp \
    /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

all inboxes | Powered by JetHome®