Skip to contentSkip to conversation

staging: lustre: lnet: lnet: lip-ptl:fix sparse warning of static declaration

PATCH In review Mohammad Jamal 2 participants 2 messages Feb 9, 2015 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: lustre: lnet: lnet: lip-ptl:fix sparse warning of static declaration

This patch adds a static keyword to variable portal_rotor to suppress the sparse warning of static declaration

---
 drivers/staging/lustre/lnet/lnet/lib-ptl.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/lustre/lnet/lnet/lib-ptl.c +1 -1
index 19ed696..6652036 100644
@@ -39,7 +39,7 @@
 #include "../../include/linux/lnet/lib-lnet.h"
 
 /* NB: add /proc interfaces in upcoming patches */
-int	portal_rotor	= LNET_PTL_ROTOR_HASH_RT;
+static int	portal_rotor	= LNET_PTL_ROTOR_HASH_RT;
 module_param(portal_rotor, int, 0644);
 MODULE_PARM_DESC(portal_rotor, "redirect PUTs to different cpu-partitions");
 
Signature · 1 line
1.7.9.5
#1 lore raw
Quoted 2 lines · Mohammad Jamal

This patch adds a static keyword to variable portal_rotor to suppress the sparse warning of static declaration

Do please compile the subsystem before sending patches.

drivers/staging/lustre/lnet/lnet/lib-ptl.c

Quoted 1 line
drivers/staging/lustre/lnet/lnet/lib-ptl.c +0 -0

[]

drivers/staging/lustre/lnet/lnet/lib-ptl.c line 44

Quoted 8 lines
drivers/staging/lustre/lnet/lnet/lib-ptl.c +1 -1
@@ -39,7 +39,7 @@
 #include "../../include/linux/lnet/lib-lnet.h"
 
 /* NB: add /proc interfaces in upcoming patches */
-int	portal_rotor	= LNET_PTL_ROTOR_HASH_RT;
+static int	portal_rotor	= LNET_PTL_ROTOR_HASH_RT;
 module_param(portal_rotor, int, 0644);
 MODULE_PARM_DESC(portal_rotor, "redirect PUTs to different cpu-partitions");
$ git grep -w portal_rotor
...
drivers/staging/lustre/lnet/lnet/router_proc.c:extern int portal_rotor;