mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Yury Norov <ynorov@nvidia.com>
To: Alexandre Courbot <acourbot@nvidia.com>
Cc: "Yury Norov" <yury.norov@gmail.com>,
	"Miguel Ojeda" <ojeda@kernel.org>,
	"Boqun Feng" <boqun@kernel.org>, "Gary Guo" <gary@garyguo.net>,
	"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
	"Benno Lossin" <lossin@kernel.org>,
	"Andreas Hindborg" <a.hindborg@kernel.org>,
	"Alice Ryhl" <aliceryhl@google.com>,
	"Trevor Gross" <tmgross@umich.edu>,
	"Danilo Krummrich" <dakr@kernel.org>,
	"Daniel Almeida" <daniel.almeida@collabora.com>,
	"Tamir Duberstein" <tamird@kernel.org>,
	"Onur Özkan" <work@onurozkan.dev>,
	"David Airlie" <airlied@gmail.com>,
	"Simona Vetter" <simona@ffwll.ch>,
	"Bjorn Helgaas" <bhelgaas@google.com>,
	"Krzysztof Wilczyński" <kwilczynski@kernel.org>,
	"Alistair Popple" <apopple@nvidia.com>,
	"John Hubbard" <jhubbard@nvidia.com>,
	"Timur Tabi" <ttabi@nvidia.com>,
	"Eliot Courtney" <ecourtney@nvidia.com>,
	"Zhi Wang" <zhiw@nvidia.com>,
	rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org,
	nova-gpu@lists.linux.dev, dri-devel@lists.freedesktop.org,
	linux-pci@vger.kernel.org
Subject: Re: [PATCH v3 1/3] rust: bitfield: add missing doccomments for associated constants
Date: Wed, 2 Dec 2026 20:16:19 -0500	[thread overview]
Message-ID: <axDC4zo-17hGEbj7@yury> (raw)
In-Reply-To: <20261201-nova-gsp-dbd-v3-1-3ec5deeaed2e@nvidia.com>

On Tue, Dec 01, 2026 at 04:16:19PM +0900, Alexandre Courbot wrote:
> 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 <acourbot@nvidia.com>
> Reviewed-by: Eliot Courtney <ecourtney@nvidia.com>
> Reviewed-by: Gary Guo <gary@garyguo.net>
> Reviewed-by: Danilo Krummrich <dakr@kernel.org>

Would be nice to have before and after examples in this sort of
patches. Other than that,

Acked-by: Yury Norov <ynorov@nvidia.com>

> ---
>  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	other threads:[~2026-12-03  1:16 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-01  7:16 [PATCH v3 0/3] gpu: nova-core: gsp: fix the PCI location sent to GSP-RM Alexandre Courbot
2026-12-01  7:16 ` [PATCH v3 1/3] rust: bitfield: add missing doccomments for associated constants Alexandre Courbot
2026-12-03  1:16   ` Yury Norov [this message]
2026-12-01  7:16 ` [PATCH v3 2/3] rust: pci: return a bitfield type for dev_id Alexandre Courbot
2026-12-03  1:20   ` Yury Norov
2026-12-01  7:16 ` [PATCH v3 3/3] gpu: nova-core: gsp: send the PCI domain, bus and device to GSP-RM Alexandre Courbot
2026-12-01 12:50   ` Gary Guo
2026-12-03  1:27   ` Yury Norov
2026-12-01 15:08 ` [PATCH v3 0/3] gpu: nova-core: gsp: fix the PCI location sent " Alexandre Courbot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=axDC4zo-17hGEbj7@yury \
    --to=ynorov@nvidia.com \
    --cc=a.hindborg@kernel.org \
    --cc=acourbot@nvidia.com \
    --cc=airlied@gmail.com \
    --cc=aliceryhl@google.com \
    --cc=apopple@nvidia.com \
    --cc=bhelgaas@google.com \
    --cc=bjorn3_gh@protonmail.com \
    --cc=boqun@kernel.org \
    --cc=dakr@kernel.org \
    --cc=daniel.almeida@collabora.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=ecourtney@nvidia.com \
    --cc=gary@garyguo.net \
    --cc=jhubbard@nvidia.com \
    --cc=kwilczynski@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lossin@kernel.org \
    --cc=nova-gpu@lists.linux.dev \
    --cc=ojeda@kernel.org \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=simona@ffwll.ch \
    --cc=tamird@kernel.org \
    --cc=tmgross@umich.edu \
    --cc=ttabi@nvidia.com \
    --cc=work@onurozkan.dev \
    --cc=yury.norov@gmail.com \
    --cc=zhiw@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®