net: phy: qt2025: Fix warning: unused import DeviceId
Subsystems (5)
FUJITA Tomonori
maintainerPATCH 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
@@ -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
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_tableinmodule_phy_drivermacro is defined only when the driver is built as a module. Usephy::DeviceIdin the macro instead of importingDeviceIdsincephyis always used.
Quoted 7 lines
Fixes fd3eaad826da ("net: phy: add Applied Micro QT2025 PHY driver")Reported-by kernel test robot <[email protected]>Reviewed-by Alice Ryhl <[email protected]>Reviewed-by Trevor Gross <[email protected]>Signed-off-by FUJITA Tomonori <[email protected]>---
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
Andrew Lunn
maintainerQuoted 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-fixesPR 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
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
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