Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build failure against Linux 6.12 due to removal of wmi_get_event_data #91

Open
vikanezrimaya opened this issue Nov 20, 2024 · 0 comments

Comments

@vikanezrimaya
Copy link

vikanezrimaya commented Nov 20, 2024

wmi_get_event_data is part of the GUID-based WMI interface (deprecated in torvalds/linux@d54bd4b). This function was removed in torvalds/linux@79a56f4, allegedly because its improper usage had potential to mess up ACPI firmware on some machines.

Additionally, the signature of wmi_install_notify_handler's callback changed from void (*)(u32, void *) to void (*)(union acpi_object *, void *) in torvalds/linux@e04e2b7, to replace the removed functionality. The in-tree copy of huawei-wmi was also patched accordingly, and this patch can be carried forward into this version.

Build failure log

  CC [M]  /build/source/huawei-wmi.o
/build/source/huawei-wmi.c: In function 'huawei_wmi_input_notify':
/build/source/huawei-wmi.c:1480:18: error: implicit declaration of function 'wmi_get_event_data'; did you mean 'acpi_get_event_status'? [-Werror=implicit-function-declaration]
 1480 |         status = wmi_get_event_data(value, &response);
      |                  ^~~~~~~~~~~~~~~~~~
      |                  acpi_get_event_status
/build/source/huawei-wmi.c: In function 'huawei_wmi_input_setup':
/build/source/huawei-wmi.c:1510:50: error: passing argument 2 of 'wmi_install_notify_handler' from incompatible pointer type [-Werror=incompatible-pointer-types]
 1510 |                 wmi_install_notify_handler(guid, huawei_wmi_input_notify,
      |                                                  ^~~~~~~~~~~~~~~~~~~~~~~
      |                                                  |
      |                                                  void (*)(u32,  void *) {aka void (*)(unsigned int,  void *)}
In file included from /build/source/huawei-wmi.c:8:
/nix/store/hs64hbfp8c68syszdy8i3zjlmi9r3a76-linux-6.12-dev/lib/modules/6.12.0/source/include/linux/acpi.h:404:60: note: expected 'wmi_notify_handler' {aka 'void (*)(union acpi_object *, void *)'} but argument is of type 'void (*)(u32,  void *)' {aka 'void (*)(unsigned int,  void *)'}
  404 |                                         wmi_notify_handler handler, void *data);
      |                                         ~~~~~~~~~~~~~~~~~~~^~~~~~~
cc1: some warnings being treated as errors
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant