* [PATCH] staging/lustre: use __noreturn for lbug_with_loc
@ 2015-09-17 2:51 Juston Li
0 siblings, 0 replies; only message in thread
From: Juston Li @ 2015-09-17 2:51 UTC (permalink / raw)
To: oleg.drokin, andreas.dilger, gregkh; +Cc: linux-kernel, devel, HPDD-discuss
fixes sparse error:
drivers/staging/lustre/lustre/libcfs/linux/linux-debug.c:149:6: error:
symbol 'lbug_with_loc'redeclared with different type (originally declared at
drivers/staging/lustre/lustre/libcfs/linux/../../../include/linux/libcfs/libcfs_private.h:82)
- different modifiers
Use the __noreturn macro instead of __attribute__((noreturn))
The macro is exactly that but its usage seems more common and
it is bit more readable.
Signed-off-by: Juston Li <juston.h.li@gmail.com>
---
drivers/staging/lustre/include/linux/libcfs/libcfs_private.h | 2 +-
drivers/staging/lustre/lustre/libcfs/linux/linux-debug.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/lustre/include/linux/libcfs/libcfs_private.h b/drivers/staging/lustre/include/linux/libcfs/libcfs_private.h
index 9544860..6af733d 100644
--- a/drivers/staging/lustre/include/linux/libcfs/libcfs_private.h
+++ b/drivers/staging/lustre/include/linux/libcfs/libcfs_private.h
@@ -79,7 +79,7 @@ do { \
#define KLASSERT(e) LASSERT(e)
-void lbug_with_loc(struct libcfs_debug_msg_data *)__attribute__((noreturn));
+void __noreturn lbug_with_loc(struct libcfs_debug_msg_data *);
#define LBUG() \
do { \
diff --git a/drivers/staging/lustre/lustre/libcfs/linux/linux-debug.c b/drivers/staging/lustre/lustre/libcfs/linux/linux-debug.c
index 4545d54..8689ea7 100644
--- a/drivers/staging/lustre/lustre/libcfs/linux/linux-debug.c
+++ b/drivers/staging/lustre/lustre/libcfs/linux/linux-debug.c
@@ -146,7 +146,7 @@ void libcfs_run_lbug_upcall(struct libcfs_debug_msg_data *msgdata)
}
/* coverity[+kill] */
-void lbug_with_loc(struct libcfs_debug_msg_data *msgdata)
+void __noreturn lbug_with_loc(struct libcfs_debug_msg_data *msgdata)
{
libcfs_catastrophe = 1;
libcfs_debug_msg(msgdata, "LBUG\n");
--
2.5.2
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2015-09-17 2:53 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-17 2:51 [PATCH] staging/lustre: use __noreturn for lbug_with_loc Juston Li
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®