Skip to contentSkip to conversation

Input: ucb1400_ts: remove redundant variable penup

PATCH Applied Colin Ian King 2 participants 2 messages Dec 5, 2021 – Dec 13, 2021

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

PATCH 1/1 Input: ucb1400_ts: remove redundant variable penup

Variable penup is assigned a value but penup is never read later, it is redundant and can be removed.

---
 drivers/input/touchscreen/ucb1400_ts.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/input/touchscreen/ucb1400_ts.c +1 -3
index e3f2c940ef3d..dfd3b35590c3 100644
@@ -186,7 +186,6 @@ static irqreturn_t ucb1400_irq(int irqnr, void *devid)
 {
 	struct ucb1400_ts *ucb = devid;
 	unsigned int x, y, p;
-	bool penup;
 
 	if (unlikely(irqnr != ucb->irq))
 		return IRQ_NONE;
@@ -196,8 +195,7 @@ static irqreturn_t ucb1400_irq(int irqnr, void *devid)
 	/* Start with a small delay before checking pendown state */
 	msleep(UCB1400_TS_POLL_PERIOD);
 
-	while (!ucb->stopped && !(penup = ucb1400_ts_pen_up(ucb))) {
-
+	while (!ucb->stopped && !ucb1400_ts_pen_up(ucb)) {
 		ucb1400_adc_enable(ucb->ac97);
 		x = ucb1400_ts_read_xpos(ucb);
 		y = ucb1400_ts_read_ypos(ucb);
Signature · 1 line
2.33.1
maintainer Applied
#1 lore raw
Quoted 4 lines · Colin Ian King

Variable penup is assigned a value but penup is never read later, it is redundant and can be removed.

Applied, thank you.

Signature · 1 line
Dmitry