RDMA/hfi1: Remove redundant assignment to pointer ppd
authorColin Ian King <colin.i.king@gmail.com>
Mon, 23 Oct 2023 14:17:33 +0000 (15:17 +0100)
committerLeon Romanovsky <leon@kernel.org>
Tue, 24 Oct 2023 14:33:25 +0000 (17:33 +0300)
Pointer ppd is being assigned a value in a for-loop however it
is never read. The assignment is redundant and can be removed.
Cleans up clang scan build warning:

drivers/infiniband/hw/hfi1/init.c:1030:3: warning: Value stored
to 'ppd' is never read [deadcode.DeadStores]

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Link: https://lore.kernel.org/r/20231023141733.667807-1-colin.i.king@gmail.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
drivers/infiniband/hw/hfi1/init.c

index 5ce2215e09c22ad3ce0b1051dbe0834c3e44dfaf..cbac4a442d9ec6eb050910366e162919a24383e2 100644 (file)
@@ -1027,7 +1027,6 @@ static void shutdown_device(struct hfi1_devdata *dd)
        msix_clean_up_interrupts(dd);
 
        for (pidx = 0; pidx < dd->num_pports; ++pidx) {
-               ppd = dd->pport + pidx;
                for (i = 0; i < dd->num_rcv_contexts; i++) {
                        rcd = hfi1_rcd_get_by_index(dd, i);
                        hfi1_rcvctrl(dd, HFI1_RCVCTRL_TAILUPD_DIS |