Skip to contentSkip to conversation

linux-next: build warning after merge of the nfsd tree

DISCUSSION Stephen Rothwell 3 participants 4 messages May 10, 2018

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

Hi all,

After merging the nfsd tree, today's linux-next build (powerpc ppc64_defconfig) produced this warning:

net/sunrpc/xprtrdma/svc_rdma_transport.c: In function 'rdma_listen_handler':
net/sunrpc/xprtrdma/svc_rdma_transport.c:299:23: warning: unused variable 'rdma' [-Wunused-variable]

  struct svcxprt_rdma *rdma = cma_id->context;
                       ^~~~

Introduced by commit

d1ab72afe681 ("svcrdma: Trace key RDMA API events")

Signature · 2 lines
Cheers,
Stephen Rothwell
#1 lore raw
Quoted 13 lines · Stephen Rothwell

Hi all,

After merging the nfsd tree, today's linux-next build (powerpc ppc64_defconfig) produced this warning:

net/sunrpc/xprtrdma/svc_rdma_transport.c: In function 'rdma_listen_handler':
net/sunrpc/xprtrdma/svc_rdma_transport.c:299:23: warning: unused variable 'rdma' [-Wunused-variable]

 struct svcxprt_rdma *rdma = cma_id->context;
                      ^~~~

Needs to be wrapped with "#if IS_ENABLED(CONFIG_SUNRPC_DEBUG)" Would you like me to send a patch?

Quoted 3 lines

Introduced by commit

d1ab72afe681 ("svcrdma: Trace key RDMA API events")

--
Chuck Lever

#2 lore raw
Quoted 9 lines · Chuck Lever
Quoted 9 lines · Stephen Rothwell

Hi all,

After merging the nfsd tree, today's linux-next build (powerpc ppc64_defconfig) produced this warning:

Quoted 7 lines
Quoted 4 lines

net/sunrpc/xprtrdma/svc_rdma_transport.c: In function 'rdma_listen_handler':
net/sunrpc/xprtrdma/svc_rdma_transport.c:299:23: warning: unused variable 'rdma' [-Wunused-variable]

 struct svcxprt_rdma *rdma = cma_id->context;
                      ^~~~

Needs to be wrapped with "#if IS_ENABLED(CONFIG_SUNRPC_DEBUG)" Would you like me to send a patch?

Any objection to saving the #if and just going back to writing out cma_id->context there?

I've done that in my tree.

--b.

net/sunrpc/xprtrdma/svc_rdma_transport.c +1 -2
index ca9001d73456..05edb18f8ca3 100644
@@ -544,7 +544,6 @@ static int rdma_listen_handler(struct rdma_cm_id *cma_id,
 			       struct rdma_cm_event *event)
 {
 	struct sockaddr *sap = (struct sockaddr *)&cma_id->route.addr.src_addr;
-	struct svcxprt_rdma *rdma = cma_id->context;
 	int ret = 0;
 
 	trace_svcrdma_cm_event(event, sap);
@@ -552,7 +551,7 @@ static int rdma_listen_handler(struct rdma_cm_id *cma_id,
 	switch (event->event) {
 	case RDMA_CM_EVENT_CONNECT_REQUEST:
 		dprintk("svcrdma: Connect request on cma_id=%p, xprt = %p, "
-			"event = %s (%d)\n", cma_id, rdma,
+			"event = %s (%d)\n", cma_id, cma_id->context,
 			rdma_event_msg(event->event), event->event);
 		handle_connect_req(cma_id, &event->param.conn);
 		break;
#3 lore raw
Quoted 19 lines · Bruce Fields
Quoted 14 lines · Chuck Lever
Quoted 13 lines · Stephen Rothwell

Hi all,

After merging the nfsd tree, today's linux-next build (powerpc ppc64_defconfig) produced this warning:

net/sunrpc/xprtrdma/svc_rdma_transport.c: In function 'rdma_listen_handler':
net/sunrpc/xprtrdma/svc_rdma_transport.c:299:23: warning: unused variable 'rdma' [-Wunused-variable]

struct svcxprt_rdma *rdma = cma_id->context;
                     ^~~~
Quoted 5 lines
Quoted 2 lines

Needs to be wrapped with "#if IS_ENABLED(CONFIG_SUNRPC_DEBUG)" Would you like me to send a patch?

Any objection to saving the #if and just going back to writing out cma_id->context there?

LGTM

That's not really very useful information anyway, but I decided to leave this stuff mostly as-is for now. I plan to do something to fix races between disconnect and device removal at some point.

Quoted 17 lines

I've done that in my tree.

--b.

net/sunrpc/xprtrdma/svc_rdma_transport.c +0 -1
index ca9001d73456..05edb18f8ca3 100644
@@ -544,7 +544,6 @@ static int rdma_listen_handler(struct rdma_cm_id *cma_id,
 			       struct rdma_cm_event *event)
 {
 	struct sockaddr *sap = (struct sockaddr *)&cma_id->route.addr.src_addr;
-	struct svcxprt_rdma *rdma = cma_id->context;
 	int ret = 0;
 
 	trace_svcrdma_cm_event(event, sap);

net/sunrpc/xprtrdma/svc_rdma_transport.c static int rdma_listen_handler(struct rdma_cm_id *cma_id, · line 557

Quoted 8 lines
net/sunrpc/xprtrdma/svc_rdma_transport.c +1 -1
@@ -552,7 +551,7 @@ static int rdma_listen_handler(struct rdma_cm_id *cma_id,
 	switch (event->event) {
 	case RDMA_CM_EVENT_CONNECT_REQUEST:
 		dprintk("svcrdma: Connect request on cma_id=%p, xprt = %p, "
-			"event = %s (%d)\n", cma_id, rdma,
+			"event = %s (%d)\n", cma_id, cma_id->context,
 			rdma_event_msg(event->event), event->event);
 		handle_connect_req(cma_id, &event->param.conn);
 		break;

--
Chuck Lever