Skip to contentSkip to conversation

ACPI / DPTF: Use ACPI_FREE() for ACPI buffer deallocation

PATCH In review Kaushlendra Kumar 2 participants 2 messages Oct 28, 2025 – Nov 7, 2025 ACPI

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 ACPI / DPTF: Use ACPI_FREE() for ACPI buffer deallocation

Replace kfree() with ACPI_FREE() in pch_fivr_read() to follow ACPI memory management conventions. While functionally equivalent in Linux (ACPI_FREE() is implemented as kfree()), using ACPI_FREE() maintains consistency with ACPI coding standards for deallocating ACPI buffer objects.

---
Changes in v2:
- Clarified changelog: convention adherence, not functional fix

 drivers/acpi/dptf/dptf_pch_fivr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/acpi/dptf/dptf_pch_fivr.c +1 -1
index 952216c67d58..8d7e555929d3 100644
@@ -41,7 +41,7 @@ static int pch_fivr_read(acpi_handle handle, char *method, struct pch_fivr_resp
 	ret = 0;
 
 release_buffer:
-	kfree(buffer.pointer);
+	ACPI_FREE(buffer.pointer);
 	return ret;
 }
 
Signature · 1 line
2.34.1
#1 lore raw
Quoted 20 lines · Kaushlendra Kumar

Replace kfree() with ACPI_FREE() in pch_fivr_read() to follow ACPI memory management conventions. While functionally equivalent in Linux (ACPI_FREE() is implemented as kfree()), using ACPI_FREE() maintains consistency with ACPI coding standards for deallocating ACPI buffer objects.

---
Changes in v2:
- Clarified changelog: convention adherence, not functional fix

 drivers/acpi/dptf/dptf_pch_fivr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/acpi/dptf/dptf_pch_fivr.c +0 -0
index 952216c67d58..8d7e555929d3 100644

drivers/acpi/dptf/dptf_pch_fivr.c static int pch_fivr_read(acpi_handle handle, char *method, struct pch_fivr_resp

Quoted 9 lines
drivers/acpi/dptf/dptf_pch_fivr.c +1 -2
@@ -41,7 +41,7 @@ static int pch_fivr_read(acpi_handle handle, char *method, struct pch_fivr_resp
        ret = 0;
 
 release_buffer:
-       kfree(buffer.pointer);
+       ACPI_FREE(buffer.pointer);
        return ret;
 }
 
--

Applied (with some edits in the subject and changelog) as 6.19 material, thanks!