Skip to contentSkip to conversation

Staging: lustre: Remove extern in .c file

PATCH Superseded Haneen Mohammed 2 participants 3 messages Mar 2, 2015 – Mar 21, 2015 Staging

lore
Share & tools
lore
#0 lore raw

PATCH v4 1/1 Staging: lustre: Remove extern in .c file

This patch removes extern from .c file; for The variable is not used anywhere else in the file.
Issue addressed by checkpatch.pl.

---
v4: remove extern declaration from .h

 drivers/staging/lustre/lustre/ldlm/ldlm_pool.c | 2 --
 1 file changed, 2 deletions(-)
drivers/staging/lustre/lustre/ldlm/ldlm_pool.c +0 -2
index d20d277..3d264e9 100644
@@ -141,8 +141,6 @@
  */
 #define LDLM_POOL_SLV_SHIFT (10)
 
-extern struct proc_dir_entry *ldlm_ns_proc_dir;
-
 static inline __u64 dru(__u64 val, __u32 shift, int round_up)
 {
 	return (val + (round_up ? (1 << shift) - 1 : 0)) >> shift;
Signature · 1 line
1.9.1
maintainer
#1 lore raw
Quoted 16 lines · Haneen Mohammed

This patch removes extern from .c file; for The variable is not used anywhere else in the file.
Issue addressed by checkpatch.pl.

---
v4: remove extern declaration from .h

 drivers/staging/lustre/lustre/ldlm/ldlm_pool.c | 2 --
 1 file changed, 2 deletions(-)
drivers/staging/lustre/lustre/ldlm/ldlm_pool.c +0 -0
index d20d277..3d264e9 100644

drivers/staging/lustre/lustre/ldlm/ldlm_pool.c line 146

Quoted 8 lines
drivers/staging/lustre/lustre/ldlm/ldlm_pool.c +0 -2
@@ -141,8 +141,6 @@
  */
 #define LDLM_POOL_SLV_SHIFT (10)
 
-extern struct proc_dir_entry *ldlm_ns_proc_dir;
-
 static inline __u64 dru(__u64 val, __u32 shift, int round_up)
 {
 	return (val + (round_up ? (1 << shift) - 1 : 0)) >> shift;

Please also mark it static in the one file it is in in the same patch.

thanks,

greg k-h

#2 lore raw

PATCH v5 1/1 Staging: lustre: remove extern in .c file

This patch removes extern from .c file; for the variable is not used anywhere else in the file.
In addition, it mark it static in the one file it is in "ldlm_resource.c".

---
v5: mark struct as static
v4: remove extern instead of adding its declaration to .h

 drivers/staging/lustre/lustre/ldlm/ldlm_pool.c     | 2 --
 drivers/staging/lustre/lustre/ldlm/ldlm_resource.c | 2 +-
 2 files changed, 1 insertion(+), 3 deletions(-)
drivers/staging/lustre/lustre/ldlm/ldlm_pool.c +0 -2
index 7574502..a9f4833 100644
@@ -141,8 +141,6 @@
  */
 #define LDLM_POOL_SLV_SHIFT (10)
 
-extern struct proc_dir_entry *ldlm_ns_proc_dir;
-
 static inline __u64 dru(__u64 val, __u32 shift, int round_up)
 {
 	return (val + (round_up ? (1 << shift) - 1 : 0)) >> shift;
drivers/staging/lustre/lustre/ldlm/ldlm_resource.c +1 -1
index c6f62a9..f750d42 100644
@@ -62,7 +62,7 @@ LIST_HEAD(ldlm_cli_active_namespace_list);
 LIST_HEAD(ldlm_cli_inactive_namespace_list);
 
 struct proc_dir_entry *ldlm_type_proc_dir = NULL;
-struct proc_dir_entry *ldlm_ns_proc_dir = NULL;
+static struct proc_dir_entry *ldlm_ns_proc_dir = NULL;
 struct proc_dir_entry *ldlm_svc_proc_dir = NULL;
 
 extern unsigned int ldlm_cancel_unused_locks_before_replay;
Signature · 1 line
1.9.1