public inbox for linux-hwmon@vger.kernel.org
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Colin Ian King <colin.king@canonical.com>
Cc: George Joseph <george.joseph@fairview5.com>,
	Jean Delvare <jdelvare@suse.com>,
	linux-hwmon@vger.kernel.org, kernel-janitors@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: hwmon: (asc7621): remove redundant assignment to newval
Date: Sat, 21 Oct 2017 08:57:49 -0700	[thread overview]
Message-ID: <20171021155749.GA11642@roeck-us.net> (raw)
In-Reply-To: <20171018121038.29409-1-colin.king@canonical.com>

On Wed, Oct 18, 2017 at 01:10:38PM +0100, Colin Ian King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> The setting of newval to zero is redundant as the following if/else
> stanzas will always update newval to a new value. Remove the
> redundant setting, cleans up clang build warning:
> 
> drivers/hwmon/asc7621.c:582:2: warning: Value stored to 'newval' is
> never read
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Applied to hwmon-next.

Thanks,
Guenter

> ---
>  drivers/hwmon/asc7621.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/hwmon/asc7621.c b/drivers/hwmon/asc7621.c
> index 4875e99b59c9..6d34c05a4f83 100644
> --- a/drivers/hwmon/asc7621.c
> +++ b/drivers/hwmon/asc7621.c
> @@ -579,7 +579,6 @@ static ssize_t show_pwm_enable(struct device *dev,
>  	mutex_unlock(&data->update_lock);
>  
>  	val = config | (altbit << 3);
> -	newval = 0;
>  
>  	if (val == 3 || val >= 10)
>  		newval = 255;

      reply	other threads:[~2017-10-21 15:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-18 12:10 [PATCH] hwmon: (asc7621): remove redundant assignment to newval Colin King
2017-10-21 15:57 ` Guenter Roeck [this message]

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=20171021155749.GA11642@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=colin.king@canonical.com \
    --cc=george.joseph@fairview5.com \
    --cc=jdelvare@suse.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.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