diff options
author | Colin Ian King <colin.king@canonical.com> | 2017-11-14 16:29:36 -0500 |
---|---|---|
committer | Jason Gunthorpe <jgg@mellanox.com> | 2017-12-11 16:19:41 -0700 |
commit | 3365776ebf6a21d7c4036125fd59b01efc1c060b (patch) | |
tree | f55b2523eff6f37bc161b78cee51a9200aafcf2d /drivers/infiniband/hw/qib | |
parent | 87b3524cb5058fdc7c2afdb92bdb2e079661ddc4 (diff) | |
download | lwn-3365776ebf6a21d7c4036125fd59b01efc1c060b.tar.gz lwn-3365776ebf6a21d7c4036125fd59b01efc1c060b.zip |
IB/qib: remove redundant setting of any in for-loop
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
Tested-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'drivers/infiniband/hw/qib')
-rw-r--r-- | drivers/infiniband/hw/qib/qib_file_ops.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; |