]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
staging/lustre: use __noreturn for lbug_with_loc
authorJuston Li <juston.h.li@gmail.com>
Thu, 17 Sep 2015 02:51:56 +0000 (19:51 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 17 Sep 2015 04:25:25 +0000 (21:25 -0700)
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/include/linux/libcfs/libcfs_private.h
drivers/staging/lustre/lustre/libcfs/linux/linux-debug.c

index 9544860e32920a851dd35f20757a199ea5346fef..6af733de69caddbf7672b80e75e1827304e7b237 100644 (file)
@@ -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 {                                                               \
index 4545d54f71c6f3d93cbbb6ed3c021ba82d6c483e..8689ea757c99372614524fe708103089470e9e0f 100644 (file)
@@ -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");