Linux NFS development
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: chuck.lever@oracle.com
Cc: linux-nfs@vger.kernel.org
Subject: [bug report] svcrdma: Allocate recv_ctxt's on CPU handling Receives
Date: Mon, 14 May 2018 12:12:52 +0300	[thread overview]
Message-ID: <20180514091251.GA25443@mwanda> (raw)

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

                 reply	other threads:[~2018-05-14  9:12 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180514091251.GA25443@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=chuck.lever@oracle.com \
    --cc=linux-nfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox