public inbox for rust-for-linux@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/tyr: suppress unread field warnings
@ 2026-01-22  0:37 Deborah Brouwer
  2026-01-22  0:58 ` Miguel Ojeda
  2026-01-22  8:42 ` Alice Ryhl
  0 siblings, 2 replies; 16+ messages in thread
From: Deborah Brouwer @ 2026-01-22  0:37 UTC (permalink / raw)
  To: dri-devel, rust-for-linux
  Cc: daniel.almeida, aliceryhl, boris.brezillon, broonie, dakr,
	miguel.ojeda.sandonis, Deborah Brouwer

Currently these warnings, as errors, are preventing Tyr driver
from building:

error: field `device` is never read
  --> drivers/gpu/drm/tyr/driver.rs:37:5
   |
36 | pub(crate) struct TyrDriver {
   |                   --------- field in this struct
37 |     device: ARef<TyrDevice>,
   |     ^^^^^^
   |
   = note: `-D dead-code` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(dead_code)]`

error: fields `mali` and `sram` are never read
   --> drivers/gpu/drm/tyr/driver.rs:196:5
    |
195 | struct Regulators {
    |        ---------- fields in this struct
196 |     mali: Regulator<regulator::Enabled>,
    |     ^^^^
197 |     sram: Regulator<regulator::Enabled>,
    |     ^^^^

error: aborting due to 2 previous errors

Suppress these errors so that the Tyr driver will build.

Signed-off-by: Deborah Brouwer <deborah.brouwer@collabora.com>
---
 drivers/gpu/drm/tyr/driver.rs | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/tyr/driver.rs b/drivers/gpu/drm/tyr/driver.rs
index 2a45d0288825..04c865cb4397 100644
--- a/drivers/gpu/drm/tyr/driver.rs
+++ b/drivers/gpu/drm/tyr/driver.rs
@@ -34,6 +34,7 @@
 
 #[pin_data(PinnedDrop)]
 pub(crate) struct TyrDriver {
+    #[allow(dead_code)]
     device: ARef<TyrDevice>,
 }
 
@@ -193,6 +194,8 @@ struct Clocks {
 
 #[pin_data]
 struct Regulators {
+    #[allow(dead_code)]
     mali: Regulator<regulator::Enabled>,
+    #[allow(dead_code)]
     sram: Regulator<regulator::Enabled>,
 }
-- 
2.52.0


^ permalink raw reply related	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2026-01-24 13:15 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-22  0:37 [PATCH] drm/tyr: suppress unread field warnings Deborah Brouwer
2026-01-22  0:58 ` Miguel Ojeda
2026-01-22  2:11   ` Deborah Brouwer
2026-01-22 11:22   ` Mark Brown
2026-01-22 19:46     ` Danilo Krummrich
2026-01-23 15:01       ` Miguel Ojeda
2026-01-23 15:10         ` Alice Ryhl
2026-01-23 15:24           ` Miguel Ojeda
2026-01-23 16:56             ` Gary Guo
2026-01-24 13:14     ` Miguel Ojeda
2026-01-22  8:42 ` Alice Ryhl
2026-01-22 19:05   ` Deborah Brouwer
2026-01-23 12:08     ` Alice Ryhl
2026-01-22 19:32   ` Gary Guo
2026-01-23  9:18     ` Alice Ryhl
2026-01-23 13:36     ` Miguel Ojeda

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox