rust-for-linux.vger.kernel.org archive mirror
 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

* Re: [PATCH net v3] net: phy: qt2025: Fix warning: unused import DeviceId
  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-03  0:50 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 6+ messages in thread
From: Fiona Behrens @ 2024-09-27  8:46 UTC (permalink / raw)
  To: FUJITA Tomonori
  Cc: netdev, rust-for-linux, andrew, tmgross, aliceryhl, hkallweit1,
	linux, davem, edumazet, kuba, pabeni, kernel test robot



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>

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

* Re: [PATCH net v3] net: phy: qt2025: Fix warning: unused import DeviceId
  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-03  0:50 ` patchwork-bot+netdevbpf
  2 siblings, 1 reply; 6+ messages in thread
From: Miguel Ojeda @ 2024-10-01 15:52 UTC (permalink / raw)
  To: FUJITA Tomonori
  Cc: netdev, rust-for-linux, andrew, tmgross, aliceryhl, hkallweit1,
	linux, davem, edumazet, kuba, pabeni, kernel test robot

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

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

* Re: [PATCH net v3] net: phy: qt2025: Fix warning: unused import DeviceId
  2024-10-01 15:52 ` Miguel Ojeda
@ 2024-10-01 16:36   ` Andrew Lunn
  2024-10-01 16:52     ` Miguel Ojeda
  0 siblings, 1 reply; 6+ messages in thread
From: Andrew Lunn @ 2024-10-01 16:36 UTC (permalink / raw)
  To: Miguel Ojeda
  Cc: FUJITA Tomonori, netdev, rust-for-linux, tmgross, aliceryhl,
	hkallweit1, linux, davem, edumazet, kuba, pabeni,
	kernel test robot

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

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

* Re: [PATCH net v3] net: phy: qt2025: Fix warning: unused import DeviceId
  2024-10-01 16:36   ` Andrew Lunn
@ 2024-10-01 16:52     ` Miguel Ojeda
  0 siblings, 0 replies; 6+ messages in thread
From: Miguel Ojeda @ 2024-10-01 16:52 UTC (permalink / raw)
  To: Andrew Lunn
  Cc: FUJITA Tomonori, netdev, rust-for-linux, tmgross, aliceryhl,
	hkallweit1, linux, davem, edumazet, kuba, pabeni,
	kernel test robot

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

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

* Re: [PATCH net v3] net: phy: qt2025: Fix warning: unused import DeviceId
  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-03  0:50 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 6+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-10-03  0:50 UTC (permalink / raw)
  To: FUJITA Tomonori
  Cc: netdev, rust-for-linux, andrew, tmgross, aliceryhl, hkallweit1,
	linux, davem, edumazet, kuba, pabeni, lkp

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!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[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;
as well as URLs for NNTP newsgroup(s).