From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752117AbbFBT6d (ORCPT ); Tue, 2 Jun 2015 15:58:33 -0400 Received: from mail-wg0-f49.google.com ([74.125.82.49]:33086 "EHLO mail-wg0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751324AbbFBT6Z (ORCPT ); Tue, 2 Jun 2015 15:58:25 -0400 From: Tolga Ceylan To: Oleg Drokin , Andreas Dilger , Greg Kroah-Hartman , Julia Lawall , Greg Donald , Joe Perches , Darshana Padmadas , Arjun AK , Tolga Ceylan , HPDD-discuss@ml01.01.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/1] staging: lustre/lustre/obdclass/llog_cat.c: get rid of sparse context imbalance warning Date: Tue, 2 Jun 2015 12:57:20 -0700 Message-Id: <1433275040-23345-1-git-send-email-tolga.ceylan@gmail.com> X-Mailer: git-send-email 2.4.2 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In llog_cat_new_log(), sparse emits a context imbalance (unexpected lock) warning due its inability to detect the noreturn attribute in lbug_with_lock() function inside LBUG macro. Adding a never reached return statement suppresses this warning. Signed-off-by: Tolga Ceylan --- drivers/staging/lustre/lustre/obdclass/llog_cat.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/lustre/lustre/obdclass/llog_cat.c b/drivers/staging/lustre/lustre/obdclass/llog_cat.c index c8f6ab0..259947c 100644 --- a/drivers/staging/lustre/lustre/obdclass/llog_cat.c +++ b/drivers/staging/lustre/lustre/obdclass/llog_cat.c @@ -108,6 +108,7 @@ static int llog_cat_new_log(const struct lu_env *env, index); spin_unlock(&loghandle->lgh_hdr_lock); LBUG(); /* should never happen */ + return -EINVAL; } spin_unlock(&loghandle->lgh_hdr_lock); -- 2.4.2