]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
xprtrdma: Squelch kbuild sparse complaint
authorChuck Lever <chuck.lever@oracle.com>
Sat, 11 Mar 2017 20:52:47 +0000 (15:52 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 26 Mar 2017 11:08:11 +0000 (13:08 +0200)
commita3c7894422c92aa319897da1aad93379556f003e
tree3e53e349617e940c51cc4893b9aab1b9fb7434ef
parent3e037a0fe0b67412eb743c66d22394dca18e6d54
xprtrdma: Squelch kbuild sparse complaint

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