]> git.baikalelectronics.ru Git - kernel.git/commit
xprtrdma: Squelch kbuild sparse complaint
authorChuck Lever <chuck.lever@oracle.com>
Sat, 11 Mar 2017 20:52:47 +0000 (15:52 -0500)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Fri, 17 Mar 2017 20:05:21 +0000 (16:05 -0400)
commite18f211a0b4cfb8eb8bbad4e18bcf26c677f4305
treecb181cacb1db41a477d5bf190e6290ab03d88662
parent3694320313237249da7181924d24e86a4319d581
xprtrdma: Squelch kbuild sparse complaint

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: 729f74920478 ("xprtrdma: Reduce required number of send SGEs")
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Cc: stable@kernel.org
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
net/sunrpc/xprtrdma/verbs.c