Re: [PATCH 2/3] Input: soc_button_array - use __free() cleanup facilities to free memory

From: Dmitry Torokhov

Date: Wed Oct 21 2026 - 13:22:05 EST


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:
> > Switch to using __free(kfree) cleanup facilities instead of doing manual
> > cleanup or abusing devm for allocations that are only needed during
> > probing.
>
> ...
>
> > + 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...

Thanks.

--
Dmitry