From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot To: dri-devel-reviews@example.com Subject: Claude review: rust: drm: Pass registration data to ioctl handlers Date: Thu, 04 Jun 2026 12:03:18 +1000 Message-ID: In-Reply-To: <20260603011711.2077361-7-dakr@kernel.org> References: <20260603011711.2077361-1-dakr@kernel.org> <20260603011711.2077361-7-dakr@kernel.org> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 Patch Review This is where the `registration_data_with()` closure gets wired into the ioctl dispatch: ```rust + match guard.registration_data_with(|parent, reg_data| { + $func(dev, parent, reg_data, data, file) + }) { ``` The handler now receives 5 arguments: `dev`, `parent`, `reg_data`, `data`, `file`. The `registration_data_with()` closure provides both `parent` and `reg_data` with their lifetimes tied to the HRTB scope. The type-inference anchor is updated to match the new 5-argument signature. The nova/tyr drivers add `_reg_data: &()` since they use `ForLt!(())` as their `RegistrationData`. One observation: the handler signature is getting quite wide (5 parameters). This is manageable but worth keeping in mind for future API design. A struct-based approach could reduce parameter count, but that's a future consideration, not a problem now. --- Generated by Claude Code Patch Reviewer