From: Guenter Roeck <linux@roeck-us.net>
To: Lei YU <mine260309@gmail.com>
Cc: Jean Delvare <jdelvare@suse.com>,
Eddie James <eajames@linux.ibm.com>,
linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org,
Joel Stanley <joel@jms.id.au>, Andrew Jeffery <andrew@aj.id.au>
Subject: Re: [PATCH] hwmon (occ): Fix extended status bits
Date: Mon, 15 Apr 2019 17:20:45 -0700 [thread overview]
Message-ID: <20190416002045.GA4442@roeck-us.net> (raw)
In-Reply-To: <1555324640-152061-1-git-send-email-mine260309@gmail.com>
On Mon, Apr 15, 2019 at 06:37:20PM +0800, Lei YU wrote:
> The occ's extended status is checked and shown as sysfs attributes. But
> the code was incorrectly checking the "status" bits.
> Fix it by checking the "ext_status" bits.
>
> Signed-off-by: Lei YU <mine260309@gmail.com>
> Reviewed-by: Eddie James <eajames@linux.ibm.com>
Applied.
Thanks,
Guenter
> ---
> drivers/hwmon/occ/sysfs.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/hwmon/occ/sysfs.c b/drivers/hwmon/occ/sysfs.c
> index fe3d15e..a71ca94 100644
> --- a/drivers/hwmon/occ/sysfs.c
> +++ b/drivers/hwmon/occ/sysfs.c
> @@ -42,16 +42,16 @@ static ssize_t occ_sysfs_show(struct device *dev,
> val = !!(header->status & OCC_STAT_ACTIVE);
> break;
> case 2:
> - val = !!(header->status & OCC_EXT_STAT_DVFS_OT);
> + val = !!(header->ext_status & OCC_EXT_STAT_DVFS_OT);
> break;
> case 3:
> - val = !!(header->status & OCC_EXT_STAT_DVFS_POWER);
> + val = !!(header->ext_status & OCC_EXT_STAT_DVFS_POWER);
> break;
> case 4:
> - val = !!(header->status & OCC_EXT_STAT_MEM_THROTTLE);
> + val = !!(header->ext_status & OCC_EXT_STAT_MEM_THROTTLE);
> break;
> case 5:
> - val = !!(header->status & OCC_EXT_STAT_QUICK_DROP);
> + val = !!(header->ext_status & OCC_EXT_STAT_QUICK_DROP);
> break;
> case 6:
> val = header->occ_state;
prev parent reply other threads:[~2019-04-16 0:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-15 10:37 [PATCH] hwmon (occ): Fix extended status bits Lei YU
2019-04-15 20:28 ` Guenter Roeck
2019-04-15 22:17 ` Eddie James
2019-04-16 0:20 ` 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=20190416002045.GA4442@roeck-us.net \
--to=linux@roeck-us.net \
--cc=andrew@aj.id.au \
--cc=eajames@linux.ibm.com \
--cc=jdelvare@suse.com \
--cc=joel@jms.id.au \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mine260309@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;
as well as URLs for NNTP newsgroup(s).