mbox series

[RFC,v1,00/30] platform/x86: wmi: minor improvements

Message ID 20210904175450.156801-1-pobrn@protonmail.com (mailing list archive)
Headers show
Series platform/x86: wmi: minor improvements | expand

Message

Barnabás Pőcze Sept. 4, 2021, 5:54 p.m. UTC
This patch series contains minor changes in the WMI bus, which
aim to remove unnecessary code, get rid of duplication, and
various style changes.

Most of the patches should have no observable effect on the behaviour.

Barnabás Pőcze (30):
  platform/x86: wmi: fix kernel doc
  platform/x86: wmi: fix checkpatch warnings
  platform/x86: wmi: remove commas
  platform/x86: wmi: remove unnecessary initialization
  platform/x86: wmi: remove unnecessary initializations
  platform/x86: wmi: remove unnecessary variable
  platform/x86: wmi: remove unnecessary argument
  platform/x86: wmi: remove unnecessary casts
  platform/x86: wmi: remove stray empty line
  platform/x86: wmi: remove unnecessary checks
  platform/x86: wmi: use BIT() macro
  platform/x86: wmi: use bool instead of int
  platform/x86: wmi: use dynamic debug to print data about events
  platform/x86: wmi: use guid_t and guid_equal()
  platform/x86: wmi: make GUID block packed
  platform/x86: wmi: use sysfs_emit()
  platform/x86: wmi: use sizeof() instead of hard-coding
  platform/x86: wmi: use !p to check for NULL
  platform/x86: wmi: use sizeof(*p) in allocation
  platform/x86: wmi: remove variable
  platform/x86: wmi: move variables
  platform/x86: wmi: align arguments of functions
  platform/x86: wmi: improve debug messages
  platform/x86: wmi: do not fail if disabling fails
  platform/x86: wmi: simplify error handling logic
  platform/x86: wmi: introduce helper to convert driver to WMI driver
  platform/x86: wmi: introduce helper to generate method names
  platform/x86: wmi: introduce helper to determine type
  platform/x86: wmi: introduce helper to retrieve event data
  platform/x86: wmi: more detailed error reporting in find_guid()

 drivers/platform/x86/wmi.c | 378 +++++++++++++++++++------------------
 1 file changed, 197 insertions(+), 181 deletions(-)

--
2.33.0

Comments

Hans de Goede Sept. 13, 2021, 9:19 a.m. UTC | #1
Hi Barnabás,

On 9/4/21 7:54 PM, Barnabás Pőcze wrote:
> This patch series contains minor changes in the WMI bus, which
> aim to remove unnecessary code, get rid of duplication, and
> various style changes.
> 
> Most of the patches should have no observable effect on the behaviour.
> 
> Barnabás Pőcze (30):
>   platform/x86: wmi: fix kernel doc
>   platform/x86: wmi: fix checkpatch warnings
>   platform/x86: wmi: remove commas
>   platform/x86: wmi: remove unnecessary initialization
>   platform/x86: wmi: remove unnecessary initializations
>   platform/x86: wmi: remove unnecessary variable
>   platform/x86: wmi: remove unnecessary argument
>   platform/x86: wmi: remove unnecessary casts
>   platform/x86: wmi: remove stray empty line
>   platform/x86: wmi: remove unnecessary checks
>   platform/x86: wmi: use BIT() macro
>   platform/x86: wmi: use bool instead of int
>   platform/x86: wmi: use dynamic debug to print data about events
>   platform/x86: wmi: use guid_t and guid_equal()
>   platform/x86: wmi: make GUID block packed
>   platform/x86: wmi: use sysfs_emit()
>   platform/x86: wmi: use sizeof() instead of hard-coding
>   platform/x86: wmi: use !p to check for NULL
>   platform/x86: wmi: use sizeof(*p) in allocation
>   platform/x86: wmi: remove variable
>   platform/x86: wmi: move variables
>   platform/x86: wmi: align arguments of functions
>   platform/x86: wmi: improve debug messages
>   platform/x86: wmi: do not fail if disabling fails
>   platform/x86: wmi: simplify error handling logic
>   platform/x86: wmi: introduce helper to convert driver to WMI driver
>   platform/x86: wmi: introduce helper to generate method names
>   platform/x86: wmi: introduce helper to determine type
>   platform/x86: wmi: introduce helper to retrieve event data
>   platform/x86: wmi: more detailed error reporting in find_guid()
> 
>  drivers/platform/x86/wmi.c | 378 +++++++++++++++++++------------------
>  1 file changed, 197 insertions(+), 181 deletions(-)

Thank you for this big cleanup series.

Not sure why this is marked as a RFC?

I've gone over patches 1 - 7 sofar and they all look like
straight forward simple cleanups. So I will at least apply those
right away.

I've some small remarks to patch 6, which I've fixed up while applying
the patch. I will reply to patch 6 with my remarks.

I will continue the process the series and reply to patches which
I have any remarks to. Depending on how this goes I might end up merging
the first X patches, or just merge everything, we will see :)

Regards,

Hans
Barnabás Pőcze Sept. 13, 2021, 10:23 a.m. UTC | #2
Hi


2021. szeptember 13., hétfő 11:19 keltezéssel, Hans de Goede írta:
> [...]
> Thank you for this big cleanup series.
>
> Not sure why this is marked as a RFC?
>
> I've gone over patches 1 - 7 sofar and they all look like
> straight forward simple cleanups. So I will at least apply those
> right away.
> [...]

It's RFC because, well, I wanted to get some comments and see if it's not unwanted.

And I had made some local changes since I have sent the series:
patch 17[1] has been replaced. So please ignore that.

[1]: https://patchwork.kernel.org/project/platform-driver-x86/patch/20210904175450.156801-18-pobrn@protonmail.com/


Best regards,
Barnabás Pőcze
Hans de Goede Sept. 13, 2021, 10:31 a.m. UTC | #3
Hi,

On 9/13/21 12:23 PM, Barnabás Pőcze wrote:
> Hi
> 
> 
> 2021. szeptember 13., hétfő 11:19 keltezéssel, Hans de Goede írta:
>> [...]
>> Thank you for this big cleanup series.
>>
>> Not sure why this is marked as a RFC?
>>
>> I've gone over patches 1 - 7 sofar and they all look like
>> straight forward simple cleanups. So I will at least apply those
>> right away.
>> [...]
> 
> It's RFC because, well, I wanted to get some comments and see if it's not unwanted.
> 
> And I had made some local changes since I have sent the series:
> patch 17[1] has been replaced. So please ignore that.

Ok I've dropped patch 17; and sorry if I've caused any extra work for you
by picking this up early. I had time to review and process this large series
today, so I decided to tackle it right away (now that the merge window is done).

Regards,

Hans