Skip to contentSkip to conversation

RDMA/hfi1: remove redundant assignment to pointer ppd

PATCH Applied Colin Ian King 2 participants 2 messages Oct 23, 2023 – Oct 24, 2023

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 RDMA/hfi1: remove redundant assignment to pointer ppd

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]

---
 drivers/infiniband/hw/hfi1/init.c | 1 -
 1 file changed, 1 deletion(-)
drivers/infiniband/hw/hfi1/init.c +0 -1
index 5ce2215e09c2..cbac4a442d9e 100644
@@ -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 |
Signature · 1 line
2.39.2
#1 lore raw
Quoted 8 lines · Colin Ian King

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]

[...]

Applied, thanks!

[1/1] RDMA/hfi1: remove redundant assignment to pointer ppd

      https://git.kernel.org/rdma/rdma/c/b55706366c5ed6

Best regards,

Signature · 1 line
Leon Romanovsky <[email protected]>