Skip to contentSkip to conversation

net: phy: qt2025: Fix warning: unused import DeviceId

PATCH Applied FUJITA Tomonori 5 participants 6 messages Sep 26, 2024 – Oct 3, 2024

Subsystems (5)
lore
Share & tools
lore

FUJITA Tomonori

author maintainer
#0 lore raw

PATCH v3 1/1 net: phy: qt2025: Fix warning: unused import DeviceId

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.

---
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(-)
drivers/net/phy/qt2025.rs +2 -2
index 28d8981f410b..1ab065798175 100644
@@ -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 <[email protected]>",

base-commit: 72ef07554c5dcabb0053a147c4fd221a8e39bcfd

Signature · 1 line
2.34.1
Reviewed-by on v3 1/1
#1 lore raw
Quoted 14 lines · FUJITA Tomonori

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.

Quoted 7 lines

---

Acked-by on v3 1/1
#2 lore raw
In reply to FUJITA Tomonori
Quoted 2 lines · FUJITA Tomonori

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

Do you mind if I pick this up so that we keep WERROR builds error-free? (I am sending a rust-fixes PR in a day or two to Linus).

Or is netdev going to pick it soon? If so:

Thanks!

Cheers,
Miguel

maintainer
#3 lore raw
Quoted 9 lines · Miguel Ojeda
Quoted 2 lines · FUJITA Tomonori

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

Do you mind if I pick this up so that we keep WERROR builds error-free? (I am sending a rust-fixes PR in a day or two to Linus).

Or is netdev going to pick it soon? If so:

It was marked for stable, so generally means it will get submitted to Linus in a PR on Thursdays.

Andrew

#4 lore raw
Quoted 3 lines · Andrew Lunn

It was marked for stable, so generally means it will get submitted to Linus in a PR on Thursdays.

Thanks Andrew, that sounds perfect.

Cheers,
Miguel

#5 lore raw
In reply to FUJITA Tomonori
This patch was applied to netdev/net.git (main) by Jakub Kicinski <[email protected]>:

Hello:

This patch was applied to netdev/net.git (main)
by Jakub Kicinski <[email protected]>:

Quoted 11 lines · On Thu, 26 Sep 2024 12:14:03 +0000 you wrote:

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

[...]

Here is the summary with links:
- [net,v3] net: phy: qt2025: Fix warning: unused import DeviceId

    https://git.kernel.org/netdev/net/c/fa7dfeae041c

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html