From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753139AbbIQCxd (ORCPT ); Wed, 16 Sep 2015 22:53:33 -0400 Received: from mail-pa0-f51.google.com ([209.85.220.51]:35608 "EHLO mail-pa0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752743AbbIQCxc (ORCPT ); Wed, 16 Sep 2015 22:53:32 -0400 From: Juston Li To: oleg.drokin@intel.com, andreas.dilger@intel.com, gregkh@linuxfoundation.org Cc: linux-kernel@vger.kernel.org, devel@driverdev.osuosl.org, HPDD-discuss@ml01.01.org Subject: [PATCH] staging/lustre: use __noreturn for lbug_with_loc Date: Wed, 16 Sep 2015 19:51:56 -0700 Message-Id: <1442458316-11740-1-git-send-email-juston.h.li@gmail.com> X-Mailer: git-send-email 2.5.2 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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