lkml.org 
[lkml]   [2021]   [Dec]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 1/3] hwmon: (asus-ec-sensors) add driver for ASUS EC
Date
On 12/17/21 2:33 PM, Eugene Shalygin wrote:
> Günter,
>
> On Fri, 17 Dec 2021 at 22:52, Guenter Roeck <linux@roeck-us.net> wrote:
>> There is a lot of complexity around mutex_path in this driver, yet there is
>> always exactly one entry for each board, and the name of the mutex is always
>> the same for all boards. This doesn't make sense. Either the code is needed
>> or it isn't. We don't usually add complex code like this into the kernel
>> "just because it may be needed at some point in the future". Either give me
>> a use case, or drop it all.
>
> When we discussed this approach which utilises an ACPI mutex, Andy and
> Denis were sceptical about its maintainability. One of the objections
> was that the mutex name is internal to the DSDT code and can be
> changed by ASUS. I know when older AM4 boards received BIOS updates
> for Ryzen 5000, their BIOS changed completely and I overheard that the
> DSDT code changed too. Unfortunately, I have no samples at hand. So I
> went ahead and added version support. I can, of course, revert that
> and apply it if somebody encounters such a BIOS update. To some extent
> I wanted to demonstrate how overcoming the problem with possible
> changes of the mutex path can look.
>

That is not how kernel development works. It does not make sense to
introduce code that isn't used. The code is by its nature untested,
and it is completely unknown if it is even going to work if it is ever
needed. We simply can not predict how a future BIOS version / DSDT
looks like.

I don't have an answer for the maintainability problem, but introducing
speculative code is most definitely not the answer.

Guenter

\
 
 \ /
  Last update: 2021-12-18 00:48    [W:0.038 / U:0.168 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site