From: Guenter Roeck <linux@roeck-us.net>
To: Denis Pauk <pauk.denis@gmail.com>
Cc: andy.shevchenko@gmail.com, platform-driver-x86@vger.kernel.org,
Jean Delvare <jdelvare@suse.com>,
linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] hwmon: (nct6775) Additional check for ChipID before ASUS WMI usage
Date: Sat, 18 Dec 2021 11:35:35 -0800 [thread overview]
Message-ID: <3bcc4982-d496-6721-e40c-b0ed2da0ee83@roeck-us.net> (raw)
In-Reply-To: <20211218192616.611878-1-pauk.denis@gmail.com>
On 12/18/21 11:26 AM, Denis Pauk wrote:
> WMI monitoring methods can be changed or removed in new ASUS boards
> BIOS versions. Such versions return zero instead of a real one as
> Chip ID.
>
> Commit adds additional validation for the result of Chip ID call
> before enabling access by ASUS WMI methods.
>
> BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=204807
> Signed-off-by: Denis Pauk <pauk.denis@gmail.com>
> ---
> drivers/hwmon/nct6775.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/hwmon/nct6775.c b/drivers/hwmon/nct6775.c
> index 57ce8633a725..034347ed51c4 100644
> --- a/drivers/hwmon/nct6775.c
> +++ b/drivers/hwmon/nct6775.c
> @@ -5038,7 +5038,8 @@ static int __init sensors_nct6775_init(void)
> board_name);
> if (err >= 0) {
> /* if reading chip id via WMI succeeds, use WMI */
> - if (!nct6775_asuswmi_read(0, NCT6775_PORT_CHIPID, &tmp)) {
> + if (!nct6775_asuswmi_read(0, NCT6775_PORT_CHIPID, &tmp) &&
> + tmp) {
Please drop the continuation line; the above hurts readability, and in that case
up to 100 columns are allowed.
Thanks,
Guenter
> pr_info("Using Asus WMI to access %#x chip.\n", tmp);
> access = access_asuswmi;
> } else {
>
> base-commit: 2585cf9dfaaddf00b069673f27bb3f8530e2039c
>
prev parent reply other threads:[~2021-12-18 19:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-18 19:26 Denis Pauk
2021-12-18 19:35 ` 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=3bcc4982-d496-6721-e40c-b0ed2da0ee83@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=pauk.denis@gmail.com \
--cc=platform-driver-x86@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
all inboxes | Powered by JetHome®