* Patch "xprtrdma: Squelch kbuild sparse complaint" has been added to the 4.10-stable tree
@ 2017-03-24 8:31 gregkh
0 siblings, 0 replies; only message in thread
From: gregkh @ 2017-03-24 8:31 UTC (permalink / raw)
To: chuck.lever, Anna.Schumaker, gregkh; +Cc: stable, stable-commits
This is a note to let you know that I've just added the patch titled
xprtrdma: Squelch kbuild sparse complaint
to the 4.10-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
xprtrdma-squelch-kbuild-sparse-complaint.patch
and it can be found in the queue-4.10 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>From eed50879d64ab1b9f76445dbab822e43a098b309 Mon Sep 17 00:00:00 2001
From: Chuck Lever <chuck.lever@oracle.com>
Date: Sat, 11 Mar 2017 15:52:47 -0500
Subject: xprtrdma: Squelch kbuild sparse complaint
From: Chuck Lever <chuck.lever@oracle.com>
commit eed50879d64ab1b9f76445dbab822e43a098b309 upstream.
New complaint from kbuild for 4.9.y:
net/sunrpc/xprtrdma/verbs.c:489:19: sparse: incompatible types in
comparison expression (different type sizes)
verbs.c:
489 max_sge = min(ia->ri_device->attrs.max_sge, RPCRDMA_MAX_SEND_SGES);
I can't reproduce this running sparse here. Likewise, "make W=1
net/sunrpc/xprtrdma/verbs.o" never indicated any issue.
A little poking suggests that because the range of its values is
small, gcc can make the actual width of RPCRDMA_MAX_SEND_SGES
smaller than the width of an unsigned integer.
Fixes: 16f906d66cd7 ("xprtrdma: Reduce required number of send SGEs")
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
net/sunrpc/xprtrdma/verbs.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/net/sunrpc/xprtrdma/verbs.c
+++ b/net/sunrpc/xprtrdma/verbs.c
@@ -495,7 +495,8 @@ rpcrdma_ep_create(struct rpcrdma_ep *ep,
struct ib_cq *sendcq, *recvcq;
int rc;
- max_sge = min(ia->ri_device->attrs.max_sge, RPCRDMA_MAX_SEND_SGES);
+ max_sge = min_t(unsigned int, ia->ri_device->attrs.max_sge,
+ RPCRDMA_MAX_SEND_SGES);
if (max_sge < RPCRDMA_MIN_SEND_SGES) {
pr_warn("rpcrdma: HCA provides only %d send SGEs\n", max_sge);
return -ENOMEM;
Patches currently in stable-queue which might be from chuck.lever@oracle.com are
queue-4.10/xprtrdma-squelch-kbuild-sparse-complaint.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-03-24 8:32 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-24 8:31 Patch "xprtrdma: Squelch kbuild sparse complaint" has been added to the 4.10-stable tree gregkh
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).