From: Dan Carpenter <dan.carpenter@oracle.com>
To: gi-oh.kim@cloud.ionos.com
Cc: linux-rdma@vger.kernel.org
Subject: [bug report] block/rnbd-clt: Support polling mode for IO latency optimization
Date: Wed, 21 Apr 2021 12:07:53 +0300 [thread overview]
Message-ID: <YH/rabHwkA8UgzH1@mwanda> (raw)
Hello Gioh Kim,
The patch fa607fcb87f6: "block/rnbd-clt: Support polling mode for IO
latency optimization" from Apr 19, 2021, leads to the following
static checker warning:
drivers/infiniband/ulp/rtrs/rtrs-clt.c:2998 rtrs_clt_rdma_cq_direct()
error: uninitialized symbol 'cnt'.
drivers/infiniband/ulp/rtrs/rtrs-clt.c
2977 int rtrs_clt_rdma_cq_direct(struct rtrs_clt *clt, unsigned int index)
2978 {
2979 int cnt;
What about if no sessions are connected?
2980 struct rtrs_con *con;
2981 struct rtrs_clt_sess *sess;
2982 struct path_it it;
2983
2984 rcu_read_lock();
2985 for (path_it_init(&it, clt);
2986 (sess = it.next_path(&it)) && it.i < it.clt->paths_num; it.i++) {
2987 if (READ_ONCE(sess->state) != RTRS_CLT_CONNECTED)
2988 continue;
2989
2990 con = sess->s.con[index + 1];
2991 cnt = ib_process_cq_direct(con->cq, -1);
2992 if (cnt)
2993 break;
I don't know any of this code but I would have expect use to add up
cnt for the whole loop... Something like:
ret = ib_process_cq_direct(con->cq, -1);
if (ret < 0)
break;
cnt += ret;
2994 }
2995 path_it_deinit(&it);
2996 rcu_read_unlock();
2997
2998 return cnt;
if (ret < 0)
return ret;
return cnt;
2999 }
regards,
dan carpenter
next reply other threads:[~2021-04-21 9:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-21 9:07 Dan Carpenter [this message]
2021-04-22 9:58 ` [bug report] block/rnbd-clt: Support polling mode for IO latency optimization Jack Wang
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=YH/rabHwkA8UgzH1@mwanda \
--to=dan.carpenter@oracle.com \
--cc=gi-oh.kim@cloud.ionos.com \
--cc=linux-rdma@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