Skip to contentSkip to conversation

staging: lustre: Make cfs_sched_rehash static

PATCH In review Nickolaus Woodruff 3 participants 3 messages Apr 7, 2015 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: lustre: Make cfs_sched_rehash static

This patch fixes the following sparse warning:

CHECK drivers/staging/lustre/lustre/libcfs/hash.c
drivers/staging/lustre/lustre/libcfs/hash.c:119:21: warning: symbol 'cfs_sched_rehash' was not declared. Should it be static?

---
 drivers/staging/lustre/lustre/libcfs/hash.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/lustre/lustre/libcfs/hash.c +1 -1
index a55567e..a4920a2 100644
@@ -116,7 +116,7 @@ module_param(warn_on_depth, uint, 0644);
 MODULE_PARM_DESC(warn_on_depth, "warning when hash depth is high.");
 #endif
 
-struct cfs_wi_sched *cfs_sched_rehash;
+static struct cfs_wi_sched *cfs_sched_rehash;
 
 static inline void
 cfs_hash_nl_lock(union cfs_hash_lock *lock, int exclusive) {}

--
1.9.1

#1 lore raw
Quoted 5 lines · Nickolaus Woodruff

This patch fixes the following sparse warning:

CHECK drivers/staging/lustre/lustre/libcfs/hash.c
drivers/staging/lustre/lustre/libcfs/hash.c:119:21: warning: symbol 'cfs_sched_rehash' was not declared. Should it be static?

you have not build tested your patch.
WARNING: "cfs_sched_rehash" [drivers/staging/lustre/lustre/libcfs/libcfs.ko] undefined!

it has been used in lustre/lustre/libcfs/module.c

regards
sudip

Quoted 1 line
#2 lore raw
In reply to Nickolaus Woodruff

If you checked the code, you would see that it's used in drivers/staging/lustre/lustre/libcfs/module.c too.

drivers/staging/lustre/lustre/libcfs/module.c:extern struct cfs_wi_sched *cfs_sched_rehash;
drivers/staging/lustre/lustre/libcfs/module.c: rc, &cfs_sched_rehash);
drivers/staging/lustre/lustre/libcfs/module.c: if (cfs_sched_rehash != NULL) {
drivers/staging/lustre/lustre/libcfs/module.c: cfs_wi_sched_destroy(cfs_sched_rehash);
drivers/staging/lustre/lustre/libcfs/module.c: cfs_sched_rehash = NULL;

Quoted 31 lines · Nickolaus Woodruff

This patch fixes the following sparse warning:

CHECK drivers/staging/lustre/lustre/libcfs/hash.c
drivers/staging/lustre/lustre/libcfs/hash.c:119:21: warning: symbol 'cfs_sched_rehash' was not declared. Should it be static?

---
drivers/staging/lustre/lustre/libcfs/hash.c | 2 +-

1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/lustre/lustre/libcfs/hash.c +1 -1
index a55567e..a4920a2 100644
@@ -116,7 +116,7 @@ module_param(warn_on_depth, uint, 0644);
 MODULE_PARM_DESC(warn_on_depth, "warning when hash depth is high.");
 #endif
 
-struct cfs_wi_sched *cfs_sched_rehash;
+static struct cfs_wi_sched *cfs_sched_rehash;
 

static inline void
cfs_hash_nl_lock(union cfs_hash_lock *lock, int exclusive) {} --
1.9.1

_______________________________________________
HPDD-discuss mailing list
[email protected]
https://lists.01.org/mailman/listinfo/hpdd-discuss