[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <0d7f6a9e-d508-65ba-9646-39f1d1a42a13@gmail.com>
Date: Thu, 9 May 2019 19:49:07 +0200
From: Yurii Pavlovskyi <yurii.pavlovskyi@...il.com>
To: Andy Shevchenko <andy.shevchenko@...il.com>
Cc: Corentin Chary <corentin.chary@...il.com>,
Darren Hart <dvhart@...radead.org>,
Andy Shevchenko <andy@...radead.org>,
Daniel Drake <drake@...lessm.com>,
acpi4asus-user <acpi4asus-user@...ts.sourceforge.net>,
Platform Driver <platform-driver-x86@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v3 08/11] platform/x86: asus-wmi: Enhance detection of
thermal data
On 08.05.19 15:58, Andy Shevchenko wrote:
> On Fri, Apr 19, 2019 at 1:12 PM Yurii Pavlovskyi
> <yurii.pavlovskyi@...il.com> wrote:
>
>> - if (value == ASUS_WMI_UNSUPPORTED_METHOD || value & 0xFFF80000
>> + if (value == ASUS_WMI_UNSUPPORTED_METHOD || (value & 0xFFF80000)
>
> Seems like a bug fix and thus should be a separate commit predecessing
> the series.
The previous one should theoretically work as well, just thought that would
help readability, will revert this.
>> - else if (attr == &dev_attr_temp1_input.attr)
>> - dev_id = ASUS_WMI_DEVID_THERMAL_CTRL;
>
> I don't see how this change affects the user output or driver
> behaviour. Why is it done?
>
>> - } else if (dev_id == ASUS_WMI_DEVID_THERMAL_CTRL) {
>
>> + } else if (attr == &dev_attr_temp1_input.attr) {
>
> So, I don't see why you change this line.
>
Yes, looking at this patch now I'd guess the refactoring there is really
misguided as it adds a lot more code than it removes, will drop it
completely and just add a new condition to the current check instead in
next version:
- /* If value is zero, something is clearly wrong */
- if (!value)
+ if (!value || value == 1)
Thanks,
Yurii
Powered by blists - more mailing lists