Skip to contentSkip to conversation

lustre: obdclass: fix sparse warning

PATCH In review Paul Davies C 2 participants 2 messages Nov 1, 2015 – Nov 7, 2015 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 lustre: obdclass: fix sparse warning

Fix the following warning given by sparse:

drivers/staging/lustre/lustre/obdclass/cl_lock.c:690:5: warning: symbol 'cl_lock_mutex_try' was not declared. Should it be static?

---
 drivers/staging/lustre/lustre/obdclass/cl_lock.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/lustre/lustre/obdclass/cl_lock.c +1 -1
index 5621beb..6f83452 100644
@@ -687,7 +687,7 @@ EXPORT_SYMBOL(cl_lock_mutex_get);
  *
  * \see cl_lock_mutex_get()
  */
-int cl_lock_mutex_try(const struct lu_env *env, struct cl_lock *lock)
+static int cl_lock_mutex_try(const struct lu_env *env, struct cl_lock *lock)
 {
 	int result;
 
Signature · 1 line
1.9.1
maintainer
#1 lore raw
Quoted 14 lines · Paul Davies C

Fix the following warning given by sparse:

drivers/staging/lustre/lustre/obdclass/cl_lock.c:690:5: warning: symbol 'cl_lock_mutex_try' was not declared. Should it be static?

---
 drivers/staging/lustre/lustre/obdclass/cl_lock.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/lustre/lustre/obdclass/cl_lock.c +0 -0
index 5621beb..6f83452 100644

drivers/staging/lustre/lustre/obdclass/cl_lock.c EXPORT_SYMBOL(cl_lock_mutex_get); · line 693

Quoted 8 lines
drivers/staging/lustre/lustre/obdclass/cl_lock.c +1 -1
@@ -687,7 +687,7 @@ EXPORT_SYMBOL(cl_lock_mutex_get);
  *
  * \see cl_lock_mutex_get()
  */
-int cl_lock_mutex_try(const struct lu_env *env, struct cl_lock *lock)
+static int cl_lock_mutex_try(const struct lu_env *env, struct cl_lock *lock)
 {
 	int result;
 

Someone did this before you did, sorry :(