From: Eddie James <eajames@linux.ibm.com>
To: Guenter Roeck <linux@roeck-us.net>, Lei YU <mine260309@gmail.com>
Cc: Jean Delvare <jdelvare@suse.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:17:58 -0500 [thread overview]
Message-ID: <cce91645-22c7-3c9d-fd2a-5271625b3e4a@linux.ibm.com> (raw)
In-Reply-To: <20190415202849.GA31243@roeck-us.net>
On 4/15/19 3:28 PM, Guenter Roeck wrote:
> 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>
> Looks ok to me, but can I get a confirmation from someone at IBM ?
Yes. Thanks Lei.
Reviewed-by: Eddie James <eajames@linux.ibm.com>
>
> 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;
next prev parent reply other threads:[~2019-04-15 22:18 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-15 10:37 Lei YU
2019-04-15 20:28 ` Guenter Roeck
2019-04-15 22:17 ` Eddie James [this message]
2019-04-16 0:20 ` Guenter Roeck
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=cce91645-22c7-3c9d-fd2a-5271625b3e4a@linux.ibm.com \
--to=eajames@linux.ibm.com \
--cc=andrew@aj.id.au \
--cc=jdelvare@suse.com \
--cc=joel@jms.id.au \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@roeck-us.net \
--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
all inboxes | Powered by JetHome®