Re: [PATCH 2/3] Input: soc_button_array - use __free() cleanup facilities to free memory
From: Andy Shevchenko
Date: Wed Oct 21 2026 - 13:50:27 EST
On Wed, Oct 21, 2026 at 10:15:43AM -0700, Dmitry Torokhov wrote:
> On Wed, Oct 21, 2026 at 08:05:37PM +0300, Andy Shevchenko wrote:
> > On Tue, Oct 20, 2026 at 06:50:00PM -0700, Dmitry Torokhov wrote:
...
> > > + const union acpi_object *desc __free(kfree) = buf.pointer;
> >
> > Rafael added 'acpi_object_free' for __free() (pun wasn't intended :-).
>
> Not sure why it is better... It goes through ACPI_FREE() ->
> acpi_os_free() wrappers which might be nice for ACPICA code, but has
> limited utility in the rest of the kernel code...
Today it might be similar, tomorrow it might be different. ACPI objects should
be freed with their proper APIs at least for the sake of consistency, no?
--
With Best Regards,
Andy Shevchenko