[PATCH] pwm: atmel: remove redundant initialization of variable timeout
Uwe Kleine-König
u.kleine-koenig at pengutronix.de
Thu Dec 9 23:45:36 PST 2021
On Fri, Dec 10, 2021 at 12:22:50AM +0000, Colin Ian King wrote:
> 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 at 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);
Reviewed-by: Uwe Kleine-König <u.kleine-koenig at pengutronix.de>
Did you spot this by using some static checker? If so, maybe attribute
it in the commit log?
Thanks
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | https://www.pengutronix.de/ |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20211210/0106377b/attachment.sig>
More information about the linux-arm-kernel
mailing list