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: falcon: introduce `bounded_enum` macro Date: Sun, 22 Mar 2026 03:45:05 +1000 Message-ID: In-Reply-To: <20260320-b4-nova-register-v2-7-88fcf103e8d4@nvidia.com> References: <20260320-b4-nova-register-v2-0-88fcf103e8d4@nvidia.com> <20260320-b4-nova-register-v2-7-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 Well-designed macro that supports both `TryFrom` (partial coverage) and `From` (exhaustive coverage via `build_error!`). The compile-time assertion: ```rust const { assert!( $value < (1 << $length), "Enum variant doesn't fit into assigned `Bounded` type." ); } ``` is good for catching mismatches. The `#[expect(unused)]` on the macro is appropriate since it's introduced ahead of use. One minor note: the `From` implementation uses `build_error!` in the wildcard arm to enforce exhaustive coverage at compile time, which is clever but relies on the optimizer to eliminate the dead branch. This is a standard pattern in the kernel crate. --- Generated by Claude Code Patch Reviewer