From: Colin King <colin.king@canonical.com>
To: Mike Marciniszyn <infinipath@intel.com>,
Doug Ledford <dledford@redhat.com>,
Sean Hefty <sean.hefty@intel.com>,
Hal Rosenstock <hal.rosenstock@gmail.com>,
linux-rdma@vger.kernel.org
Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] IB/qib: remove redundant setting of any in for-loop
Date: Fri, 20 Oct 2017 09:21:03 +0200 [thread overview]
Message-ID: <20171020072103.10337-1-colin.king@canonical.com> (raw)
From: Colin Ian King <colin.king@canonical.com>
The variable all is being set but is never read after this
hence it can be removed from the for loop initialization.
Cleans up clang warning:
drivers/infiniband/hw/qib/qib_file_ops.c:640:7: warning: Value
stored to 'any' is never read
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/infiniband/hw/qib/qib_file_ops.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/infiniband/hw/qib/qib_file_ops.c b/drivers/infiniband/hw/qib/qib_file_ops.c
index 2d6a191afec0..b5c2e4223ee7 100644
--- a/drivers/infiniband/hw/qib/qib_file_ops.c
+++ b/drivers/infiniband/hw/qib/qib_file_ops.c
@@ -637,7 +637,7 @@ static int qib_set_part_key(struct qib_ctxtdata *rcd, u16 key)
ret = -EBUSY;
goto bail;
}
- for (any = i = 0; i < ARRAY_SIZE(ppd->pkeys); i++) {
+ for (i = 0; i < ARRAY_SIZE(ppd->pkeys); i++) {
if (!ppd->pkeys[i] &&
atomic_inc_return(&ppd->pkeyrefs[i]) == 1) {
rcd->pkeys[pidx] = key;
--
2.14.1
next reply other threads:[~2017-10-20 7:21 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-20 7:21 Colin King [this message]
[not found] ` <20171020072103.10337-1-colin.king-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
2017-10-20 7:35 ` [PATCH] IB/qib: remove redundant setting of any in for-loop Joe Perches
2017-11-10 18:00 ` Doug Ledford
2017-11-10 19:07 ` Marciniszyn, Mike
2017-11-13 21:52 ` Doug Ledford
2017-11-14 21:40 ` Marciniszyn, Mike
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=20171020072103.10337-1-colin.king@canonical.com \
--to=colin.king@canonical.com \
--cc=dledford@redhat.com \
--cc=hal.rosenstock@gmail.com \
--cc=infinipath@intel.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=sean.hefty@intel.com \
/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