提交 3365776e 编写于 作者: C Colin Ian King 提交者: Jason Gunthorpe

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: NMike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: NColin Ian King <colin.king@canonical.com>
Signed-off-by: NMike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: NJason Gunthorpe <jgg@mellanox.com>
上级 87b3524c
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册