Skip to contentSkip to conversation

staging/lustre: use __noreturn for lbug_with_loc

PATCH New Juston Li 1 participant 1 message Sep 17, 2015 Staging

lore
Share & tools
lore

Juston Li

author
#0 lore raw

PATCH 1/1 staging/lustre: use __noreturn for lbug_with_loc

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.

---
 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(-)
drivers/staging/lustre/include/linux/libcfs/libcfs_private.h +1 -1
index 9544860..6af733d 100644
@@ -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 {								    \
drivers/staging/lustre/lustre/libcfs/linux/linux-debug.c +1 -1
index 4545d54..8689ea7 100644
@@ -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");
Signature · 1 line
2.5.2