diff mbox series

[net,v3] net: phy: qt2025: Fix warning: unused import DeviceId

Message ID 20240926121404.242092-1-fujita.tomonori@gmail.com (mailing list archive)
State Accepted
Commit fa7dfeae041c91e425db9fbb95fb3f57b821c386
Delegated to: Netdev Maintainers
Headers show
Series [net,v3] net: phy: qt2025: Fix warning: unused import DeviceId | expand

Checks

Context Check Description
netdev/series_format success Single patches do not need cover letters
netdev/tree_selection success Clearly marked for net
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag present in non-next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 7 this patch: 7
netdev/build_tools success No tools touched, skip
netdev/cc_maintainers warning 7 maintainers not CCed: bjorn3_gh@protonmail.com a.hindborg@kernel.org gary@garyguo.net benno.lossin@proton.me ojeda@kernel.org boqun.feng@gmail.com alex.gaynor@gmail.com
netdev/build_clang success Errors and warnings before: 7 this patch: 7
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success Fixes tag looks correct
netdev/build_allmodconfig_warn success Errors and warnings before: 7 this patch: 7
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 16 lines checked
netdev/build_clang_rust fail Link
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0
netdev/contest success net-next-2024-09-26--21-00 (tests: 768)

Commit Message

FUJITA Tomonori Sept. 26, 2024, 12:14 p.m. UTC
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(-)


base-commit: 72ef07554c5dcabb0053a147c4fd221a8e39bcfd

Comments

Fiona Behrens Sept. 27, 2024, 8:46 a.m. UTC | #1
On 26 Sep 2024, at 14:14, FUJITA Tomonori 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
>
> 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>
> ---

Reviewed-by: Fiona Behrens <me@kloenk.dev>
Miguel Ojeda Oct. 1, 2024, 3:52 p.m. UTC | #2
On Thu, Sep 26, 2024 at 2:16 PM FUJITA Tomonori
<fujita.tomonori@gmail.com> wrote:
>
> 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:

Acked-by: Miguel Ojeda <ojeda@kernel.org>

Thanks!

Cheers,
Miguel
Andrew Lunn Oct. 1, 2024, 4:36 p.m. UTC | #3
On Tue, Oct 01, 2024 at 05:52:48PM +0200, Miguel Ojeda wrote:
> On Thu, Sep 26, 2024 at 2:16 PM FUJITA Tomonori
> <fujita.tomonori@gmail.com> wrote:
> >
> > 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
Miguel Ojeda Oct. 1, 2024, 4:52 p.m. UTC | #4
On Tue, Oct 1, 2024 at 6:36 PM Andrew Lunn <andrew@lunn.ch> wrote:
>
> 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
patchwork-bot+netdevbpf@kernel.org Oct. 3, 2024, 12:50 a.m. UTC | #5
Hello:

This patch was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@kernel.org>:

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!
diff mbox series

Patch

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>",