rafaelgieschke / clevo-xsm-wmi

Clone of https://bitbucket.org/lynthium/clevo-xsm-wmi adding PWM fan control of CPU and GPU fans, a DKMS config, and a simple install/remove script.
https://bitbucket.org/rafaelgieschke/clevo-xsm-wmi
15 stars 9 forks source link

Kernel 6.11 incopatible type #8

Open iadegesso opened 2 weeks ago

iadegesso commented 2 weeks ago

Hi, trying to build the module with the new kernel 6.11, I got this error:

/root/rafaelgieschke-clevo/clevo-xsm-wmi/module/clevo-xsm-wmi.c:953:19: error: initialization of ‘void ()(struct platform_device )’ from incompatible pointer type ‘int ()(struct platform_device )’ [-Werror=incompatible-pointer-types] 953 | .remove = clevo_xsm_wmi_remove, | ^~~~~~~~

I think in the new kernel there is a change that breaks this module. I've found that the same change affects other modules and someone tells he fixed it, but I'm not able to find how...

Thanks,

Iade Gesso, PhD

iadegesso commented 5 days ago

Ok, the solution is to change the clevo_xms_wmi_remove function from

static int clevo_xsm_wmi_remove(struct platform_device *dev) { wmi_remove_notify_handler(CLEVO_EVENT_GUID); return 0; }

to

static void clevo_xsm_wmi_remove(struct platform_device *dev) { wmi_remove_notify_handler(CLEVO_EVENT_GUID); //return 0; }