From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: Colin Ian King <colin.i.king@gmail.com>
Cc: Claudiu Beznea <claudiu.beznea@microchip.com>,
Thierry Reding <thierry.reding@gmail.com>,
Lee Jones <lee.jones@linaro.org>,
Nicolas Ferre <nicolas.ferre@microchip.com>,
Alexandre Belloni <alexandre.belloni@bootlin.com>,
Ludovic Desroches <ludovic.desroches@microchip.com>,
linux-arm-kernel@lists.infradead.org, linux-pwm@vger.kernel.org,
kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] pwm: atmel: remove redundant initialization of variable timeout
Date: Fri, 10 Dec 2021 08:45:36 +0100 [thread overview]
Message-ID: <20211210074536.lawpsch2i5bwyew7@pengutronix.de> (raw)
In-Reply-To: <20211210002250.639251-1-colin.i.king@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1323 bytes --]
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@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@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/ |
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2021-12-10 7:46 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-10 0:22 Colin Ian King
2021-12-10 7:45 ` Uwe Kleine-König [this message]
2021-12-10 9:02 ` Colin King (gmail)
2022-02-24 12:54 ` Thierry Reding
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211210074536.lawpsch2i5bwyew7@pengutronix.de \
--to=u.kleine-koenig@pengutronix.de \
--cc=alexandre.belloni@bootlin.com \
--cc=claudiu.beznea@microchip.com \
--cc=colin.i.king@gmail.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=lee.jones@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pwm@vger.kernel.org \
--cc=ludovic.desroches@microchip.com \
--cc=nicolas.ferre@microchip.com \
--cc=thierry.reding@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®