public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH] pwm: atmel: remove redundant initialization of variable timeout
@ 2021-12-10  0:22 Colin Ian King
  2021-12-10  7:45 ` Uwe Kleine-König
  2022-02-24 12:54 ` Thierry Reding
  0 siblings, 2 replies; 4+ messages in thread
From: Colin Ian King @ 2021-12-10  0:22 UTC (permalink / raw)
  To: Claudiu Beznea, Thierry Reding, Uwe Kleine-König, Lee Jones,
	Nicolas Ferre, Alexandre Belloni, Ludovic Desroches,
	linux-arm-kernel, linux-pwm
  Cc: kernel-janitors, linux-kernel

The variable timeout is being initialized with a value that is never
read, it is being re-assigned the same value later on. Remove the
redundant initialization and keep the latter assignment because it's
closer to the use of the variable.

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---
 drivers/pwm/pwm-atmel.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pwm/pwm-atmel.c b/drivers/pwm/pwm-atmel.c
index 98b34ea9f38e..8e00a4286145 100644
--- a/drivers/pwm/pwm-atmel.c
+++ b/drivers/pwm/pwm-atmel.c
@@ -271,7 +271,7 @@ static void atmel_pwm_disable(struct pwm_chip *chip, struct pwm_device *pwm,
 			      bool disable_clk)
 {
 	struct atmel_pwm_chip *atmel_pwm = to_atmel_pwm_chip(chip);
-	unsigned long timeout = jiffies + 2 * HZ;
+	unsigned long timeout;
 
 	atmel_pwm_wait_nonpending(atmel_pwm, pwm->hwpwm);
 
-- 
2.34.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-02-24 12:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-12-10  0:22 [PATCH] pwm: atmel: remove redundant initialization of variable timeout Colin Ian King
2021-12-10  7:45 ` Uwe Kleine-König
2021-12-10  9:02   ` Colin King (gmail)
2022-02-24 12:54 ` Thierry Reding

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox