lkml.org 
[lkml]   [2015]   [Jun]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 1/1] staging: lustre/lustre/obdclass/llog_cat.c: get rid of sparse context imbalance warning
Date
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 <tolga.ceylan@gmail.com>
---
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


\
 
 \ /
  Last update: 2015-06-02 22:21    [W:0.040 / U:0.212 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site