summaryrefslogtreecommitdiff
path: root/drivers/gpu
diff options
context:
space:
mode:
authorDeborah Brouwer <deborah.brouwer@collabora.com>2026-01-23 09:52:35 -0800
committerAlice Ryhl <aliceryhl@google.com>2026-01-23 20:14:22 +0000
commit5ec66bbc74883b73d169ceb25dcb7a5cb22e275b (patch)
treed3e4f6e113497438b6822ee8e8505b9376d87b81 /drivers/gpu
parent638eeda8abaa3e6afe6bd5758ef8045a7f33b9a0 (diff)
drm/tyr: suppress unread field warnings
Currently the rust compiler warns that certain fields in the TyrDriver are 'never read'. The fields are needed, but they are not read directly, they are only written into an 'impl PinInit' that is returned by probe. When warnings are compiled as errors, these warnings prevent Tyr from building. Suppress the warnings by adding underscores to the problematic variables. This allows Tyr to build again. Signed-off-by: Deborah Brouwer <deborah.brouwer@collabora.com> Link: https://patch.msgid.link/20260123175235.209092-1-deborah.brouwer@collabora.com Signed-off-by: Alice Ryhl <aliceryhl@google.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/tyr/driver.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/gpu/drm/tyr/driver.rs b/drivers/gpu/drm/tyr/driver.rs
index 2a45d0288825..568cb89aaed8 100644
--- a/drivers/gpu/drm/tyr/driver.rs
+++ b/drivers/gpu/drm/tyr/driver.rs
@@ -34,7 +34,7 @@ pub(crate) type TyrDevice = drm::Device<TyrDriver>;
#[pin_data(PinnedDrop)]
pub(crate) struct TyrDriver {
- device: ARef<TyrDevice>,
+ _device: ARef<TyrDevice>,
}
#[pin_data(PinnedDrop)]
@@ -127,8 +127,8 @@ impl platform::Driver for TyrDriver {
coregroup: coregroup_clk,
}),
regulators <- new_mutex!(Regulators {
- mali: mali_regulator,
- sram: sram_regulator,
+ _mali: mali_regulator,
+ _sram: sram_regulator,
}),
gpu_info,
});
@@ -136,7 +136,7 @@ impl platform::Driver for TyrDriver {
let tdev: ARef<TyrDevice> = drm::Device::new(pdev.as_ref(), data)?;
drm::driver::Registration::new_foreign_owned(&tdev, pdev.as_ref(), 0)?;
- let driver = TyrDriver { device: tdev };
+ let driver = TyrDriver { _device: tdev };
// We need this to be dev_info!() because dev_dbg!() does not work at
// all in Rust for now, and we need to see whether probe succeeded.
@@ -193,6 +193,6 @@ struct Clocks {
#[pin_data]
struct Regulators {
- mali: Regulator<regulator::Enabled>,
- sram: Regulator<regulator::Enabled>,
+ _mali: Regulator<regulator::Enabled>,
+ _sram: Regulator<regulator::Enabled>,
}