Skip to content

platform/x86: hp-wmi: Modernize driver API and perform_query()

yahia platform-driver-x86 2 versions New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 0 repliesNew
  2. v12 patches 7 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2hp-wmi: Modernize hp_wmi_perform_query() to use the modern APIdrivers/platform/x86/hp/hp-wmi.c+46 -50 replies
2/2hp-wmi: use modern cleanup and refactor allocation functionsdrivers/platform/x86/hp/hp-wmi.c+21 -280 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

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

From: yahia ahmed <[email protected]>

Refactor various parts of hp-wmi, including hp_wmi_perform_query() and encode_outsize_for_pvsz(), to use newer APIs, resource cleanup attributes, and 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 | 100 +++++++++++++++++++++----------
 1 file changed, 67 insertions(+), 33 deletions(-)
Signature · 1 line
2.55.0