All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch -next] svcrdma: fix a couple warning messages
@ 2016-01-05  9:52 ` Dan Carpenter
  0 siblings, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2016-01-05  9:52 UTC (permalink / raw)
  To: J. Bruce Fields, Chuck Lever
  Cc: Anna Schumaker, Jeff Layton, Ray Jui, Scott Branden, Jon Mason,
	Doug Ledford, Steve Wise, Sagi Grimberg, Michael Wang, linux-nfs,
	kernel-janitors

The WARN_ON_ONCE() macro takes a condition, passing it this string
literal sort of works as intended but it's better to use WARN_ONCE()
instead.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/net/sunrpc/xprtrdma/svc_rdma_transport.c b/net/sunrpc/xprtrdma/svc_rdma_transport.c
index abfbd02..4b397ad 100644
--- a/net/sunrpc/xprtrdma/svc_rdma_transport.c
+++ b/net/sunrpc/xprtrdma/svc_rdma_transport.c
@@ -221,7 +221,7 @@ out_empty:
 	spin_lock_bh(&xprt->sc_ctxt_lock);
 	xprt->sc_ctxt_used--;
 	spin_unlock_bh(&xprt->sc_ctxt_lock);
-	WARN_ON_ONCE("svcrdma: empty RDMA ctxt list?\n");
+	WARN_ONCE(1, "svcrdma: empty RDMA ctxt list?\n");
 	return NULL;
 }
 
@@ -328,7 +328,7 @@ out_empty:
 	if (map)
 		goto out;
 
-	WARN_ON_ONCE("svcrdma: empty request map list?\n");
+	WARN_ONCE(1, "svcrdma: empty request map list?\n");
 	return NULL;
 }
 

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

* [patch -next] svcrdma: fix a couple warning messages
@ 2016-01-05  9:52 ` Dan Carpenter
  0 siblings, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2016-01-05  9:52 UTC (permalink / raw)
  To: J. Bruce Fields, Chuck Lever
  Cc: Anna Schumaker, J. Bruce Fields, Jeff Layton, Ray Jui,
	Scott Branden, Jon Mason, Chuck Lever, Doug Ledford, Steve Wise,
	Sagi Grimberg, Michael Wang, linux-nfs, kernel-janitors

The WARN_ON_ONCE() macro takes a condition, passing it this string
literal sort of works as intended but it's better to use WARN_ONCE()
instead.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/net/sunrpc/xprtrdma/svc_rdma_transport.c b/net/sunrpc/xprtrdma/svc_rdma_transport.c
index abfbd02..4b397ad 100644
--- a/net/sunrpc/xprtrdma/svc_rdma_transport.c
+++ b/net/sunrpc/xprtrdma/svc_rdma_transport.c
@@ -221,7 +221,7 @@ out_empty:
 	spin_lock_bh(&xprt->sc_ctxt_lock);
 	xprt->sc_ctxt_used--;
 	spin_unlock_bh(&xprt->sc_ctxt_lock);
-	WARN_ON_ONCE("svcrdma: empty RDMA ctxt list?\n");
+	WARN_ONCE(1, "svcrdma: empty RDMA ctxt list?\n");
 	return NULL;
 }
 
@@ -328,7 +328,7 @@ out_empty:
 	if (map)
 		goto out;
 
-	WARN_ON_ONCE("svcrdma: empty request map list?\n");
+	WARN_ONCE(1, "svcrdma: empty request map list?\n");
 	return NULL;
 }
 

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

* Re: [patch -next] svcrdma: fix a couple warning messages
  2016-01-05  9:52 ` Dan Carpenter
@ 2016-01-06 15:36   ` Chuck Lever
  -1 siblings, 0 replies; 4+ messages in thread
From: Chuck Lever @ 2016-01-06 15:36 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: J. Bruce Fields, Anna Schumaker, Jeff Layton, Ray Jui,
	Scott Branden, Jon Mason, Doug Ledford, Steve Wise,
	Sagi Grimberg, Michael Wang, Linux NFS Mailing List,
	kernel-janitors


> On Jan 5, 2016, at 4:52 AM, Dan Carpenter <dan.carpenter@oracle.com> wrote:
> 
> The WARN_ON_ONCE() macro takes a condition, passing it this string
> literal sort of works as intended but it's better to use WARN_ONCE()
> instead.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Hi Dan, I have to rebase and resubmit this series anyway.
I've squashed both your fixes into the original patches that
introduced the issues.

Thanks for reporting!


> diff --git a/net/sunrpc/xprtrdma/svc_rdma_transport.c b/net/sunrpc/xprtrdma/svc_rdma_transport.c
> index abfbd02..4b397ad 100644
> --- a/net/sunrpc/xprtrdma/svc_rdma_transport.c
> +++ b/net/sunrpc/xprtrdma/svc_rdma_transport.c
> @@ -221,7 +221,7 @@ out_empty:
> 	spin_lock_bh(&xprt->sc_ctxt_lock);
> 	xprt->sc_ctxt_used--;
> 	spin_unlock_bh(&xprt->sc_ctxt_lock);
> -	WARN_ON_ONCE("svcrdma: empty RDMA ctxt list?\n");
> +	WARN_ONCE(1, "svcrdma: empty RDMA ctxt list?\n");
> 	return NULL;
> }
> 
> @@ -328,7 +328,7 @@ out_empty:
> 	if (map)
> 		goto out;
> 
> -	WARN_ON_ONCE("svcrdma: empty request map list?\n");
> +	WARN_ONCE(1, "svcrdma: empty request map list?\n");
> 	return NULL;
> }
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

--
Chuck Lever





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

* Re: [patch -next] svcrdma: fix a couple warning messages
@ 2016-01-06 15:36   ` Chuck Lever
  0 siblings, 0 replies; 4+ messages in thread
From: Chuck Lever @ 2016-01-06 15:36 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: J. Bruce Fields, Anna Schumaker, Jeff Layton, Ray Jui,
	Scott Branden, Jon Mason, Doug Ledford, Steve Wise,
	Sagi Grimberg, Michael Wang, Linux NFS Mailing List,
	kernel-janitors


> On Jan 5, 2016, at 4:52 AM, Dan Carpenter <dan.carpenter@oracle.com> wrote:
> 
> The WARN_ON_ONCE() macro takes a condition, passing it this string
> literal sort of works as intended but it's better to use WARN_ONCE()
> instead.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Hi Dan, I have to rebase and resubmit this series anyway.
I've squashed both your fixes into the original patches that
introduced the issues.

Thanks for reporting!


> diff --git a/net/sunrpc/xprtrdma/svc_rdma_transport.c b/net/sunrpc/xprtrdma/svc_rdma_transport.c
> index abfbd02..4b397ad 100644
> --- a/net/sunrpc/xprtrdma/svc_rdma_transport.c
> +++ b/net/sunrpc/xprtrdma/svc_rdma_transport.c
> @@ -221,7 +221,7 @@ out_empty:
> 	spin_lock_bh(&xprt->sc_ctxt_lock);
> 	xprt->sc_ctxt_used--;
> 	spin_unlock_bh(&xprt->sc_ctxt_lock);
> -	WARN_ON_ONCE("svcrdma: empty RDMA ctxt list?\n");
> +	WARN_ONCE(1, "svcrdma: empty RDMA ctxt list?\n");
> 	return NULL;
> }
> 
> @@ -328,7 +328,7 @@ out_empty:
> 	if (map)
> 		goto out;
> 
> -	WARN_ON_ONCE("svcrdma: empty request map list?\n");
> +	WARN_ONCE(1, "svcrdma: empty request map list?\n");
> 	return NULL;
> }
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

--
Chuck Lever





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

end of thread, other threads:[~2016-01-06 15:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-05  9:52 [patch -next] svcrdma: fix a couple warning messages Dan Carpenter
2016-01-05  9:52 ` Dan Carpenter
2016-01-06 15:36 ` Chuck Lever
2016-01-06 15:36   ` Chuck Lever

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.