Re: [PATCH 2/3] Input: soc_button_array - use __free() cleanup facilities to free memory
From: Dmitry Torokhov
Date: Wed Oct 21 2026 - 13:53:32 EST
On Wed, Oct 21, 2026 at 08:43:02PM +0300, Andy Shevchenko wrote:
> 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?
Fair enough. I'll add a todo to switch once it hits mainline.
Thanks.
--
Dmitry