Skip to contentSkip to conversation

net: dsa: microchip: drop unneeded MODULE_ALIAS

PATCH Applied Krzysztof Kozlowski 3 participants 4 messages Apr 14, 2024 – Apr 17, 2024

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: dsa: microchip: drop unneeded MODULE_ALIAS

The ID table already has respective entry and MODULE_DEVICE_TABLE and creates proper alias for SPI driver. Having another MODULE_ALIAS causes the alias to be duplicated.

---
 drivers/net/dsa/microchip/ksz_spi.c | 7 -------
 1 file changed, 7 deletions(-)
drivers/net/dsa/microchip/ksz_spi.c +0 -7
index c8166fb440ab..cdc4add5f5b5 100644
@@ -233,13 +233,6 @@ static struct spi_driver ksz_spi_driver = {
 
 module_spi_driver(ksz_spi_driver);
 
-MODULE_ALIAS("spi:ksz9477");
-MODULE_ALIAS("spi:ksz9896");
-MODULE_ALIAS("spi:ksz9897");
-MODULE_ALIAS("spi:ksz9893");
-MODULE_ALIAS("spi:ksz9563");
-MODULE_ALIAS("spi:ksz8563");
-MODULE_ALIAS("spi:ksz9567");
 MODULE_ALIAS("spi:lan937x");
 MODULE_AUTHOR("Tristram Ha <[email protected]>");
 MODULE_DESCRIPTION("Microchip ksz Series Switch SPI Driver");
Signature · 1 line
2.34.1
maintainer
#1 lore raw
Quoted 15 lines · Krzysztof Kozlowski

The ID table already has respective entry and MODULE_DEVICE_TABLE and creates proper alias for SPI driver. Having another MODULE_ALIAS causes the alias to be duplicated.

---
 drivers/net/dsa/microchip/ksz_spi.c | 7 -------
 1 file changed, 7 deletions(-)
drivers/net/dsa/microchip/ksz_spi.c +0 -0
index c8166fb440ab..cdc4add5f5b5 100644
@@ -233,13 +233,6 @@ static struct spi_driver ksz_spi_driver = {
 

drivers/net/dsa/microchip/ksz_spi.c static struct spi_driver ksz_spi_driver = { · line 236

Quoted 10 lines
drivers/net/dsa/microchip/ksz_spi.c +0 -7
 module_spi_driver(ksz_spi_driver);
 
-MODULE_ALIAS("spi:ksz9477");
-MODULE_ALIAS("spi:ksz9896");
-MODULE_ALIAS("spi:ksz9897");
-MODULE_ALIAS("spi:ksz9893");
-MODULE_ALIAS("spi:ksz9563");
-MODULE_ALIAS("spi:ksz8563");
-MODULE_ALIAS("spi:ksz9567");
 MODULE_ALIAS("spi:lan937x");

The spi:lan937x alias is bogus, right? LAN937x switches are covered by these entries in ksz_spi_ids[]:

	{ "lan9370" },
	{ "lan9371" },
	{ "lan9372" },
	{ "lan9373" },
	{ "lan9374" },
Quoted 5 lines
drivers/net/dsa/microchip/ksz_spi.c +0 -0
 MODULE_AUTHOR("Tristram Ha <[email protected]>");
 MODULE_DESCRIPTION("Microchip ksz Series Switch SPI Driver");
Signature · 1 line
2.34.1
#2 lore raw
Quoted 30 lines · Vladimir Oltean
Quoted 15 lines · Krzysztof Kozlowski

The ID table already has respective entry and MODULE_DEVICE_TABLE and creates proper alias for SPI driver. Having another MODULE_ALIAS causes the alias to be duplicated.

---
 drivers/net/dsa/microchip/ksz_spi.c | 7 -------
 1 file changed, 7 deletions(-)
drivers/net/dsa/microchip/ksz_spi.c +0 -0
index c8166fb440ab..cdc4add5f5b5 100644
@@ -233,13 +233,6 @@ static struct spi_driver ksz_spi_driver = {
 

drivers/net/dsa/microchip/ksz_spi.c static struct spi_driver ksz_spi_driver = { · line 236

Quoted 10 lines
drivers/net/dsa/microchip/ksz_spi.c +0 -7
 module_spi_driver(ksz_spi_driver);
 
-MODULE_ALIAS("spi:ksz9477");
-MODULE_ALIAS("spi:ksz9896");
-MODULE_ALIAS("spi:ksz9897");
-MODULE_ALIAS("spi:ksz9893");
-MODULE_ALIAS("spi:ksz9563");
-MODULE_ALIAS("spi:ksz8563");
-MODULE_ALIAS("spi:ksz9567");
 MODULE_ALIAS("spi:lan937x");

The spi:lan937x alias is bogus, right? LAN937x switches are covered by these entries in ksz_spi_ids[]:

Quoted 5 lines
	{ "lan9370" },
	{ "lan9371" },
	{ "lan9372" },
	{ "lan9373" },
	{ "lan9374" },

No, it is not. That's a valid alias. What's bogus about it? Someone wanted to load the module by such alias.

Best regards,
Krzysztof

#3 lore raw
In reply to Krzysztof Kozlowski
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Hello:

This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Quoted 8 lines · On Sun, 14 Apr 2024 17:49:29 +0200 you wrote:

The ID table already has respective entry and MODULE_DEVICE_TABLE and creates proper alias for SPI driver. Having another MODULE_ALIAS causes the alias to be duplicated.

---
 drivers/net/dsa/microchip/ksz_spi.c | 7 -------
 1 file changed, 7 deletions(-)

Here is the summary with links:
- [net-next] net: dsa: microchip: drop unneeded MODULE_ALIAS

    https://git.kernel.org/netdev/net-next/c/9b07508845f9

You are awesome, thank you!

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