linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [net: PATCH] net: mvmdio: fix compilation warning
@ 2021-11-15 15:30 Marcin Wojtas
  2021-11-15 19:35 ` Andrew Lunn
  2021-11-17  3:10 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 4+ messages in thread
From: Marcin Wojtas @ 2021-11-15 15:30 UTC (permalink / raw)
  To: linux-kernel, netdev
  Cc: davem, kuba, upstream, Marcin Wojtas, kernel test robot

The kernel test robot reported a following issue:

>> drivers/net/ethernet/marvell/mvmdio.c:426:36: warning:
unused variable 'orion_mdio_acpi_match' [-Wunused-const-variable]
   static const struct acpi_device_id orion_mdio_acpi_match[] = {
                                      ^
   1 warning generated.

Fix that by surrounding the variable by appropriate ifdef.

Fixes: c54da4c1acb1 ("net: mvmdio: add ACPI support")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Marcin Wojtas <mw@semihalf.com>
---
 drivers/net/ethernet/marvell/mvmdio.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/ethernet/marvell/mvmdio.c b/drivers/net/ethernet/marvell/mvmdio.c
index 62a97c46fba0..ef878973b859 100644
--- a/drivers/net/ethernet/marvell/mvmdio.c
+++ b/drivers/net/ethernet/marvell/mvmdio.c
@@ -429,12 +429,14 @@ static const struct of_device_id orion_mdio_match[] = {
 };
 MODULE_DEVICE_TABLE(of, orion_mdio_match);
 
+#ifdef CONFIG_ACPI
 static const struct acpi_device_id orion_mdio_acpi_match[] = {
 	{ "MRVL0100", BUS_TYPE_SMI },
 	{ "MRVL0101", BUS_TYPE_XSMI },
 	{ },
 };
 MODULE_DEVICE_TABLE(acpi, orion_mdio_acpi_match);
+#endif
 
 static struct platform_driver orion_mdio_driver = {
 	.probe = orion_mdio_probe,
-- 
2.29.0


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

* Re: [net: PATCH] net: mvmdio: fix compilation warning
  2021-11-15 15:30 [net: PATCH] net: mvmdio: fix compilation warning Marcin Wojtas
@ 2021-11-15 19:35 ` Andrew Lunn
  2021-11-15 22:56   ` Marcin Wojtas
  2021-11-17  3:10 ` patchwork-bot+netdevbpf
  1 sibling, 1 reply; 4+ messages in thread
From: Andrew Lunn @ 2021-11-15 19:35 UTC (permalink / raw)
  To: Marcin Wojtas
  Cc: linux-kernel, netdev, davem, kuba, upstream, kernel test robot

On Mon, Nov 15, 2021 at 04:30:24PM +0100, Marcin Wojtas wrote:
> The kernel test robot reported a following issue:
> 
> >> drivers/net/ethernet/marvell/mvmdio.c:426:36: warning:
> unused variable 'orion_mdio_acpi_match' [-Wunused-const-variable]
>    static const struct acpi_device_id orion_mdio_acpi_match[] = {

How come OF never gives these warning, just ACPI? If there something
missing in ACPI which OF has?

> Fixes: c54da4c1acb1 ("net: mvmdio: add ACPI support")
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Marcin Wojtas <mw@semihalf.com>

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew

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

* Re: [net: PATCH] net: mvmdio: fix compilation warning
  2021-11-15 19:35 ` Andrew Lunn
@ 2021-11-15 22:56   ` Marcin Wojtas
  0 siblings, 0 replies; 4+ messages in thread
From: Marcin Wojtas @ 2021-11-15 22:56 UTC (permalink / raw)
  To: Andrew Lunn
  Cc: Linux Kernel Mailing List, netdev, David S. Miller,
	Jakub Kicinski, upstream, kernel test robot

Hi Andrew,


pon., 15 lis 2021 o 20:35 Andrew Lunn <andrew@lunn.ch> napisał(a):
>
> On Mon, Nov 15, 2021 at 04:30:24PM +0100, Marcin Wojtas wrote:
> > The kernel test robot reported a following issue:
> >
> > >> drivers/net/ethernet/marvell/mvmdio.c:426:36: warning:
> > unused variable 'orion_mdio_acpi_match' [-Wunused-const-variable]
> >    static const struct acpi_device_id orion_mdio_acpi_match[] = {
>
> How come OF never gives these warning, just ACPI? If there something
> missing in ACPI which OF has?

It was enough to compile mvebu_v7_defconfig with W=1 to get it (so
CONFIG_ACPI disabled). There may be a similar case for config _OF, but
I couldn't deselect it easily and compile mvmdio at the same time.

>
> > Fixes: c54da4c1acb1 ("net: mvmdio: add ACPI support")
> > Reported-by: kernel test robot <lkp@intel.com>
> > Signed-off-by: Marcin Wojtas <mw@semihalf.com>
>
> Reviewed-by: Andrew Lunn <andrew@lunn.ch>
>

Thanks,
Marcin

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

* Re: [net: PATCH] net: mvmdio: fix compilation warning
  2021-11-15 15:30 [net: PATCH] net: mvmdio: fix compilation warning Marcin Wojtas
  2021-11-15 19:35 ` Andrew Lunn
@ 2021-11-17  3:10 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-11-17  3:10 UTC (permalink / raw)
  To: Marcin Wojtas; +Cc: linux-kernel, netdev, davem, kuba, upstream, lkp

Hello:

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

On Mon, 15 Nov 2021 16:30:24 +0100 you wrote:
> The kernel test robot reported a following issue:
> 
> >> drivers/net/ethernet/marvell/mvmdio.c:426:36: warning:
> unused variable 'orion_mdio_acpi_match' [-Wunused-const-variable]
>    static const struct acpi_device_id orion_mdio_acpi_match[] = {
>                                       ^
>    1 warning generated.
> 
> [...]

Here is the summary with links:
  - [net:] net: mvmdio: fix compilation warning
    https://git.kernel.org/netdev/net/c/2460386bef0b

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] 4+ messages in thread

end of thread, other threads:[~2021-11-17  3:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-15 15:30 [net: PATCH] net: mvmdio: fix compilation warning Marcin Wojtas
2021-11-15 19:35 ` Andrew Lunn
2021-11-15 22:56   ` Marcin Wojtas
2021-11-17  3:10 ` 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).