Hi Mario,
FYI, the error/warning still remains.
tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: 48fd60600c1344806a27e3bb33ab33ec5a9fea7c commit: ff0e9f26288d2daee4950f42b37a3d3d30d36ec1 [1306/1306] platform/x86: alienware-wmi: Correct a memory leak config: x86_64-randconfig-076-20241125 (https://download.01.org/0day-ci/archive/20241126/202411260425.gByrWNcz-lkp@i...) compiler: gcc-12 (Debian 12.2.0-14) 12.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241126/202411260425.gByrWNcz-lkp@i...)
If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot lkp@intel.com | Closes: https://lore.kernel.org/oe-kbuild-all/202411260425.gByrWNcz-lkp@intel.com/
All warnings (new ones prefixed by >>):
In file included from include/linux/acpi.h:41, from drivers/platform/x86/alienware-wmi.c:20: include/linux/module.h:132:13: warning: 'init_module' specifies less restrictive attribute than its target 'alienware_wmi_init': 'cold' [-Wmissing-attributes] 132 | int init_module(void) __attribute__((alias(#initfn))); | ^~~~~~~~~~~ drivers/platform/x86/alienware-wmi.c:852:1: note: in expansion of macro 'module_init' 852 | module_init(alienware_wmi_init); | ^~~~~~~~~~~ drivers/platform/x86/alienware-wmi.c:785:19: note: 'init_module' target declared here 785 | static int __init alienware_wmi_init(void) | ^~~~~~~~~~~~~~~~~~ include/linux/module.h:138:14: warning: 'cleanup_module' specifies less restrictive attribute than its target 'alienware_wmi_exit': 'cold' [-Wmissing-attributes] 138 | void cleanup_module(void) __attribute__((alias(#exitfn))); | ^~~~~~~~~~~~~~ drivers/platform/x86/alienware-wmi.c:864:1: note: in expansion of macro 'module_exit' 864 | module_exit(alienware_wmi_exit); | ^~~~~~~~~~~ drivers/platform/x86/alienware-wmi.c:854:20: note: 'cleanup_module' target declared here 854 | static void __exit alienware_wmi_exit(void) | ^~~~~~~~~~~~~~~~~~ In function 'alienware_wmax_command', inlined from 'toggle_hdmi_source' at drivers/platform/x86/alienware-wmi.c:609:11:
drivers/platform/x86/alienware-wmi.c:539:21: warning: 'output.pointer' is used uninitialized [-Wuninitialized]
539 | kfree(output.pointer); | ~~~~~~^~~~~~~~ drivers/platform/x86/alienware-wmi.c: In function 'toggle_hdmi_source': drivers/platform/x86/alienware-wmi.c:521:28: note: 'output' declared here 521 | struct acpi_buffer output; | ^~~~~~ In function 'alienware_wmax_command', inlined from 'toggle_deepsleep' at drivers/platform/x86/alienware-wmi.c:748:11:
drivers/platform/x86/alienware-wmi.c:539:21: warning: 'output.pointer' is used uninitialized [-Wuninitialized]
539 | kfree(output.pointer); | ~~~~~~^~~~~~~~ drivers/platform/x86/alienware-wmi.c: In function 'toggle_deepsleep': drivers/platform/x86/alienware-wmi.c:521:28: note: 'output' declared here 521 | struct acpi_buffer output; | ^~~~~~ drivers/platform/x86/alienware-wmi.o: warning: objtool: show_hdmi_source()+0x80: sibling call from callable instruction with modified stack frame drivers/platform/x86/alienware-wmi.o: warning: objtool: show_hdmi_cable()+0x82: sibling call from callable instruction with modified stack frame drivers/platform/x86/alienware-wmi.o: warning: objtool: show_amplifier_status()+0x82: sibling call from callable instruction with modified stack frame drivers/platform/x86/alienware-wmi.o: warning: objtool: show_deepsleep_status()+0x82: sibling call from callable instruction with modified stack frame drivers/platform/x86/alienware-wmi.o: warning: objtool: alienware_update_led()+0x239: sibling call from callable instruction with modified stack frame drivers/platform/x86/alienware-wmi.o: warning: objtool: zone_set()+0xb0: sibling call from callable instruction with modified stack frame drivers/platform/x86/alienware-wmi.o: warning: objtool: global_led_set()+0x117: sibling call from callable instruction with modified stack frame drivers/platform/x86/alienware-wmi.o: warning: objtool: toggle_hdmi_source()+0x106: sibling call from callable instruction with modified stack frame drivers/platform/x86/alienware-wmi.o: warning: objtool: toggle_deepsleep()+0x103: sibling call from callable instruction with modified stack frame drivers/platform/x86/alienware-wmi.o: warning: objtool: show_hdmi_source.cold()+0x0: call without frame pointer save/setup drivers/platform/x86/alienware-wmi.o: warning: objtool: show_hdmi_cable.cold()+0x0: call without frame pointer save/setup drivers/platform/x86/alienware-wmi.o: warning: objtool: show_amplifier_status.cold()+0x0: call without frame pointer save/setup drivers/platform/x86/alienware-wmi.o: warning: objtool: show_deepsleep_status.cold()+0x0: call without frame pointer save/setup drivers/platform/x86/alienware-wmi.o: warning: objtool: alienware_update_led.cold()+0x0: call without frame pointer save/setup drivers/platform/x86/alienware-wmi.o: warning: objtool: zone_set.cold()+0x0: call without frame pointer save/setup drivers/platform/x86/alienware-wmi.o: warning: objtool: global_led_set.cold()+0x0: call without frame pointer save/setup drivers/platform/x86/alienware-wmi.o: warning: objtool: toggle_hdmi_source.cold()+0x0: call without frame pointer save/setup drivers/platform/x86/alienware-wmi.o: warning: objtool: toggle_deepsleep.cold()+0x0: call without frame pointer save/setup
vim +539 drivers/platform/x86/alienware-wmi.c
514 515 static acpi_status alienware_wmax_command(struct wmax_basic_args *in_args, 516 u32 command, int *out_data) 517 { 518 acpi_status status; 519 union acpi_object *obj; 520 struct acpi_buffer input; 521 struct acpi_buffer output; 522 523 input.length = (acpi_size) sizeof(*in_args); 524 input.pointer = in_args; 525 if (out_data != NULL) { 526 output.length = ACPI_ALLOCATE_BUFFER; 527 output.pointer = NULL; 528 status = wmi_evaluate_method(WMAX_CONTROL_GUID, 0, 529 command, &input, &output); 530 } else 531 status = wmi_evaluate_method(WMAX_CONTROL_GUID, 0, 532 command, &input, NULL); 533 534 if (ACPI_SUCCESS(status) && out_data != NULL) { 535 obj = (union acpi_object *)output.pointer; 536 if (obj && obj->type == ACPI_TYPE_INTEGER) 537 *out_data = (u32) obj->integer.value; 538 }
539 kfree(output.pointer);
540 return status; 541