From: Josh Poimboeuf <jpoimboe@kernel.org>
To: x86@kernel.org
Cc: linux-kernel@vger.kernel.org,
Peter Zijlstra <peterz@infradead.org>,
Miroslav Benes <mbenes@suse.cz>,
linux-btrfs@vger.kernel.org, Mark Rutland <mark.rutland@arm.com>,
linux-scsi@vger.kernel.org, linux-hyperv@vger.kernel.org,
Arnd Bergmann <arnd@arndb.de>,
"Guilherme G . Piccoli" <gpiccoli@igalia.com>,
Michael Kelley <mikelley@microsoft.com>,
kernel test robot <lkp@intel.com>
Subject: [PATCH 04/11] btrfs: Mark btrfs_assertfail() __noreturn
Date: Fri, 7 Apr 2023 17:09:57 -0700 [thread overview]
Message-ID: <b9278cfeebb773013cee73cd959d070f9aa14c58.1680912057.git.jpoimboe@kernel.org> (raw)
In-Reply-To: <cover.1680912057.git.jpoimboe@kernel.org>
Fixes a bunch of warnings including:
vmlinux.o: warning: objtool: select_reloc_root+0x314: unreachable instruction
vmlinux.o: warning: objtool: finish_inode_if_needed+0x15b1: unreachable instruction
vmlinux.o: warning: objtool: get_bio_sector_nr+0x259: unreachable instruction
vmlinux.o: warning: objtool: raid_wait_read_end_io+0xc26: unreachable instruction
vmlinux.o: warning: objtool: raid56_parity_alloc_scrub_rbio+0x37b: unreachable instruction
...
Reported-by: kernel test robot <lkp@intel.com>
Link: https://lore.kernel.org/oe-kbuild-all/202302210709.IlXfgMpX-lkp@intel.com/
Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
---
fs/btrfs/messages.c | 2 +-
fs/btrfs/messages.h | 2 +-
tools/objtool/check.c | 1 +
3 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/fs/btrfs/messages.c b/fs/btrfs/messages.c
index fde5aaa6e7c9..310a05cf95ef 100644
--- a/fs/btrfs/messages.c
+++ b/fs/btrfs/messages.c
@@ -253,7 +253,7 @@ void __cold _btrfs_printk(const struct btrfs_fs_info *fs_info, const char *fmt,
#endif
#ifdef CONFIG_BTRFS_ASSERT
-void __cold btrfs_assertfail(const char *expr, const char *file, int line)
+void __cold __noreturn btrfs_assertfail(const char *expr, const char *file, int line)
{
pr_err("assertion failed: %s, in %s:%d\n", expr, file, line);
BUG();
diff --git a/fs/btrfs/messages.h b/fs/btrfs/messages.h
index 8c516ee58ff9..ac2d1982ba3d 100644
--- a/fs/btrfs/messages.h
+++ b/fs/btrfs/messages.h
@@ -160,7 +160,7 @@ do { \
} while (0)
#ifdef CONFIG_BTRFS_ASSERT
-void __cold btrfs_assertfail(const char *expr, const char *file, int line);
+void __cold __noreturn btrfs_assertfail(const char *expr, const char *file, int line);
#define ASSERT(expr) \
(likely(expr) ? (void)0 : btrfs_assertfail(#expr, __FILE__, __LINE__))
diff --git a/tools/objtool/check.c b/tools/objtool/check.c
index 4e89342dd8fb..a8714d62074e 100644
--- a/tools/objtool/check.c
+++ b/tools/objtool/check.c
@@ -204,6 +204,7 @@ static bool __dead_end_function(struct objtool_file *file, struct symbol *func,
"__ubsan_handle_builtin_unreachable",
"arch_call_rest_init",
"arch_cpu_idle_dead",
+ "btrfs_assertfail",
"cpu_bringup_and_idle",
"cpu_startup_entry",
"do_exit",
--
2.39.2
next prev parent reply other threads:[~2023-04-08 0:10 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-08 0:09 [PATCH 00/12] Sprinkle more __noreturn Josh Poimboeuf
2023-04-08 0:09 ` [PATCH 01/11] init: Mark [arch_call_]rest_init() __noreturn Josh Poimboeuf
2023-04-10 20:02 ` Nick Desaulniers
2023-04-08 0:09 ` [PATCH 02/11] init: Mark start_kernel() __noreturn Josh Poimboeuf
2023-04-12 20:29 ` Nick Desaulniers
2023-04-12 21:57 ` Josh Poimboeuf
2023-04-12 23:26 ` Josh Poimboeuf
2023-04-08 0:09 ` [PATCH 03/11] x86/head: Mark *_start_kernel() __noreturn Josh Poimboeuf
2023-04-08 0:09 ` Josh Poimboeuf [this message]
2023-04-08 0:09 ` [PATCH 05/11] arm64/cpu: Mark cpu_park_loop() and friends __noreturn Josh Poimboeuf
2023-04-08 0:09 ` [PATCH 06/11] cpu: Mark panic_smp_self_stop() __noreturn Josh Poimboeuf
2023-04-08 0:10 ` [PATCH 07/11] cpu: Mark nmi_panic_self_stop() __noreturn Josh Poimboeuf
2023-04-08 0:10 ` [PATCH 08/11] x86/cpu: Mark {hlt,resume}_play_dead() __noreturn Josh Poimboeuf
2023-04-08 0:10 ` [PATCH 09/11] objtool: Include weak functions in global_noreturns check Josh Poimboeuf
2023-04-08 0:10 ` [PATCH 10/11] scsi: message: fusion: Mark mpt_halt_firmware() __noreturn Josh Poimboeuf
2023-04-08 0:10 ` [PATCH 11/11] x86/hyperv: Mark hv_ghcb_terminate() as noreturn Josh Poimboeuf
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=b9278cfeebb773013cee73cd959d070f9aa14c58.1680912057.git.jpoimboe@kernel.org \
--to=jpoimboe@kernel.org \
--cc=arnd@arndb.de \
--cc=gpiccoli@igalia.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-hyperv@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=lkp@intel.com \
--cc=mark.rutland@arm.com \
--cc=mbenes@suse.cz \
--cc=mikelley@microsoft.com \
--cc=peterz@infradead.org \
--cc=x86@kernel.org \
/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®