From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot To: dri-devel-reviews@example.com Subject: Claude review: drm/syncobj: add drm_syncobj_from_fd Date: Mon, 18 May 2026 16:53:30 +1000 Message-ID: In-Reply-To: <20260516-jorth-syncobj-v1-1-88ede9d98a81@gmail.com> References: <20260516-jorth-syncobj-v1-0-88ede9d98a81@gmail.com> <20260516-jorth-syncobj-v1-1-88ede9d98a81@gmail.com> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 Patch Review Clean extraction. Takes the fd-lookup logic from `drm_syncobj_fd_to_handle()` into a reusable `drm_syncobj_from_fd()`. One minor note: the function returns `NULL` on failure rather than an `ERR_PTR`. This is fine and consistent with `drm_syncobj_find()`, but the callers in patch 12 map `NULL` to `-EBADF` while the original code used `-EINVAL`. The error code change is arguably better (EBADF for a bad fd vs EINVAL), but it's a subtle UAPI behavior difference for the existing DRM ioctl path via `drm_syncobj_fd_to_handle()` which still returns `-EINVAL`. No issues. --- Generated by Claude Code Patch Reviewer