diff options
| author | Yang Li <[email protected]> | 2021-04-29 10:42:20 +0000 |
|---|---|---|
| committer | Jason Gunthorpe <[email protected]> | 2021-04-30 13:58:15 +0000 |
| commit | 6da7bda36388ae00822f732c11febfe2ebbb5544 (patch) | |
| tree | 7f6f69ab1caecfc3fec871ea04b793313f5a2467 | |
| parent | RDMA/nldev: Add copy-on-fork attribute to get sys command (diff) | |
| download | kernel-6da7bda36388ae00822f732c11febfe2ebbb5544.tar.gz kernel-6da7bda36388ae00822f732c11febfe2ebbb5544.zip | |
IB/qib: Remove redundant assignment to ret
Variable 'ret' is set to zero but this value is never read as it is
overwritten with a new value later on, hence it is a redundant assignment
and can be removed.
Clean up the following clang-analyzer warning:
drivers/infiniband/hw/qib/qib_sd7220.c:690:2: warning: Value stored to
'ret' is never read [clang-analyzer-deadcode.DeadStores]
Link: https://lore.kernel.org/r/[email protected]
Reported-by: Abaci Robot <[email protected]>
Signed-off-by: Yang Li <[email protected]>
Signed-off-by: Jason Gunthorpe <[email protected]>
| -rw-r--r-- | drivers/infiniband/hw/qib/qib_sd7220.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/qib/qib_sd7220.c b/drivers/infiniband/hw/qib/qib_sd7220.c index 4f4a09c2dbcd..81b810d006c0 100644 --- a/drivers/infiniband/hw/qib/qib_sd7220.c +++ b/drivers/infiniband/hw/qib/qib_sd7220.c @@ -687,7 +687,6 @@ static int qib_sd7220_reg_mod(struct qib_devdata *dd, int sdnum, u32 loc, spin_unlock_irqrestore(&dd->cspec->sdepb_lock, flags); return -1; } - ret = 0; for (tries = EPB_TRANS_TRIES; tries; --tries) { transval = qib_read_kreg32(dd, trans); if (transval & EPB_TRANS_RDY) |
