Skip to contentSkip to conversation

STAGING: Delare request_cache as static for drivers/staging/lustre/lustre/ptlrpc/client.c

PATCH In review Simon Guo 2 participants 2 messages May 27, 2015 – May 30, 2015 Staging

lore
Share & tools
lore

Simon Guo

author
#0 lore raw

PATCH 1/1 STAGING: Delare request_cache as static for drivers/staging/lustre/lustre/ptlrpc/client.c

Delare request_cache variable as static. It is only used by drivers/staging/lustre/lustre/ptlrpc/client.c, and its naming is common which will lead to namespace pollution.

---
 drivers/staging/lustre/lustre/ptlrpc/client.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/lustre/lustre/ptlrpc/client.c +1 -1
index 45b7af7..347110e 100644
@@ -390,7 +390,7 @@ static int ptlrpc_at_recv_early_reply(struct ptlrpc_request *req)
 	return rc;
 }
 
-struct kmem_cache *request_cache;
+static struct kmem_cache *request_cache;
 
 int ptlrpc_request_cache_init(void)
 {
Signature · 1 line
1.8.1.2
#1 lore raw
Quoted 1 line · Simon Guo

Delare request_cache variable as static.

Is it Declare?

regards
sudip