public inbox for linux-hwmon@vger.kernel.org
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Zev Weiss <zev@bewilderbeest.net>
Cc: linux-hwmon@vger.kernel.org, Jean Delvare <jdelvare@suse.com>,
	Denis Pauk <pauk.denis@gmail.com>,
	Bernhard Seibold <mail@bernhard-seibold.de>,
	Andy Shevchenko <andy.shevchenko@gmail.com>,
	Oleksandr Natalenko <oleksandr@natalenko.name>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] hwmon: (nct6775) mask out bank number in nct6775_wmi_read_value()
Date: Sun, 14 Nov 2021 08:53:30 -0800	[thread overview]
Message-ID: <20211114165330.GA1983567@roeck-us.net> (raw)
In-Reply-To: <20211111025339.27520-1-zev@bewilderbeest.net>

On Wed, Nov 10, 2021 at 06:53:38PM -0800, Zev Weiss wrote:
> The first call to nct6775_asuswmi_read() in nct6775_wmi_read_value()
> had been passing the full bank+register number instead of just the
> lower 8 bits.  It didn't end up actually causing problems because the
> second argument of that function is a u8 anyway, but it seems
> preferable to be explicit about it at the call site (and consistent
> with the rest of the code).
> 
> Signed-off-by: Zev Weiss <zev@bewilderbeest.net>
> Fixes: 3fbbfc27f955 ("hwmon: (nct6775) Support access via Asus WMI")
> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>

Applied.

Thanks,
Guenter

> ---
>  drivers/hwmon/nct6775.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/hwmon/nct6775.c b/drivers/hwmon/nct6775.c
> index 93dca471972e..57ce8633a725 100644
> --- a/drivers/hwmon/nct6775.c
> +++ b/drivers/hwmon/nct6775.c
> @@ -1527,7 +1527,7 @@ static u16 nct6775_wmi_read_value(struct nct6775_data *data, u16 reg)
>  
>  	nct6775_wmi_set_bank(data, reg);
>  
> -	err = nct6775_asuswmi_read(data->bank, reg, &tmp);
> +	err = nct6775_asuswmi_read(data->bank, reg & 0xff, &tmp);
>  	if (err)
>  		return 0;
>  

      parent reply	other threads:[~2021-11-14 16:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-11  2:53 [PATCH] hwmon: (nct6775) mask out bank number in nct6775_wmi_read_value() Zev Weiss
2021-11-11  9:14 ` Andy Shevchenko
2021-11-14 16:53 ` 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=20211114165330.GA1983567@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=andy.shevchenko@gmail.com \
    --cc=jdelvare@suse.com \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mail@bernhard-seibold.de \
    --cc=oleksandr@natalenko.name \
    --cc=pauk.denis@gmail.com \
    --cc=zev@bewilderbeest.net \
    /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