linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Winiarska, Iwona" <iwona.winiarska@intel.com>
To: "pmenzel@molgen.mpg.de" <pmenzel@molgen.mpg.de>
Cc: "linux@roeck-us.net" <linux@roeck-us.net>,
	"andriy.shevchenko@linux.intel.com" 
	<andriy.shevchenko@linux.intel.com>,
	"linux-hwmon@vger.kernel.org" <linux-hwmon@vger.kernel.org>,
	"openbmc@lists.ozlabs.org" <openbmc@lists.ozlabs.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"jdelvare@suse.com" <jdelvare@suse.com>,
	"fercerpav@gmail.com" <fercerpav@gmail.com>
Subject: Re: [PATCH] hwmon: (peci/cputemp) Fix miscalculated DTS for SKX
Date: Tue, 21 Mar 2023 10:29:22 +0000	[thread overview]
Message-ID: <df6ab72faf9f1484f7f850ad7386f76b60e5bf02.camel@intel.com> (raw)
In-Reply-To: <f2fe16cf-3838-df89-958f-c39d1bae81a1@molgen.mpg.de>

On Tue, 2023-03-21 at 10:41 +0100, Paul Menzel wrote:
> Dear Iwona,
> 
> 
> Am 21.03.23 um 10:04 schrieb Iwona Winiarska:
> > For Skylake, DTS temperature of the CPU is reported in S10.6 format
> > instead of S8.8.
> > 
> > Reported-by: Paul Fertser <fercerpav@gmail.com>
> > Link: https://lore.kernel.org/lkml/ZBhHS7v+98NK56is@home.paul.comp/
> > Signed-off-by: Iwona Winiarska <iwona.winiarska@intel.com>
> > ---
> >   drivers/hwmon/peci/cputemp.c | 8 +++++++-
> >   1 file changed, 7 insertions(+), 1 deletion(-)
> > 
> > diff --git a/drivers/hwmon/peci/cputemp.c b/drivers/hwmon/peci/cputemp.c
> > index 30850a479f61..87d56f0fc888 100644
> > --- a/drivers/hwmon/peci/cputemp.c
> > +++ b/drivers/hwmon/peci/cputemp.c
> > @@ -537,6 +537,12 @@ static const struct cpu_info cpu_hsx = {
> >         .thermal_margin_to_millidegree =
> > &dts_eight_dot_eight_to_millidegree,
> >   };
> >   
> > +static const struct cpu_info cpu_skx = {
> > +       .reg            = &resolved_cores_reg_hsx,
> 
> This is not aligned. Why not only use one space before the equal sign?

Yeah - same alignment problem is present in cpu_hsx and cpu_icx though, so I
just followed along for skx to not stand out visually.
So while I agree that alignment is broken here, I think it might be better to
separate out the potential cleanup from the fix.

Thanks
-Iwona 

> 
> > +       .min_peci_revision = 0x33,
> > +       .thermal_margin_to_millidegree = &dts_ten_dot_six_to_millidegree,
> > +};
> > +
> >   static const struct cpu_info cpu_icx = {
> >         .reg            = &resolved_cores_reg_icx,
> >         .min_peci_revision = 0x40,
> > @@ -558,7 +564,7 @@ static const struct auxiliary_device_id
> > peci_cputemp_ids[] = {
> >         },
> >         {
> >                 .name = "peci_cpu.cputemp.skx",
> > -               .driver_data = (kernel_ulong_t)&cpu_hsx,
> > +               .driver_data = (kernel_ulong_t)&cpu_skx,
> >         },
> >         {
> >                 .name = "peci_cpu.cputemp.icx",
> 
> 
> Kind regards,
> 
> Paul


  reply	other threads:[~2023-03-21 10:30 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-21  9:04 [PATCH] hwmon: (peci/cputemp) Fix miscalculated DTS for SKX Iwona Winiarska
2023-03-21  9:41 ` Paul Menzel
2023-03-21 10:29   ` Winiarska, Iwona [this message]
2023-03-21 13:08     ` andriy.shevchenko
2023-03-21 14:35       ` Guenter Roeck
2023-03-21 14:42 ` 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=df6ab72faf9f1484f7f850ad7386f76b60e5bf02.camel@intel.com \
    --to=iwona.winiarska@intel.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=fercerpav@gmail.com \
    --cc=jdelvare@suse.com \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=openbmc@lists.ozlabs.org \
    --cc=pmenzel@molgen.mpg.de \
    /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).