[PATCH 0/2] platform/x86: hp-wmi: Modernize driver API and perform_query()

yahia <[email protected]>
Newsgroups org.kernel.vger.platform-driver-x86
Message-ID <[email protected]>
From: yahia ahmed <[email protected]>

Refactor various parts of hp-wmi, including hp_wmi_perform_query() and 
encode_outsize_for_pvsz(), to adopt modern kernel APIs, resource cleanup
attributes, and buffer bounds safety checks.

Patch 1 migrates the hp-wmi driver from the deprecated wmi_evaluate_method()
API to the modern wmidev_evaluate_method() function by registering as a
WMI driver.

Patch 2 refactors encode_outsize_for_pvsz() with a switch statement, adds
early ACPI return buffer length validation to prevent potential integer
underflow in hp_wmi_perform_query(), replaces kmalloc with kzalloc_flex
to zero memory, and use __free() macro to free variables.

yahia (2):
  hp-wmi: Modernize hp_wmi_perform_query() to use the modern API
  hp-wmi: use modern cleanup and refactor allocation functions

 drivers/platform/x86/hp/hp-wmi.c | 98 +++++++++++++++++++++-----------
 1 file changed, 65 insertions(+), 33 deletions(-)

-- 
2.55.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.