2020-04-23 07:06:12

by Zou Wei

[permalink] [raw]
Subject: [PATCH -next] xprtrdma: Make xprt_rdma_slot_table_entries static

Fix the following sparse warning:

net/sunrpc/xprtrdma/transport.c:71:14: warning: symbol 'xprt_rdma_slot_table_entries'
was not declared. Should it be static?

Reported-by: Hulk Robot <[email protected]>
Signed-off-by: Zou Wei <[email protected]>
---
net/sunrpc/xprtrdma/transport.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/sunrpc/xprtrdma/transport.c b/net/sunrpc/xprtrdma/transport.c
index 659da37..9f2e8f5 100644
--- a/net/sunrpc/xprtrdma/transport.c
+++ b/net/sunrpc/xprtrdma/transport.c
@@ -68,7 +68,7 @@
* tunables
*/

-unsigned int xprt_rdma_slot_table_entries = RPCRDMA_DEF_SLOT_TABLE;
+static unsigned int xprt_rdma_slot_table_entries = RPCRDMA_DEF_SLOT_TABLE;
unsigned int xprt_rdma_max_inline_read = RPCRDMA_DEF_INLINE;
unsigned int xprt_rdma_max_inline_write = RPCRDMA_DEF_INLINE;
unsigned int xprt_rdma_memreg_strategy = RPCRDMA_FRWR;
--
2.6.2


2020-04-23 14:45:15

by Chuck Lever

[permalink] [raw]
Subject: Re: [PATCH -next] xprtrdma: Make xprt_rdma_slot_table_entries static



> On Apr 23, 2020, at 3:10 AM, Zou Wei <[email protected]> wrote:
>
> Fix the following sparse warning:
>
> net/sunrpc/xprtrdma/transport.c:71:14: warning: symbol 'xprt_rdma_slot_table_entries'
> was not declared. Should it be static?
>
> Reported-by: Hulk Robot <[email protected]>
> Signed-off-by: Zou Wei <[email protected]>

Reviewed-by: Chuck Lever <[email protected]>

> ---
> net/sunrpc/xprtrdma/transport.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/net/sunrpc/xprtrdma/transport.c b/net/sunrpc/xprtrdma/transport.c
> index 659da37..9f2e8f5 100644
> --- a/net/sunrpc/xprtrdma/transport.c
> +++ b/net/sunrpc/xprtrdma/transport.c
> @@ -68,7 +68,7 @@
> * tunables
> */
>
> -unsigned int xprt_rdma_slot_table_entries = RPCRDMA_DEF_SLOT_TABLE;
> +static unsigned int xprt_rdma_slot_table_entries = RPCRDMA_DEF_SLOT_TABLE;
> unsigned int xprt_rdma_max_inline_read = RPCRDMA_DEF_INLINE;
> unsigned int xprt_rdma_max_inline_write = RPCRDMA_DEF_INLINE;
> unsigned int xprt_rdma_memreg_strategy = RPCRDMA_FRWR;
> --
> 2.6.2

--
Chuck Lever