Skip to contentSkip to conversation

xprtsock.c: make bc_{malloc/free} static

PATCH In review H Hartley Sweeten 2 participants 2 messages Jan 14, 2010

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xprtsock.c: make bc_{malloc/free} static

xprtsock.c: make bc_{malloc/free} static

The server backchannel buf_alloc and buf_free methods should be static since they are not used outside this file.

Cc J. Bruce Fields <[email protected]>
Cc Neil Brown <[email protected]>
Cc Trond Myklebust <[email protected]>
Cc David S. Miller <[email protected]>

---

net/sunrpc/xprtsock.c +2 -2
index 3d739e5..721bafd 100644
@@ -2100,7 +2100,7 @@ static void xs_tcp_print_stats(struct rpc_xprt *xprt, struct seq_file *seq)
  * we allocate pages instead doing a kmalloc like rpc_malloc is because we want
  * to use the server side send routines.
  */
-void *bc_malloc(struct rpc_task *task, size_t size)
+static void *bc_malloc(struct rpc_task *task, size_t size)
 {
 	struct page *page;
 	struct rpc_buffer *buf;
@@ -2120,7 +2120,7 @@ void *bc_malloc(struct rpc_task *task, size_t size)
 /*
  * Free the space allocated in the bc_alloc routine
  */
-void bc_free(void *buffer)
+static void bc_free(void *buffer)
 {
 	struct rpc_buffer *buf;
 
#1 lore raw
Quoted 27 lines · H Hartley Sweeten

xprtsock.c: make bc_{malloc/free} static

The server backchannel buf_alloc and buf_free methods should be static since they are not used outside this file.

Cc J. Bruce Fields <[email protected]>
Cc Neil Brown <[email protected]>
Cc Trond Myklebust <[email protected]>
Cc David S. Miller <davem-fT/PcQaiUtIeIZ0/[email protected]>

---

net/sunrpc/xprtsock.c +1 -1
index 3d739e5..721bafd 100644
@@ -2100,7 +2100,7 @@ static void xs_tcp_print_stats(struct rpc_xprt *xprt, struct seq_file *seq)
  * we allocate pages instead doing a kmalloc like rpc_malloc is because we want
  * to use the server side send routines.
  */
-void *bc_malloc(struct rpc_task *task, size_t size)
+static void *bc_malloc(struct rpc_task *task, size_t size)
 {
 	struct page *page;
 	struct rpc_buffer *buf;

net/sunrpc/xprtsock.c void *bc_malloc(struct rpc_task *task, size_t size) · line 2126

Quoted 8 lines
net/sunrpc/xprtsock.c +1 -1
@@ -2120,7 +2120,7 @@ void *bc_malloc(struct rpc_task *task, size_t size)
 /*
  * Free the space allocated in the bc_alloc routine
  */
-void bc_free(void *buffer)
+static void bc_free(void *buffer)
 {
 	struct rpc_buffer *buf;
 

Thanks! I'll put this in the sunrpc-for-next branch.

Trond

--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html