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: Define user readable error codes for atomic ioctl Date: Wed, 11 Feb 2026 16:31:47 +1000 Message-ID: In-Reply-To: <20260210-atomic-v9-1-525c88fd2402@intel.com> References: <20260210-atomic-v9-0-525c88fd2402@intel.com> <20260210-atomic-v9-1-525c88fd2402@intel.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Mailer: Claude Code Patch Reviewer Patch Review **Issues:** ```c +/** + * enum drm_mode_atomic_failure_codes - error codes for failures in atomic_ioctl + * @DRM_MODE_ATOMIC_INVALID_API_USAGE: invallid API usage(DRM_ATOMIC not + * enabled, invalid falg, page_flip event + * with test-only, etc) ``` - **Typo**: "invallid" should be "invalid" - **Typo**: "falg" should be "flag" - **Style**: Missing space after "usage" and before the opening parenthesis ```c + * @DRM_MODE_ATOMIC_CRTC_NEED_FULL_MODESET: Need full modeset on this crtc ``` - **Consistency**: "Need" should be lowercase to match kernel-doc style ```c +/** + * struct drm_mode_atomic_err_code - struct to store the error code + * + * pointer to this struct will be stored in reserved variable of + * struct drm_mode_atomic to report the failure cause to the user. ``` - **Missing @**: First line should mention "struct to store" in the brief, the detailed description should be below the field descriptions - Unconventional structure for kernel-doc ```c + * @failure_code: error codes defined in enum drm_moide_atomic_failure_code ``` - **Typo**: "drm_moide_atomic_failure_code" should be "drm_mode_atomic_failure_codes" ```c +struct drm_mode_atomic_err_code { + __u64 failure_code; + __u64 failure_objs_ptr; + __u64 reserved; + __u32 count_objs; + char failure_string[DRM_MODE_ATOMIC_FAILURE_STRING_LEN]; +}; ``` - **ABI Concern**: `failure_objs_ptr` is documented as a pointer but using it from kernel to userspace is complex. How is memory management handled? Who allocates? This needs clarification. - **Padding**: Structure has implicit padding after `count_objs` before `failure_string`. Should be explicit or reordered. - **String Safety**: Fixed-size string without explicit null-termination guarantee is risky. --- Generated by Claude Code Patch Reviewer