* [bug report] svcrdma: Allocate recv_ctxt's on CPU handling Receives
@ 2018-05-14 9:12 Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2018-05-14 9:12 UTC (permalink / raw)
To: chuck.lever; +Cc: linux-nfs
Hello Chuck Lever,
The patch 0b2613c5883f: "svcrdma: Allocate recv_ctxt's on CPU
handling Receives" from May 7, 2018, leads to the following static
checker warning:
net/sunrpc/xprtrdma/svc_rdma_recvfrom.c:273 svc_rdma_post_recvs()
warn: signedness bug returning '(-12)'
net/sunrpc/xprtrdma/svc_rdma_recvfrom.c
258 /**
259 * svc_rdma_post_recvs - Post initial set of Recv WRs
260 * @rdma: fresh svcxprt_rdma
261 *
262 * Returns true if successful, otherwise false.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
263 */
264 bool svc_rdma_post_recvs(struct svcxprt_rdma *rdma)
265 {
266 struct svc_rdma_recv_ctxt *ctxt;
267 unsigned int i;
268 int ret;
269
270 for (i = 0; i < rdma->sc_max_requests; i++) {
271 ctxt = svc_rdma_recv_ctxt_get(rdma);
272 if (!ctxt)
273 return -ENOMEM;
^^^^^^^^^^^^^^^
274 ctxt->rc_temp = true;
275 ret = __svc_rdma_post_recv(rdma, ctxt);
276 if (ret) {
277 pr_err("svcrdma: failure posting recv buffers: %d\n",
278 ret);
279 return false;
280 }
281 }
282 return true;
283 }
regards,
dan carpenter
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2018-05-14 9:12 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-05-14 9:12 [bug report] svcrdma: Allocate recv_ctxt's on CPU handling Receives Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox