All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Andrew Jeffery" <andrew@aj.id.au>
To: Mine <mine260309@gmail.com>, openbmc@lists.ozlabs.org
Cc: "Eddie James" <eajames@linux.ibm.com>, "Joel Stanley" <joel@jms.id.au>
Subject: Re: [PATCH] hwmon (occ): Fix extended status bits
Date: Tue, 16 Apr 2019 03:47:05 -0400	[thread overview]
Message-ID: <5a729232-7f93-4234-98d1-c89a266e3c5c@www.fastmail.com> (raw)
In-Reply-To: <20190416002045.GA4442@roeck-us.net>



On Tue, 16 Apr 2019, at 09:50, 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>
> > Reviewed-by: Eddie James <eajames@linux.ibm.com>
> 
> Applied.

I've also applied this to dev-5.0.

Cheers,

Andrew

> 
> 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;
>

      reply	other threads:[~2019-04-16  7:47 UTC|newest]

Thread overview: 5+ 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
2019-04-16  7:47   ` Andrew Jeffery [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=5a729232-7f93-4234-98d1-c89a266e3c5c@www.fastmail.com \
    --to=andrew@aj.id.au \
    --cc=eajames@linux.ibm.com \
    --cc=joel@jms.id.au \
    --cc=mine260309@gmail.com \
    --cc=openbmc@lists.ozlabs.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.