From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot To: dri-devel-reviews@example.com Subject: Claude review: gpu: nova-core: convert PMC registers to kernel register macro Date: Sun, 22 Mar 2026 03:45:04 +1000 Message-ID: In-Reply-To: <20260320-b4-nova-register-v2-1-88fcf103e8d4@nvidia.com> References: <20260320-b4-nova-register-v2-0-88fcf103e8d4@nvidia.com> <20260320-b4-nova-register-v2-1-88fcf103e8d4@nvidia.com> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 Patch Review The commit message mentions introducing `nv_reg` macro, but per v2 changelog this was dropped. The commit message should be updated to remove the `nv_reg` reference: > nova-core's registers have some constant properties (like a 32-bit size > and a crate visibility), so introduce the `nv_reg` macro to shorten > their declaration. This text is stale from v1. In `regs.rs`, the `Display` impl for `NV_PMC_BOOT_42` uses `self.inner`: ```rust self.inner, ``` while the `architecture_raw` method uses `self.into_raw()`: ```rust ((self.into_raw() >> Self::ARCHITECTURE_RANGE.start()) ``` This is inconsistent. Since `into_raw()` is the proper accessor pattern for the kernel register macro, `self.inner` should likely also be `self.into_raw()`. However, this depends on whether the kernel macro exposes `inner` as a public field -- it may do so, but using `into_raw()` would be more consistent. Since I can't verify the kernel macro's API (it's on drm-rust-next, not drm-next), this is a potential issue worth flagging. The `From for Bounded` impl is more verbose than the old `repr(u8)` cast but is required by the new type system. The `Bounded::new::()` pattern is clear. --- Generated by Claude Code Patch Reviewer