Skip to contentSkip to conversation

net: ax88796c: hide ax88796c_dt_ids if !CONFIG_OF

PATCH Applied Jakub Kicinski 2 participants 2 messages Nov 4, 2021 – Nov 5, 2021

Subsystems (3)
lore
Share & tools
lore

Jakub Kicinski

author maintainer
#0 lore raw

PATCH 1/1 net: ax88796c: hide ax88796c_dt_ids if !CONFIG_OF

Build bot says:

Quoted 1 line
Quoted 1 line

drivers/net/ethernet/asix/ax88796c_main.c:1116:34: warning: unused variable 'ax88796c_dt_ids' [-Wunused-const-variable]

   static const struct of_device_id ax88796c_dt_ids[] = {
                                    ^

The only reference to this array is wrapped in of_match_ptr().

Fixes a97c69ba4f30 ("net: ax88796c: ASIX AX88796C SPI Ethernet Adapter Driver")
---
 drivers/net/ethernet/asix/ax88796c_main.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/net/ethernet/asix/ax88796c_main.c +2 -0
index 4b0c5a09fd57..2086de05385c 100644
@@ -1114,11 +1114,13 @@ static int ax88796c_remove(struct spi_device *spi)
 	return 0;
 }
 
+#ifdef CONFIG_OF
 static const struct of_device_id ax88796c_dt_ids[] = {
 	{ .compatible = "asix,ax88796c" },
 	{},
 };
 MODULE_DEVICE_TABLE(of, ax88796c_dt_ids);
+#endif
 
 static const struct spi_device_id asix_id[] = {
 	{ "ax88796c", 0 },
Signature · 1 line
2.31.1
#1 lore raw
This patch was applied to netdev/net.git (master) by David S. Miller <[email protected]>:

Hello:

This patch was applied to netdev/net.git (master)
by David S. Miller <[email protected]>:

Quoted 9 lines · On Thu, 4 Nov 2021 10:55:27 -0700 you wrote:

Build bot says:

Quoted 1 line
Quoted 1 line

drivers/net/ethernet/asix/ax88796c_main.c:1116:34: warning: unused variable 'ax88796c_dt_ids' [-Wunused-const-variable]

   static const struct of_device_id ax88796c_dt_ids[] = {
                                    ^

The only reference to this array is wrapped in of_match_ptr().

[...]

Here is the summary with links:
- [net] net: ax88796c: hide ax88796c_dt_ids if !CONFIG_OF

    https://git.kernel.org/netdev/net/c/6789a4c05127

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html