Skip to content

Commit fa7dfea

Browse files
fujitakuba-moo
authored andcommitted
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. Fixes: fd3eaad ("net: phy: add Applied Micro QT2025 PHY driver") Reported-by: kernel test robot <[email protected]> Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/ Reviewed-by: Alice Ryhl <[email protected]> Reviewed-by: Trevor Gross <[email protected]> Signed-off-by: FUJITA Tomonori <[email protected]> Reviewed-by: Fiona Behrens <[email protected]> Acked-by: Miguel Ojeda <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent a1e40ac commit fa7dfea

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/net/phy/qt2025.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@ use kernel::firmware::Firmware;
1515
use kernel::net::phy::{
1616
self,
1717
reg::{Mmd, C45},
18-
DeviceId, Driver,
18+
Driver,
1919
};
2020
use kernel::prelude::*;
2121
use kernel::sizes::{SZ_16K, SZ_8K};
2222

2323
kernel::module_phy_driver! {
2424
drivers: [PhyQT2025],
2525
device_table: [
26-
DeviceId::new_with_driver::<PhyQT2025>(),
26+
phy::DeviceId::new_with_driver::<PhyQT2025>(),
2727
],
2828
name: "qt2025_phy",
2929
author: "FUJITA Tomonori <[email protected]>",

0 commit comments

Comments
 (0)