lwmi_dev_evaluate_int(9)
π lwmi_dev_evaluate_int(9) β the Kernel API Manual glow-up π
okay so you're in the lwmi_dev_evaluate_int girlies now?? welcome to the Kernel API Manual, bestie, this is literally the page for the helper function that calls WMI methods which return an integer. iykyk β¨
β¨ NAME β¨
lwmi_dev_evaluate_int β the helper function you use when you need to call WMI methods that hand you back an integer. no cap, that's the whole job description π«Ά
πΈ SYNOPSIS πΈ
int lwmi_dev_evaluate_int (struct wmi_device *wdev , u8 instance , u32
method_id , unsigned char *buf , size_t size , u32 *retval );
like, look at her. six arguments, all present and accounted for π
π¦ ARGUMENTS π¦
wdevβ pointer to the WMI device you're calling. the main character, fr π₯instanceβ the instance of the called method. yes it's au8, don't come for her.method_idβ the WMI Method ID for the method you want to call. this is how the kernel knows which one you mean πbufβ the buffer holding all the arguments for the givenmethod_id. everything you're passing in lives here.sizeβ length of the buffer. respect her boundaries πretvalβ pointer where the return value gets assigned. she's an output param and she's thriving β¨
π DESCRIPTION π
so what does she actually do? she calls wmidev_evaluate_method for Lenovo WMI devices that return an ACPI integer β that's the vibe check she runs. then she validates the return value type and assigns the value to the retval pointer. clean, efficient, iconic. no notes π
lowkey the important part:retvalis a pointer, so the value gets written through it. you're not getting a return value back from the function itself β that's theintin the synopsis and it's a whole different thing, bestie, don't mix them up π
β RETURN β
0 on success, or an error code. that's it, that's the tea β
π SEE ALSO π
- Kernel file
./drivers/platform/x86/lenovo/wmi-helpers.cβ go read the source, it's giving main character energy π¦ lwmi_tm_register_notifier(9)lwmi_tm_unregister_notifier(9)devm_lwmi_tm_unregister_notifier(9)devm_lwmi_tm_register_notifier(9)lwmi_tm_notifier_call(9)lwmi_debugfs_create_dir(9)
and that's the whole page, bestie π she lives in ./drivers/platform/x86/lenovo, version October 2026, and she's filed under lwmi_dev_evaluate_int(9) β go forth and call your WMI methods responsibly ππ§ββοΈ
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms