* [PATCH] gpu: nova-core: remove `#[allow(non_snake_case)]`
@ 2026-06-12 12:34 Gary Guo
2026-06-12 18:46 ` Onur Özkan
2026-06-12 20:20 ` Danilo Krummrich
0 siblings, 2 replies; 3+ messages in thread
From: Gary Guo @ 2026-06-12 12:34 UTC (permalink / raw)
To: Danilo Krummrich, Alexandre Courbot, Alice Ryhl, David Airlie,
Simona Vetter, Miguel Ojeda, Boqun Feng, Gary Guo,
Björn Roy Baron, Benno Lossin, Andreas Hindborg,
Trevor Gross
Cc: nova-gpu, dri-devel, linux-kernel, rust-for-linux
From: Gary Guo <gary@garyguo.net>
Since commit 5423ef9d4db8 ("rust: pin-init: internal: suppress
`non_snake_case` lint in `[pin_]init!`"), mere use of the non-snake-case
identifiers would not cause the warning to be generated. Thus remove these
allows.
Signed-off-by: Gary Guo <gary@garyguo.net>
---
This should be applied after the merge window when v7.2-rc1 is backmerged
to drm-rust-next tree, so the pin-init changes are picked up.
---
drivers/gpu/nova-core/gsp/fw.rs | 8 --------
drivers/gpu/nova-core/gsp/fw/commands.rs | 2 --
2 files changed, 10 deletions(-)
diff --git a/drivers/gpu/nova-core/gsp/fw.rs b/drivers/gpu/nova-core/gsp/fw.rs
index 4db0cfa4dc4d..d96ea0b216b4 100644
--- a/drivers/gpu/nova-core/gsp/fw.rs
+++ b/drivers/gpu/nova-core/gsp/fw.rs
@@ -219,7 +219,6 @@ pub(crate) fn new<'a>(
gsp_firmware: &'a GspFirmware,
fb_layout: &'a FbLayout,
) -> impl Init<Self> + 'a {
- #[allow(non_snake_case)]
let init_inner = init!(bindings::GspFwWprMeta {
// CAST: we want to store the bits of `GSP_FW_WPR_META_MAGIC` unmodified.
magic: bindings::GSP_FW_WPR_META_MAGIC as u64,
@@ -674,7 +673,6 @@ fn id8(name: &str) -> u64 {
u64::from_ne_bytes(bytes)
}
- #[allow(non_snake_case)]
let init_inner = init!(bindings::LibosMemoryRegionInitArgument {
id8: id8(name),
pa: obj.dma_handle(),
@@ -793,7 +791,6 @@ impl GspMsgElement {
/// * `sequence` - Sequence number of the message.
/// * `cmd_size` - Size of the command (not including the message element), in bytes.
/// * `function` - Function of the message.
- #[allow(non_snake_case)]
pub(crate) fn init(
sequence: u32,
cmd_size: usize,
@@ -876,7 +873,6 @@ pub(crate) struct GspArgumentsCached {
impl GspArgumentsCached {
/// Creates the arguments for starting the GSP up using `cmdq` as its command queue.
pub(crate) fn new(cmdq: &Cmdq) -> impl Init<Self> + '_ {
- #[allow(non_snake_case)]
let init_inner = init!(bindings::GSP_ARGUMENTS_CACHED {
messageQueueInitArguments <- MessageQueueInitArguments::new(cmdq),
bDmemStack: 1,
@@ -923,7 +919,6 @@ unsafe impl FromBytes for GspArgumentsPadded {}
impl MessageQueueInitArguments {
/// Creates a new init arguments structure for `cmdq`.
- #[allow(non_snake_case)]
fn new(cmdq: &Cmdq) -> impl Init<Self> + '_ {
init!(MessageQueueInitArguments {
sharedMemPhysAddr: cmdq.dma_handle,
@@ -947,7 +942,6 @@ pub(crate) enum GspDmaTarget {
impl GspAcrBootGspRmParams {
fn new(target: GspDmaTarget, wpr_meta_addr: u64) -> impl Init<Self> {
- #[allow(non_snake_case)]
let params = init!(Self {
target: target as u32,
gspRmDescSize: num::usize_into_u32::<{ size_of::<GspFwWprMeta>() }>(),
@@ -966,7 +960,6 @@ fn new(target: GspDmaTarget, wpr_meta_addr: u64) -> impl Init<Self> {
impl GspRmParams {
fn new(target: GspDmaTarget, libos_addr: u64) -> impl Init<Self> {
- #[allow(non_snake_case)]
let params = init!(Self {
target: target as u32,
bootArgsOffset: libos_addr,
@@ -986,7 +979,6 @@ unsafe impl FromBytes for GspFmcBootParams {}
impl GspFmcBootParams {
pub(crate) fn new(wpr_meta_addr: u64, libos_addr: u64) -> impl Init<Self> {
- #[allow(non_snake_case)]
let init = init!(Self {
// Blackwell FSP obtains WPR info from other sources, so
// wprCarveoutOffset and wprCarveoutSize are left zero.
diff --git a/drivers/gpu/nova-core/gsp/fw/commands.rs b/drivers/gpu/nova-core/gsp/fw/commands.rs
index 7bcc41fc7fa0..6c31d825b746 100644
--- a/drivers/gpu/nova-core/gsp/fw/commands.rs
+++ b/drivers/gpu/nova-core/gsp/fw/commands.rs
@@ -27,7 +27,6 @@ pub(crate) struct GspSetSystemInfo {
impl GspSetSystemInfo {
/// Returns an in-place initializer for the `GspSetSystemInfo` command.
- #[allow(non_snake_case)]
pub(crate) fn init<'a>(
dev: &'a pci::Device<device::Bound>,
chipset: Chipset,
@@ -99,7 +98,6 @@ pub(crate) struct PackedRegistryTable {
}
impl PackedRegistryTable {
- #[allow(non_snake_case)]
pub(crate) fn init(num_entries: u32, size: u32) -> impl Init<Self> {
type InnerPackedRegistryTable = bindings::PACKED_REGISTRY_TABLE;
let init_inner = init!(InnerPackedRegistryTable {
base-commit: 614f7220e548a8df6262887c0140d9267841dbc1
--
2.54.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] gpu: nova-core: remove `#[allow(non_snake_case)]`
2026-06-12 12:34 [PATCH] gpu: nova-core: remove `#[allow(non_snake_case)]` Gary Guo
@ 2026-06-12 18:46 ` Onur Özkan
2026-06-12 20:20 ` Danilo Krummrich
1 sibling, 0 replies; 3+ messages in thread
From: Onur Özkan @ 2026-06-12 18:46 UTC (permalink / raw)
To: Gary Guo
Cc: Danilo Krummrich, Alexandre Courbot, Alice Ryhl, David Airlie,
Simona Vetter, Miguel Ojeda, Boqun Feng, Gary Guo,
Björn Roy Baron, Benno Lossin, Andreas Hindborg,
Trevor Gross, nova-gpu, dri-devel, linux-kernel, rust-for-linux,
Onur Özkan
On Fri, 12 Jun 2026 13:34:00 +0100
Gary Guo <gary@kernel.org> wrote:
> From: Gary Guo <gary@garyguo.net>
>
> Since commit 5423ef9d4db8 ("rust: pin-init: internal: suppress
> `non_snake_case` lint in `[pin_]init!`"), mere use of the non-snake-case
> identifiers would not cause the warning to be generated. Thus remove these
> allows.
>
> Signed-off-by: Gary Guo <gary@garyguo.net>
> ---
> This should be applied after the merge window when v7.2-rc1 is backmerged
> to drm-rust-next tree, so the pin-init changes are picked up.
> ---
> drivers/gpu/nova-core/gsp/fw.rs | 8 --------
> drivers/gpu/nova-core/gsp/fw/commands.rs | 2 --
> 2 files changed, 10 deletions(-)
>
> diff --git a/drivers/gpu/nova-core/gsp/fw.rs b/drivers/gpu/nova-core/gsp/fw.rs
> index 4db0cfa4dc4d..d96ea0b216b4 100644
> --- a/drivers/gpu/nova-core/gsp/fw.rs
> +++ b/drivers/gpu/nova-core/gsp/fw.rs
> @@ -219,7 +219,6 @@ pub(crate) fn new<'a>(
> gsp_firmware: &'a GspFirmware,
> fb_layout: &'a FbLayout,
> ) -> impl Init<Self> + 'a {
> - #[allow(non_snake_case)]
> let init_inner = init!(bindings::GspFwWprMeta {
> // CAST: we want to store the bits of `GSP_FW_WPR_META_MAGIC` unmodified.
> magic: bindings::GSP_FW_WPR_META_MAGIC as u64,
> @@ -674,7 +673,6 @@ fn id8(name: &str) -> u64 {
> u64::from_ne_bytes(bytes)
> }
>
> - #[allow(non_snake_case)]
> let init_inner = init!(bindings::LibosMemoryRegionInitArgument {
> id8: id8(name),
> pa: obj.dma_handle(),
> @@ -793,7 +791,6 @@ impl GspMsgElement {
> /// * `sequence` - Sequence number of the message.
> /// * `cmd_size` - Size of the command (not including the message element), in bytes.
> /// * `function` - Function of the message.
> - #[allow(non_snake_case)]
> pub(crate) fn init(
> sequence: u32,
> cmd_size: usize,
> @@ -876,7 +873,6 @@ pub(crate) struct GspArgumentsCached {
> impl GspArgumentsCached {
> /// Creates the arguments for starting the GSP up using `cmdq` as its command queue.
> pub(crate) fn new(cmdq: &Cmdq) -> impl Init<Self> + '_ {
> - #[allow(non_snake_case)]
> let init_inner = init!(bindings::GSP_ARGUMENTS_CACHED {
> messageQueueInitArguments <- MessageQueueInitArguments::new(cmdq),
> bDmemStack: 1,
> @@ -923,7 +919,6 @@ unsafe impl FromBytes for GspArgumentsPadded {}
>
> impl MessageQueueInitArguments {
> /// Creates a new init arguments structure for `cmdq`.
> - #[allow(non_snake_case)]
> fn new(cmdq: &Cmdq) -> impl Init<Self> + '_ {
> init!(MessageQueueInitArguments {
> sharedMemPhysAddr: cmdq.dma_handle,
> @@ -947,7 +942,6 @@ pub(crate) enum GspDmaTarget {
>
> impl GspAcrBootGspRmParams {
> fn new(target: GspDmaTarget, wpr_meta_addr: u64) -> impl Init<Self> {
> - #[allow(non_snake_case)]
> let params = init!(Self {
> target: target as u32,
> gspRmDescSize: num::usize_into_u32::<{ size_of::<GspFwWprMeta>() }>(),
> @@ -966,7 +960,6 @@ fn new(target: GspDmaTarget, wpr_meta_addr: u64) -> impl Init<Self> {
>
> impl GspRmParams {
> fn new(target: GspDmaTarget, libos_addr: u64) -> impl Init<Self> {
> - #[allow(non_snake_case)]
> let params = init!(Self {
> target: target as u32,
> bootArgsOffset: libos_addr,
> @@ -986,7 +979,6 @@ unsafe impl FromBytes for GspFmcBootParams {}
>
> impl GspFmcBootParams {
> pub(crate) fn new(wpr_meta_addr: u64, libos_addr: u64) -> impl Init<Self> {
> - #[allow(non_snake_case)]
> let init = init!(Self {
> // Blackwell FSP obtains WPR info from other sources, so
> // wprCarveoutOffset and wprCarveoutSize are left zero.
> diff --git a/drivers/gpu/nova-core/gsp/fw/commands.rs b/drivers/gpu/nova-core/gsp/fw/commands.rs
> index 7bcc41fc7fa0..6c31d825b746 100644
> --- a/drivers/gpu/nova-core/gsp/fw/commands.rs
> +++ b/drivers/gpu/nova-core/gsp/fw/commands.rs
> @@ -27,7 +27,6 @@ pub(crate) struct GspSetSystemInfo {
>
> impl GspSetSystemInfo {
> /// Returns an in-place initializer for the `GspSetSystemInfo` command.
> - #[allow(non_snake_case)]
> pub(crate) fn init<'a>(
> dev: &'a pci::Device<device::Bound>,
> chipset: Chipset,
> @@ -99,7 +98,6 @@ pub(crate) struct PackedRegistryTable {
> }
>
> impl PackedRegistryTable {
> - #[allow(non_snake_case)]
> pub(crate) fn init(num_entries: u32, size: u32) -> impl Init<Self> {
> type InnerPackedRegistryTable = bindings::PACKED_REGISTRY_TABLE;
> let init_inner = init!(InnerPackedRegistryTable {
>
> base-commit: 614f7220e548a8df6262887c0140d9267841dbc1
> --
> 2.54.0
>
Reviewed-by: Onur Özkan <work@onurozkan.dev>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] gpu: nova-core: remove `#[allow(non_snake_case)]`
2026-06-12 12:34 [PATCH] gpu: nova-core: remove `#[allow(non_snake_case)]` Gary Guo
2026-06-12 18:46 ` Onur Özkan
@ 2026-06-12 20:20 ` Danilo Krummrich
1 sibling, 0 replies; 3+ messages in thread
From: Danilo Krummrich @ 2026-06-12 20:20 UTC (permalink / raw)
To: Gary Guo
Cc: Gary Guo, Alexandre Courbot, Alice Ryhl, David Airlie,
Simona Vetter, Miguel Ojeda, Boqun Feng, Björn Roy Baron,
Benno Lossin, Andreas Hindborg, Trevor Gross, nova-gpu, dri-devel,
linux-kernel, rust-for-linux
On Fri Jun 12, 2026 at 2:34 PM CEST, Gary Guo wrote:
> This should be applied after the merge window when v7.2-rc1 is backmerged
> to drm-rust-next tree, so the pin-init changes are picked up.
Noted, thanks!
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-06-12 20:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-12 12:34 [PATCH] gpu: nova-core: remove `#[allow(non_snake_case)]` Gary Guo
2026-06-12 18:46 ` Onur Özkan
2026-06-12 20:20 ` Danilo Krummrich
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox