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 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 +++----- fs/eventfd.c | 3 +++ include/linux/eventfd.h | 3 +++ 3 files changed, 9 insertions(+), 5 deletions(-) --- base-commit: 587858367581b9c55c3690f4e63382ad622719d4 change-id: 20260826-efd-autofree-766608e8d8aa Best regards, -- Bence Csokas <[email protected]>
