lkml.org 
[lkml]   [2019]   [Nov]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v2 2/3] platform/x86: asus_wmi: Support fan boost mode on FX505DY/FX705DY
Thanks for review, I will do suggested changes.

> > + if (err == 0 &&
> > + (result & ASUS_WMI_DSTS_PRESENCE_BIT) &&
> > + (result & ASUS_FAN_BOOST_MODES_MASK)) {
> > + asus->fan_boost_mode_available = 1;
> > + asus->fan_boost_mode_mask = result & ASUS_FAN_BOOST_MODES_MASK;
> > + return 0;
> > }
> >
> > - if ((result & ASUS_WMI_DSTS_PRESENCE_BIT) &&
> > + err = asus_wmi_get_devstate(asus, ASUS_WMI_DEVID_FAN_BOOST_MODE_2,
> > + &result);
> > +
> > + if (err == 0 &&
> > + (result & ASUS_WMI_DSTS_PRESENCE_BIT) &&
> > (result & ASUS_FAN_BOOST_MODES_MASK)) {
> > - asus->fan_boost_mode_available = true;
> > + asus->fan_boost_mode_available = 2;
> > asus->fan_boost_mode_mask = result & ASUS_FAN_BOOST_MODES_MASK;
> > }
>
> The above differs only in one value to give and one value to set, I
> suppose you may introduce an additional helper to it

Maybe it's better to add additional argument with index to
fan_boost_mode_check_present and
call it twice?

> > + if (err == -ENODEV)
> > + return 0;
>
> This should be explained or even separated to another patch. It
> changes behaviour of the original code, why?
>

Original code also have this check to continue module initialization
when fan_boost_mode device
is not present. It's return value is checked in asus_wmi_add()
function and it'll fail module probing.

\
 
 \ /
  Last update: 2019-11-07 19:32    [W:0.080 / U:0.400 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site