The associated constants describing the range, mask and shift of each
field do not carry any doccomment. This triggers the `missing_docs` lint
on bitfields declared with `pub` visibility.

Add a simple doccomment to get rid of that warning.

Signed-off-by: Alexandre Courbot <[email protected]>
---
 rust/kernel/bitfield.rs | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/rust/kernel/bitfield.rs b/rust/kernel/bitfield.rs
index 8d7d78175336..22b1575c177c 100644
--- a/rust/kernel/bitfield.rs
+++ b/rust/kernel/bitfield.rs
@@ -386,9 +386,12 @@ impl $name {
         @private_field_accessors $vis:vis $name:ident $storage:ty : 
$hi:tt:$lo:tt $field:ident
     ) => {
         ::kernel::macros::paste!(
+        #[doc = concat!("Bit range of the `", stringify!($field), "` field.")]
         $vis const [<$field:upper _RANGE>]: ::core::ops::RangeInclusive<u8> = 
$lo..=$hi;
+        #[doc = concat!("Bit mask of the `", stringify!($field), "` field.")]
         $vis const [<$field:upper _MASK>]: $storage =
             ((((1 << $hi) - 1) << 1) + 1) - ((1 << $lo) - 1);
+        #[doc = concat!("Bit shift of the `", stringify!($field), "` field.")]
         $vis const [<$field:upper _SHIFT>]: u32 = $lo;
         );
 

-- 
2.56.1

Reply via email to