All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Alexandre Courbot" <acourbot@nvidia.com>
To: "Danilo Krummrich" <dakr@kernel.org>
Cc: Alice Ryhl <aliceryhl@google.com>,
	Simona Vetter <simona@ffwll.ch>,
	Alistair Popple <apopple@nvidia.com>,
	Joel Fernandes <joelagnelf@nvidia.com>,
	Eliot Courtney <ecourtney@nvidia.com>,
	nouveau@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
	linux-kernel@vger.kernel.org, rust-for-linux@vger.kernel.org,
	Gary Guo <gary@garyguo.net>
Subject: Re: [PATCH v3 7/8] gpu: nova-core: use core library's CStr instead of kernel one
Date: Tue, 17 Feb 2026 23:10:02 +0900	[thread overview]
Message-ID: <DGHAPCX1JAWX.3B8VMCMPCZ7UG@nvidia.com> (raw)
In-Reply-To: <DGH77OGW8BFR.2NV0GJ1890DPF@kernel.org>

On Tue Feb 17, 2026 at 8:25 PM JST, Danilo Krummrich wrote:
> On Tue Feb 17, 2026 at 3:45 AM CET, Alexandre Courbot wrote:
>> The kernel's own CStr type has been replaced by the one in the core
>> library, and is now an alias to the latter. Change our imports to
>> directly reference the actual type.
>>
>> Reviewed-by: Lyude Paul <lyude@redhat.com>
>> Reviewed-by: Gary Guo <gary@garyguo.net>
>> Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
>> ---
>>  drivers/gpu/nova-core/firmware.rs     | 2 +-
>>  drivers/gpu/nova-core/firmware/gsp.rs | 6 +++++-
>>  drivers/gpu/nova-core/nova_core.rs    | 2 +-
>>  3 files changed, 7 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/gpu/nova-core/firmware.rs b/drivers/gpu/nova-core/firmware.rs
>> index 68779540aa28..2f7249383e51 100644
>> --- a/drivers/gpu/nova-core/firmware.rs
>> +++ b/drivers/gpu/nova-core/firmware.rs
>> @@ -424,7 +424,7 @@ const fn make_entry_chipset(self, chipset: &str) -> Self {
>>      }
>>  
>>      pub(crate) const fn create(
>> -        module_name: &'static kernel::str::CStr,
>> +        module_name: &'static core::ffi::CStr,
>>      ) -> firmware::ModInfoBuilder<N> {
>>          let mut this = Self(firmware::ModInfoBuilder::new(module_name));
>>          let mut i = 0;
>> diff --git a/drivers/gpu/nova-core/firmware/gsp.rs b/drivers/gpu/nova-core/firmware/gsp.rs
>> index 9488a626352f..ae3f6581c5b6 100644
>> --- a/drivers/gpu/nova-core/firmware/gsp.rs
>> +++ b/drivers/gpu/nova-core/firmware/gsp.rs
>> @@ -32,9 +32,13 @@
>>  /// that scheme before nova-core becomes stable, which means this module will eventually be
>>  /// removed.
>>  mod elf {
>> +    use core::{
>> +        ffi::CStr,
>> +        mem::size_of, //
>> +    };
>> +
>>      use kernel::{
>>          bindings,
>> -        prelude::*,
>>          transmute::FromBytes, //
>>      };
>
> What's the improvement in this change? Both of the ones factored out are already
> correctly imported through prelude. Let's keep it as is.

Mmm, either they weren't at the time I initially wrote this patch, or
I've been careless (the latter being more likely). I'll remove this.

WARNING: multiple messages have this Message-ID (diff)
From: "Alexandre Courbot" <acourbot@nvidia.com>
To: "Danilo Krummrich" <dakr@kernel.org>
Cc: "Alice Ryhl" <aliceryhl@google.com>,
	"Simona Vetter" <simona@ffwll.ch>,
	"Alistair Popple" <apopple@nvidia.com>,
	"Joel Fernandes" <joelagnelf@nvidia.com>,
	"Eliot Courtney" <ecourtney@nvidia.com>,
	<nouveau@lists.freedesktop.org>,
	<dri-devel@lists.freedesktop.org>, <linux-kernel@vger.kernel.org>,
	<rust-for-linux@vger.kernel.org>, "Gary Guo" <gary@garyguo.net>
Subject: Re: [PATCH v3 7/8] gpu: nova-core: use core library's CStr instead of kernel one
Date: Tue, 17 Feb 2026 23:10:02 +0900	[thread overview]
Message-ID: <DGHAPCX1JAWX.3B8VMCMPCZ7UG@nvidia.com> (raw)
In-Reply-To: <DGH77OGW8BFR.2NV0GJ1890DPF@kernel.org>

On Tue Feb 17, 2026 at 8:25 PM JST, Danilo Krummrich wrote:
> On Tue Feb 17, 2026 at 3:45 AM CET, Alexandre Courbot wrote:
>> The kernel's own CStr type has been replaced by the one in the core
>> library, and is now an alias to the latter. Change our imports to
>> directly reference the actual type.
>>
>> Reviewed-by: Lyude Paul <lyude@redhat.com>
>> Reviewed-by: Gary Guo <gary@garyguo.net>
>> Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
>> ---
>>  drivers/gpu/nova-core/firmware.rs     | 2 +-
>>  drivers/gpu/nova-core/firmware/gsp.rs | 6 +++++-
>>  drivers/gpu/nova-core/nova_core.rs    | 2 +-
>>  3 files changed, 7 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/gpu/nova-core/firmware.rs b/drivers/gpu/nova-core/firmware.rs
>> index 68779540aa28..2f7249383e51 100644
>> --- a/drivers/gpu/nova-core/firmware.rs
>> +++ b/drivers/gpu/nova-core/firmware.rs
>> @@ -424,7 +424,7 @@ const fn make_entry_chipset(self, chipset: &str) -> Self {
>>      }
>>  
>>      pub(crate) const fn create(
>> -        module_name: &'static kernel::str::CStr,
>> +        module_name: &'static core::ffi::CStr,
>>      ) -> firmware::ModInfoBuilder<N> {
>>          let mut this = Self(firmware::ModInfoBuilder::new(module_name));
>>          let mut i = 0;
>> diff --git a/drivers/gpu/nova-core/firmware/gsp.rs b/drivers/gpu/nova-core/firmware/gsp.rs
>> index 9488a626352f..ae3f6581c5b6 100644
>> --- a/drivers/gpu/nova-core/firmware/gsp.rs
>> +++ b/drivers/gpu/nova-core/firmware/gsp.rs
>> @@ -32,9 +32,13 @@
>>  /// that scheme before nova-core becomes stable, which means this module will eventually be
>>  /// removed.
>>  mod elf {
>> +    use core::{
>> +        ffi::CStr,
>> +        mem::size_of, //
>> +    };
>> +
>>      use kernel::{
>>          bindings,
>> -        prelude::*,
>>          transmute::FromBytes, //
>>      };
>
> What's the improvement in this change? Both of the ones factored out are already
> correctly imported through prelude. Let's keep it as is.

Mmm, either they weren't at the time I initially wrote this patch, or
I've been careless (the latter being more likely). I'll remove this.

  reply	other threads:[~2026-02-17 14:10 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-17  2:45 [PATCH v3 0/8] gpu: nova-core: miscellaneous improvements Alexandre Courbot
2026-02-17  2:45 ` Alexandre Courbot
2026-02-17  2:45 ` [PATCH v3 1/8] gpu: nova-core: gsp: warn if data remains after processing a message Alexandre Courbot
2026-02-17  2:45   ` Alexandre Courbot
2026-02-17  2:45 ` [PATCH v3 2/8] gpu: nova-core: gsp: remove unnecessary Display impls Alexandre Courbot
2026-02-17  2:45   ` Alexandre Courbot
2026-02-17  2:45 ` [PATCH v3 3/8] gpu: nova-core: gsp: simplify sequencer opcode parsing Alexandre Courbot
2026-02-17  2:45   ` Alexandre Courbot
2026-02-17  2:45 ` [PATCH v3 4/8] gpu: nova-core: gsp: remove unneeded sequencer trait Alexandre Courbot
2026-02-17  2:45   ` Alexandre Courbot
2026-02-17  2:45 ` [PATCH v3 5/8] gpu: nova-core: gsp: derive `Debug` on more sequencer types Alexandre Courbot
2026-02-17  2:45   ` Alexandre Courbot
2026-02-17  2:45 ` [PATCH v3 6/8] gpu: nova-core: gsp: derive Zeroable for GspStaticConfigInfo Alexandre Courbot
2026-02-17  2:45   ` Alexandre Courbot
2026-02-17  2:45 ` [PATCH v3 7/8] gpu: nova-core: use core library's CStr instead of kernel one Alexandre Courbot
2026-02-17  2:45   ` Alexandre Courbot
2026-02-17 11:25   ` Danilo Krummrich
2026-02-17 11:25     ` Danilo Krummrich
2026-02-17 14:10     ` Alexandre Courbot [this message]
2026-02-17 14:10       ` Alexandre Courbot
2026-02-17  2:45 ` [PATCH v3 8/8] gpu: nova-core: gsp: use available device reference Alexandre Courbot
2026-02-17  2:45   ` Alexandre Courbot
2026-02-17 11:33   ` Danilo Krummrich
2026-02-17 11:33     ` Danilo Krummrich
2026-02-17 11:33 ` [PATCH v3 0/8] gpu: nova-core: miscellaneous improvements Danilo Krummrich
2026-02-17 11:33   ` Danilo Krummrich
2026-02-19  2:12   ` Alexandre Courbot
2026-02-19  2:12     ` Alexandre Courbot
2026-02-25  1:01     ` Alexandre Courbot
2026-02-25  1:01       ` 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=DGHAPCX1JAWX.3B8VMCMPCZ7UG@nvidia.com \
    --to=acourbot@nvidia.com \
    --cc=aliceryhl@google.com \
    --cc=apopple@nvidia.com \
    --cc=dakr@kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=ecourtney@nvidia.com \
    --cc=gary@garyguo.net \
    --cc=joelagnelf@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nouveau@lists.freedesktop.org \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=simona@ffwll.ch \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.