Skip to contentSkip to conversation

pinctrl: single: drop useless assignment in pcs_irq_set()

PATCH New Sergey Shtylyov 1 participant 1 message Feb 27

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

PATCH 1/1 pinctrl: single: drop useless assignment in pcs_irq_set()

In pcs_irq_set(), the 2nd pcs->read() call is only done to flush a posted write -- the actually read value is ignored. Drop the useless assignment.

Found by Linux Verification Center (linuxtesting.org) with the Svace static analysis tool.

---
The patch is against the for-next branch of Linus W.'s linux-pinctrl.git repo.

 drivers/pinctrl/pinctrl-single.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pinctrl/pinctrl-single.c +1 -1
index 288c9c9bce9a..d50122c694b9 100644
@@ -1423,7 +1423,7 @@ static inline void pcs_irq_set(struct pcs_soc_data *pcs_soc,
 		pcs->write(mask, pcswi->reg);
 
 		/* flush posted write */
-		mask = pcs->read(pcswi->reg);
+		pcs->read(pcswi->reg);
 		raw_spin_unlock(&pcs->lock);
 	}
 
Signature · 1 line
2.53.0