public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
* [PATCH net v3] net: phy: qt2025: Fix warning: unused import DeviceId
@ 2024-09-26 12:14 FUJITA Tomonori
  2024-09-27  8:46 ` Fiona Behrens
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: FUJITA Tomonori @ 2024-09-26 12:14 UTC (permalink / raw)
  To: netdev
  Cc: rust-for-linux, andrew, tmgross, aliceryhl, hkallweit1, linux,
	davem, edumazet, kuba, pabeni, kernel test robot

Fix the following warning when the driver is compiled as built-in:

      warning: unused import: `DeviceId`
      --> drivers/net/phy/qt2025.rs:18:5
      |
   18 |     DeviceId, Driver,
      |     ^^^^^^^^
      |
      = note: `#[warn(unused_imports)]` on by default

device_table in module_phy_driver macro is defined only when the
driver is built as a module. Use phy::DeviceId in the macro instead of
importing `DeviceId` since `phy` is always used.

Fixes: fd3eaad826da ("net: phy: add Applied Micro QT2025 PHY driver")
Reported-by: kernel test robot <lkp@intel•com>
Closes: https://lore.kernel.org/oe-kbuild-all/202409190717.i135rfVo-lkp@intel.com/
Reviewed-by: Alice Ryhl <aliceryhl@google•com>
Reviewed-by: Trevor Gross <tmgross@umich•edu>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail•com>
---
v3:
 - add Fixes tag
v2:
 - fix the commit log
 - add Alice and Trevor's Reviewed-by
---
 drivers/net/phy/qt2025.rs | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/phy/qt2025.rs b/drivers/net/phy/qt2025.rs
index 28d8981f410b..1ab065798175 100644
--- a/drivers/net/phy/qt2025.rs
+++ b/drivers/net/phy/qt2025.rs
@@ -15,7 +15,7 @@
 use kernel::net::phy::{
     self,
     reg::{Mmd, C45},
-    DeviceId, Driver,
+    Driver,
 };
 use kernel::prelude::*;
 use kernel::sizes::{SZ_16K, SZ_8K};
@@ -23,7 +23,7 @@
 kernel::module_phy_driver! {
     drivers: [PhyQT2025],
     device_table: [
-        DeviceId::new_with_driver::<PhyQT2025>(),
+        phy::DeviceId::new_with_driver::<PhyQT2025>(),
     ],
     name: "qt2025_phy",
     author: "FUJITA Tomonori <fujita.tomonori@gmail•com>",

base-commit: 72ef07554c5dcabb0053a147c4fd221a8e39bcfd
-- 
2.34.1


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

end of thread, other threads:[~2024-10-03  0:50 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-26 12:14 [PATCH net v3] net: phy: qt2025: Fix warning: unused import DeviceId FUJITA Tomonori
2024-09-27  8:46 ` Fiona Behrens
2024-10-01 15:52 ` Miguel Ojeda
2024-10-01 16:36   ` Andrew Lunn
2024-10-01 16:52     ` Miguel Ojeda
2024-10-03  0:50 ` patchwork-bot+netdevbpf

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