public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: "Danilo Krummrich" <dakr@kernel.org>
To: "Gary Guo" <gary@kernel.org>
Cc: "Gary Guo" <gary@garyguo.net>, "Miguel Ojeda" <ojeda@kernel.org>,
	"Boqun Feng" <boqun@kernel.org>,
	"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>,
	"Abdiel Janulgue" <abdiel.janulgue@gmail.com>,
	"Daniel Almeida" <daniel.almeida@collabora.com>,
	"Robin Murphy" <robin.murphy@arm.com>,
	"FUJITA Tomonori" <fujita.tomonori@gmail.com>,
	"Alexandre Courbot" <acourbot@nvidia.com>,
	"Yury Norov" <yury.norov@gmail.com>,
	"Will Deacon" <will@kernel.org>,
	"Peter Zijlstra" <peterz@infradead.org>,
	"Mark Rutland" <mark.rutland@arm.com>,
	"Ingo Molnar" <mingo@redhat.com>,
	"Waiman Long" <longman@redhat.com>,
	"Tamir Duberstein" <tamird@kernel.org>,
	rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org,
	driver-core@lists.linux.dev, netdev@vger.kernel.org
Subject: Re: [PATCH v2 4/4] rust: make `build_assert` module the home of related macros
Date: Mon, 16 Mar 2026 18:44:53 +0100	[thread overview]
Message-ID: <DH4E6KJDQJBP.1UR72LIQA0Q92@kernel.org> (raw)
In-Reply-To: <20260316150720.1646109-5-gary@kernel.org>

On Mon Mar 16, 2026 at 4:07 PM CET, Gary Guo wrote:
> diff --git a/rust/kernel/dma.rs b/rust/kernel/dma.rs
> index a396f8435739..bef3f33cf2ea 100644
> --- a/rust/kernel/dma.rs
> +++ b/rust/kernel/dma.rs
> @@ -5,12 +5,14 @@
>  //! C header: [`include/linux/dma-mapping.h`](srctree/include/linux/dma-mapping.h)
>  
>  use crate::{
> -    bindings, build_assert, device,
> +    bindings,
> +    build_assert::build_assert,

I think we can just drop it, as we already include prelude.

> +    device,
>      device::{Bound, Core},
>      error::{to_result, Result},
>      prelude::*,
>      sync::aref::ARef,
> -    transmute::{AsBytes, FromBytes},
> +    transmute::{AsBytes, FromBytes}, //
>  };
>  use core::ptr::NonNull;
>  
> diff --git a/rust/kernel/io/resource.rs b/rust/kernel/io/resource.rs
> index b7ac9faf141d..9cb18ce1c479 100644
> --- a/rust/kernel/io/resource.rs
> +++ b/rust/kernel/io/resource.rs
> @@ -229,7 +229,7 @@ impl Flags {
>      // Always inline to optimize out error path of `build_assert`.
>      #[inline(always)]
>      const fn new(value: u32) -> Self {
> -        crate::build_assert!(value as u64 <= c_ulong::MAX as u64);
> +        crate::build_assert::build_assert!(value as u64 <= c_ulong::MAX as u64);

We include the prelude here as well, so this should also be just
build_assert!().

>          Flags(value as c_ulong)
>      }
>  }

      reply	other threads:[~2026-03-16 17:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20260316150720.1646109-1-gary@kernel.org>
2026-03-16 15:07 ` [PATCH v2 4/4] rust: make `build_assert` module the home of related macros Gary Guo
2026-03-16 17:44   ` Danilo Krummrich [this message]

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=DH4E6KJDQJBP.1UR72LIQA0Q92@kernel.org \
    --to=dakr@kernel.org \
    --cc=a.hindborg@kernel.org \
    --cc=abdiel.janulgue@gmail.com \
    --cc=acourbot@nvidia.com \
    --cc=aliceryhl@google.com \
    --cc=bjorn3_gh@protonmail.com \
    --cc=boqun@kernel.org \
    --cc=daniel.almeida@collabora.com \
    --cc=driver-core@lists.linux.dev \
    --cc=fujita.tomonori@gmail.com \
    --cc=gary@garyguo.net \
    --cc=gary@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=longman@redhat.com \
    --cc=lossin@kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mingo@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=ojeda@kernel.org \
    --cc=peterz@infradead.org \
    --cc=robin.murphy@arm.com \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=tamird@kernel.org \
    --cc=tmgross@umich.edu \
    --cc=will@kernel.org \
    --cc=yury.norov@gmail.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