Skip to contentSkip to conversation

IB/hfi1: Remove redundant variable rcd

PATCH Applied Jiapeng Chong 2 participants 2 messages Apr 25, 2021 – Apr 27, 2021

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

PATCH 1/1 IB/hfi1: Remove redundant variable rcd

Variable rcd is being assigned a value from a calculation however the variable is never read, so this redundant variable can be removed.

Cleans up the following clang-analyzer warning:

drivers/infiniband/hw/hfi1/affinity.c:986:3: warning: Value stored to 'rcd' is never read [clang-analyzer-deadcode.DeadStores].

---
 drivers/infiniband/hw/hfi1/affinity.c | 1 -
 1 file changed, 1 deletion(-)
drivers/infiniband/hw/hfi1/affinity.c +0 -1
index 04b1e8f..ae9a335 100644
@@ -983,7 +983,6 @@ void hfi1_put_irq_affinity(struct hfi1_devdata *dd,
 			set = &entry->rcv_intr;
 		break;
 	case IRQ_NETDEVCTXT:
-		rcd = (struct hfi1_ctxtdata *)msix->arg;
 		set = &entry->def_intr;
 		break;
 	default:
Signature · 1 line
1.8.3.1
maintainer Applied
#1 lore raw
Quoted 6 lines · Jiapeng Chong

Variable rcd is being assigned a value from a calculation however the variable is never read, so this redundant variable can be removed.

Cleans up the following clang-analyzer warning:

Quoted 8 lines

drivers/infiniband/hw/hfi1/affinity.c:986:3: warning: Value stored to 'rcd' is never read [clang-analyzer-deadcode.DeadStores].

---
 drivers/infiniband/hw/hfi1/affinity.c | 1 -
 1 file changed, 1 deletion(-)

Applied to for-next, though I also moved the rcd variable into the only scope that used it.

Jason