[PATCH] rust: bitfield: remove unnecessary `#[allow]`
From: Gary Guo
Date: Thu Sep 10 2026 - 13:32:09 EST
From: Gary Guo <gary@xxxxxxxxxxx>
The `#[allow(non_camel_case_types)]` was there because register names can
be commonly SCREAMING_CASE and thus not CamelCase. However, when a bitfield
type is created by itself, this justification does not apply. Thus, remove
it.
Users that want to use non-standard styles can add the `#[allow]`
themselves. For example, the invocation of `bitfield!` inside `register!`
macro carry this annotation.
Signed-off-by: Gary Guo <gary@xxxxxxxxxxx>
---
rust/kernel/bitfield.rs | 1 -
1 file changed, 1 deletion(-)
diff --git a/rust/kernel/bitfield.rs b/rust/kernel/bitfield.rs
index 15c78790e151..8d7d78175336 100644
--- a/rust/kernel/bitfield.rs
+++ b/rust/kernel/bitfield.rs
@@ -295,7 +295,6 @@ macro_rules! bitfield {
$(#[$attr:meta])* $vis:vis struct $name:ident($storage:ty) { $($fields:tt)* }
) => {
$crate::bitfield!(@core
- #[allow(non_camel_case_types)]
$(#[$attr])* $vis $name $storage
);
$crate::bitfield!(@fields $vis $name $storage { $($fields)* });
base-commit: 73e5616f3d197c1af5a04a481fe0f13aa3913bd1
--
2.54.0