From: Dan Carpenter <dan.carpenter@oracle.com>
To: Colin King <colin.king@canonical.com>
Cc: linux-pwm@vger.kernel.org, kernel-janitors@vger.kernel.org,
linux-kernel@vger.kernel.org,
"Maxime Ripard" <mripard@kernel.org>,
"Chen-Yu Tsai" <wens@csie.org>,
"Thierry Reding" <thierry.reding@gmail.com>,
"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] pwm: sun4i: redundant assignment to variable pval
Date: Wed, 2 Oct 2019 16:25:06 +0300 [thread overview]
Message-ID: <20191002132506.GO22609@kadam> (raw)
In-Reply-To: <20191002100844.10490-1-colin.king@canonical.com>
On Wed, Oct 02, 2019 at 11:08:44AM +0100, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Variable pval is being assigned a value that is never read. The
> assignment is redundant and hence can be removed.
>
> Addresses-Coverity: ("Unused value")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
> drivers/pwm/pwm-sun4i.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/pwm/pwm-sun4i.c b/drivers/pwm/pwm-sun4i.c
> index 6f5840a1a82d..53970d4ba695 100644
> --- a/drivers/pwm/pwm-sun4i.c
> +++ b/drivers/pwm/pwm-sun4i.c
> @@ -156,7 +156,6 @@ static int sun4i_pwm_calculate(struct sun4i_pwm_chip *sun4i_pwm,
> if (sun4i_pwm->data->has_prescaler_bypass) {
> /* First, test without any prescaler when available */
> prescaler = PWM_PRESCAL_MASK;
> - pval = 1;
> /*
> * When not using any prescaler, the clock period in nanoseconds
> * is not an integer so round it half up instead of
Are you sure? It looks used to me.
regards,
dan carpenter
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2019-10-02 13:25 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-02 10:08 [PATCH] pwm: sun4i: redundant assignment to variable pval Colin King
2019-10-02 10:16 ` Uwe Kleine-König
2019-12-05 7:24 ` [PATCH] pwm: sun4i: Narrow scope of local variable Uwe Kleine-König
2019-12-05 8:37 ` walter harms
2019-12-10 10:12 ` Uwe Kleine-König
2019-12-10 10:24 ` [PATCH v2] " Uwe Kleine-König
2019-10-02 10:39 ` [PATCH] pwm: sun4i: redundant assignment to variable pval Thierry Reding
2019-10-02 13:25 ` Dan Carpenter [this message]
2019-10-02 13:28 ` Colin Ian King
2019-10-02 13:29 ` Dan Carpenter
2019-10-02 13:30 ` Colin Ian King
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=20191002132506.GO22609@kadam \
--to=dan.carpenter@oracle.com \
--cc=colin.king@canonical.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pwm@vger.kernel.org \
--cc=mripard@kernel.org \
--cc=thierry.reding@gmail.com \
--cc=u.kleine-koenig@pengutronix.de \
--cc=wens@csie.org \
/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;
as well as URLs for NNTP newsgroup(s).