diff mbox series

[net-next] net: dsa: microchip: drop unneeded MODULE_ALIAS

Message ID 20240414154929.127045-1-krzk@kernel.org (mailing list archive)
State Accepted
Commit 9b07508845f9fff9519efabb18ad1d5ffdc214a5
Delegated to: Netdev Maintainers
Headers show
Series [net-next] net: dsa: microchip: drop unneeded MODULE_ALIAS | expand

Checks

Context Check Description
netdev/series_format success Single patches do not need cover letters
netdev/tree_selection success Clearly marked for net-next
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 926 this patch: 926
netdev/build_tools success No tools touched, skip
netdev/cc_maintainers success CCed 9 of 9 maintainers
netdev/build_clang success Errors and warnings before: 937 this patch: 937
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 No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 937 this patch: 937
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 13 lines checked
netdev/build_clang_rust success No Rust files in patch. Skipping build
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-04-15--15-00 (tests: 961)

Commit Message

Krzysztof Kozlowski April 14, 2024, 3:49 p.m. UTC
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.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
 drivers/net/dsa/microchip/ksz_spi.c | 7 -------
 1 file changed, 7 deletions(-)

Comments

Vladimir Oltean April 15, 2024, 10:20 a.m. UTC | #1
On Sun, Apr 14, 2024 at 05:49:29PM +0200, Krzysztof Kozlowski 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.
> 
> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
> ---
>  drivers/net/dsa/microchip/ksz_spi.c | 7 -------
>  1 file changed, 7 deletions(-)
> 
> diff --git a/drivers/net/dsa/microchip/ksz_spi.c b/drivers/net/dsa/microchip/ksz_spi.c
> index c8166fb440ab..cdc4add5f5b5 100644
> --- a/drivers/net/dsa/microchip/ksz_spi.c
> +++ b/drivers/net/dsa/microchip/ksz_spi.c
> @@ -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");

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

	{ "lan9370" },
	{ "lan9371" },
	{ "lan9372" },
	{ "lan9373" },
	{ "lan9374" },

>  MODULE_AUTHOR("Tristram Ha <Tristram.Ha@microchip.com>");
>  MODULE_DESCRIPTION("Microchip ksz Series Switch SPI Driver");
> -- 
> 2.34.1
>
patchwork-bot+netdevbpf@kernel.org April 17, 2024, 12:20 a.m. UTC | #2
Hello:

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

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.
> 
> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
> ---
>  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!
Krzysztof Kozlowski April 17, 2024, 1:27 p.m. UTC | #3
On 15/04/2024 12:20, Vladimir Oltean wrote:
> On Sun, Apr 14, 2024 at 05:49:29PM +0200, Krzysztof Kozlowski 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.
>>
>> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
>> ---
>>  drivers/net/dsa/microchip/ksz_spi.c | 7 -------
>>  1 file changed, 7 deletions(-)
>>
>> diff --git a/drivers/net/dsa/microchip/ksz_spi.c b/drivers/net/dsa/microchip/ksz_spi.c
>> index c8166fb440ab..cdc4add5f5b5 100644
>> --- a/drivers/net/dsa/microchip/ksz_spi.c
>> +++ b/drivers/net/dsa/microchip/ksz_spi.c
>> @@ -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");
> 
> The spi:lan937x alias is bogus, right? LAN937x switches are covered by
> these entries in ksz_spi_ids[]:
> 
> 	{ "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
diff mbox series

Patch

diff --git a/drivers/net/dsa/microchip/ksz_spi.c b/drivers/net/dsa/microchip/ksz_spi.c
index c8166fb440ab..cdc4add5f5b5 100644
--- a/drivers/net/dsa/microchip/ksz_spi.c
+++ b/drivers/net/dsa/microchip/ksz_spi.c
@@ -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 <Tristram.Ha@microchip.com>");
 MODULE_DESCRIPTION("Microchip ksz Series Switch SPI Driver");