Add __free() support to eventfd and update drm_syncobj to use it as an example consumer.
A minor discrepancy I encountered is whether to put a semicolon after DEFINE_FREE(). It seems some in-tree code does, some doesn't. In the end, I followed the example set in core-api/cleanup.rst, and omitted it. Signed-off-by: Bence Csokas <[email protected]> --- Changes in v3: - IS_ERR_OR_NULL() moved into DEFINE_FREE() body - Link to v2: https://patch.msgid.link/[email protected] Changes in v2: - IS_ERR_OR_NULL() check, instead of NULLing out pointer on IS_ERR - Link to v1: https://patch.msgid.link/[email protected] To: Alexander Viro <[email protected]> To: Christian Brauner <[email protected]> To: Jan Kara <[email protected]> To: Maarten Lankhorst <[email protected]> To: Maxime Ripard <[email protected]> To: Thomas Zimmermann <[email protected]> To: David Airlie <[email protected]> To: Simona Vetter <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] --- Bence Csokas (2): eventfd: Add scope-based cleanup capability drm/syncobj: Use scope-based cleanup for eventfd_ctx drivers/gpu/drm/drm_syncobj.c | 8 +++----- include/linux/eventfd.h | 3 +++ 2 files changed, 6 insertions(+), 5 deletions(-) --- base-commit: d135ab453a7400a34930bdda1ef4bdc8acfac80e change-id: 20260826-efd-autofree-766608e8d8aa Best regards, -- Bence Csokas <[email protected]>
