* [PATCH] ACPI / DPTF: Use ACPI_FREE() for ACPI buffer deallocation
@ 2025-10-06 4:53 Kaushlendra Kumar
2025-10-22 19:01 ` Rafael J. Wysocki
0 siblings, 1 reply; 3+ messages in thread
From: Kaushlendra Kumar @ 2025-10-06 4:53 UTC (permalink / raw)
To: rafael, rui.zhang, srinivas.pandruvada, lenb
Cc: linux-acpi, Kaushlendra Kumar
Replace kfree() with ACPI_FREE() in pch_fivr_read() for deallocating
ACPI buffer objects. The buffer.pointer contains an ACPI object allocated
through ACPI subsystem functions and should be freed using ACPI_FREE()
to ensure proper cleanup and maintain consistency with ACPI memory
management conventions.
Signed-off-by: Kaushlendra Kumar <kaushlendra.kumar@intel.com>
---
drivers/acpi/dptf/dptf_pch_fivr.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/acpi/dptf/dptf_pch_fivr.c b/drivers/acpi/dptf/dptf_pch_fivr.c
index 952216c67d58..8d7e555929d3 100644
--- a/drivers/acpi/dptf/dptf_pch_fivr.c
+++ b/drivers/acpi/dptf/dptf_pch_fivr.c
@@ -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;
}
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] ACPI / DPTF: Use ACPI_FREE() for ACPI buffer deallocation
2025-10-06 4:53 [PATCH] ACPI / DPTF: Use ACPI_FREE() for ACPI buffer deallocation Kaushlendra Kumar
@ 2025-10-22 19:01 ` Rafael J. Wysocki
2025-10-28 5:20 ` Kumar, Kaushlendra
0 siblings, 1 reply; 3+ messages in thread
From: Rafael J. Wysocki @ 2025-10-22 19:01 UTC (permalink / raw)
To: Kaushlendra Kumar
Cc: rafael, rui.zhang, srinivas.pandruvada, lenb, linux-acpi
On Mon, Oct 6, 2025 at 6:55 AM Kaushlendra Kumar
<kaushlendra.kumar@intel.com> wrote:
>
> Replace kfree() with ACPI_FREE() in pch_fivr_read() for deallocating
> ACPI buffer objects. The buffer.pointer contains an ACPI object allocated
> through ACPI subsystem functions and should be freed using ACPI_FREE()
> to ensure proper cleanup and maintain consistency with ACPI memory
> management conventions.
This is just a conventional thing because ACPI_FREE() in Linux is
implemented as kfree().
There is no correctness issue here, just the convention is not
followed, so please update the changelog.
> Signed-off-by: Kaushlendra Kumar <kaushlendra.kumar@intel.com>
> ---
> drivers/acpi/dptf/dptf_pch_fivr.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/acpi/dptf/dptf_pch_fivr.c b/drivers/acpi/dptf/dptf_pch_fivr.c
> index 952216c67d58..8d7e555929d3 100644
> --- a/drivers/acpi/dptf/dptf_pch_fivr.c
> +++ b/drivers/acpi/dptf/dptf_pch_fivr.c
> @@ -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;
> }
>
> --
> 2.34.1
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: [PATCH] ACPI / DPTF: Use ACPI_FREE() for ACPI buffer deallocation
2025-10-22 19:01 ` Rafael J. Wysocki
@ 2025-10-28 5:20 ` Kumar, Kaushlendra
0 siblings, 0 replies; 3+ messages in thread
From: Kumar, Kaushlendra @ 2025-10-28 5:20 UTC (permalink / raw)
To: Rafael J. Wysocki
Cc: Zhang, Rui, srinivas.pandruvada@linux.intel.com, lenb@kernel.org,
linux-acpi@vger.kernel.org
> This is just a conventional thing because ACPI_FREE() in Linux is implemented as kfree().
>
> There is no correctness issue here, just the convention is not followed, so please update the changelog.
You're right. I have update the changelog in V2 patch to clarify this is about
following ACPI coding conventions rather than fixing a functional issue.
Thanks for the feedback!
Kaushlendra
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-10-28 5:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-06 4:53 [PATCH] ACPI / DPTF: Use ACPI_FREE() for ACPI buffer deallocation Kaushlendra Kumar
2025-10-22 19:01 ` Rafael J. Wysocki
2025-10-28 5:20 ` Kumar, Kaushlendra
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).