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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, May 10, 2018 at 10:21:05AM -0400, Chuck Lever wrote:
> 
> 
> > On May 9, 2018, at 8:42 PM, Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx> wrote:
> > 
> > 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?

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.

diff --git a/net/sunrpc/xprtrdma/svc_rdma_transport.c b/net/sunrpc/xprtrdma/svc_rdma_transport.c
index ca9001d73456..05edb18f8ca3 100644
--- a/net/sunrpc/xprtrdma/svc_rdma_transport.c
+++ b/net/sunrpc/xprtrdma/svc_rdma_transport.c
@@ -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;
--
To unsubscribe from this list: send the line "unsubscribe linux-next" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel]     [Linux USB Development]     [Yosemite News]     [Linux SCSI]

  Powered by Linux