Linux-NFS Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH next] xprtrdma: make the symbol 'xprt_rdma_slot_table_entries' static
@ 2020-02-10  7:39 Chen Wandun
  2020-02-10 16:08 ` Chuck Lever
  0 siblings, 1 reply; 2+ messages in thread
From: Chen Wandun @ 2020-02-10  7:39 UTC (permalink / raw)
  To: bfields, chuck.lever, trond.myklebust, Anna.Schumaker, davem,
	kuba, linux-nfs, netdev, linux-kernel
  Cc: chenwandun

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?

Fixes: 86c4ccd9b92b ("xprtrdma: Eliminate struct rpcrdma_create_data_internal")
Signed-off-by: Chen Wandun <chenwandun@huawei.com>
---
 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 3cfeba68ee9a..14c2a852d2a1 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.17.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH next] xprtrdma: make the symbol 'xprt_rdma_slot_table_entries' static
  2020-02-10  7:39 [PATCH next] xprtrdma: make the symbol 'xprt_rdma_slot_table_entries' static Chen Wandun
@ 2020-02-10 16:08 ` Chuck Lever
  0 siblings, 0 replies; 2+ messages in thread
From: Chuck Lever @ 2020-02-10 16:08 UTC (permalink / raw)
  To: Chen Wandun
  Cc: Bruce Fields, trond.myklebust, Anna Schumaker, davem, kuba,
	Linux NFS Mailing List, netdev, linux-kernel

Hi-

The Fixes: tag seems incorrect to me.


> On Feb 10, 2020, at 2:39 AM, Chen Wandun <chenwandun@huawei.com> 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?
> 
> Fixes: 86c4ccd9b92b ("xprtrdma: Eliminate struct rpcrdma_create_data_internal")

86c4ccd9b92b correctly makes xprt_rdma_slot_table_entries a
global variable. This later commit (in v5.6-rc1)

7581d90109ca ("xprtrdma: Refactor initialization of ep->rep_max_requests")

should have changed xprt_rdma_slot_table_entries back to a static.

I'm not sure what the call is on sparse warnings these days, but
it doesn't seem like this clean up should be backported to stable. 
Should Fixes: be removed?


> Signed-off-by: Chen Wandun <chenwandun@huawei.com>
> ---
> 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 3cfeba68ee9a..14c2a852d2a1 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.17.1

--
Chuck Lever




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-10  7:39 [PATCH next] xprtrdma: make the symbol 'xprt_rdma_slot_table_entries' static Chen Wandun
2020-02-10 16:08 ` Chuck Lever

Linux-NFS Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-nfs/0 linux-nfs/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-nfs linux-nfs/ https://lore.kernel.org/linux-nfs \
		linux-nfs@vger.kernel.org
	public-inbox-index linux-nfs

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-nfs


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git