All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] platform/x86: mlx-platform: fix module aliases
@ 2018-01-19  8:31 Ivan Vecera
  2018-01-19 12:37 ` Bjørn Mork
  0 siblings, 1 reply; 3+ messages in thread
From: Ivan Vecera @ 2018-01-19  8:31 UTC (permalink / raw)
  To: platform-driver-x86; +Cc: vadimp

Missing prefix 'pn' in MODULE_ALIAS lines causes that the module is
not loaded automatically. The patch changes them so they match
the entries in mlxplat_dmi_table where BOARD_VENDOR and PRODUCT_NAME
are used.

Fixes: 6613d18e9038 ("platform/x86: mlx-platform: Move module from arch/x86")
Cc: Vadim Pasternak <vadimp@mellanox.com>
Signed-off-by: Ivan Vecera <ivecera@redhat.com>
---
 drivers/platform/x86/mlx-platform.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/platform/x86/mlx-platform.c b/drivers/platform/x86/mlx-platform.c
index 504256c3660d..b1a5bbe4acf0 100644
--- a/drivers/platform/x86/mlx-platform.c
+++ b/drivers/platform/x86/mlx-platform.c
@@ -370,8 +370,8 @@ module_exit(mlxplat_exit);
 MODULE_AUTHOR("Vadim Pasternak (vadimp@mellanox.com)");
 MODULE_DESCRIPTION("Mellanox platform driver");
 MODULE_LICENSE("Dual BSD/GPL");
-MODULE_ALIAS("dmi:*:*Mellanox*:MSN24*:");
-MODULE_ALIAS("dmi:*:*Mellanox*:MSN27*:");
-MODULE_ALIAS("dmi:*:*Mellanox*:MSB*:");
-MODULE_ALIAS("dmi:*:*Mellanox*:MSX*:");
-MODULE_ALIAS("dmi:*:*Mellanox*:MSN21*:");
+MODULE_ALIAS("dmi:*:pnMSN24*:*:rvnMellanoxTechnologies*:");
+MODULE_ALIAS("dmi:*:pnMSN27*:*:rvnMellanoxTechnologies*:");
+MODULE_ALIAS("dmi:*:pnMSB*:*:rvnMellanoxTechnologies*:");
+MODULE_ALIAS("dmi:*:pnMSX*:*:rvnMellanoxTechnologies*:");
+MODULE_ALIAS("dmi:*:pnMSN21*:*:rvnMellanoxTechnologies*:");
-- 
2.13.6

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

* Re: [PATCH] platform/x86: mlx-platform: fix module aliases
  2018-01-19  8:31 [PATCH] platform/x86: mlx-platform: fix module aliases Ivan Vecera
@ 2018-01-19 12:37 ` Bjørn Mork
  2018-01-22 10:12   ` Ivan Vecera
  0 siblings, 1 reply; 3+ messages in thread
From: Bjørn Mork @ 2018-01-19 12:37 UTC (permalink / raw)
  To: Ivan Vecera; +Cc: platform-driver-x86, vadimp

Ivan Vecera <ivecera@redhat.com> writes:

> Missing prefix 'pn' in MODULE_ALIAS lines causes that the module is
> not loaded automatically. The patch changes them so they match
> the entries in mlxplat_dmi_table where BOARD_VENDOR and PRODUCT_NAME
> are used.
>
> Fixes: 6613d18e9038 ("platform/x86: mlx-platform: Move module from arch/x86")
> Cc: Vadim Pasternak <vadimp@mellanox.com>
> Signed-off-by: Ivan Vecera <ivecera@redhat.com>
> ---
>  drivers/platform/x86/mlx-platform.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/platform/x86/mlx-platform.c b/drivers/platform/x86/mlx-platform.c
> index 504256c3660d..b1a5bbe4acf0 100644
> --- a/drivers/platform/x86/mlx-platform.c
> +++ b/drivers/platform/x86/mlx-platform.c
> @@ -370,8 +370,8 @@ module_exit(mlxplat_exit);
>  MODULE_AUTHOR("Vadim Pasternak (vadimp@mellanox.com)");
>  MODULE_DESCRIPTION("Mellanox platform driver");
>  MODULE_LICENSE("Dual BSD/GPL");
> -MODULE_ALIAS("dmi:*:*Mellanox*:MSN24*:");
> -MODULE_ALIAS("dmi:*:*Mellanox*:MSN27*:");
> -MODULE_ALIAS("dmi:*:*Mellanox*:MSB*:");
> -MODULE_ALIAS("dmi:*:*Mellanox*:MSX*:");
> -MODULE_ALIAS("dmi:*:*Mellanox*:MSN21*:");
> +MODULE_ALIAS("dmi:*:pnMSN24*:*:rvnMellanoxTechnologies*:");
> +MODULE_ALIAS("dmi:*:pnMSN27*:*:rvnMellanoxTechnologies*:");
> +MODULE_ALIAS("dmi:*:pnMSB*:*:rvnMellanoxTechnologies*:");
> +MODULE_ALIAS("dmi:*:pnMSX*:*:rvnMellanoxTechnologies*:");
> +MODULE_ALIAS("dmi:*:pnMSN21*:*:rvnMellanoxTechnologies*:");

Strange.  Why do so many dmi drivers depend on such long and fragile
lists of aliases instead of simply using

 MODULE_DEVICE_TABLE(dmi, ..);

like most other drivers do?  Is there something wrong with file2alias?
If so, then I believe it would be better to fix that instead.


Bjørn

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

* Re: [PATCH] platform/x86: mlx-platform: fix module aliases
  2018-01-19 12:37 ` Bjørn Mork
@ 2018-01-22 10:12   ` Ivan Vecera
  0 siblings, 0 replies; 3+ messages in thread
From: Ivan Vecera @ 2018-01-22 10:12 UTC (permalink / raw)
  To: Bjørn Mork; +Cc: platform-driver-x86, vadimp

On 19.1.2018 13:37, Bjørn Mork wrote:
> Ivan Vecera <ivecera@redhat.com> writes:
> 
>> Missing prefix 'pn' in MODULE_ALIAS lines causes that the module is
>> not loaded automatically. The patch changes them so they match
>> the entries in mlxplat_dmi_table where BOARD_VENDOR and PRODUCT_NAME
>> are used.
>>
>> Fixes: 6613d18e9038 ("platform/x86: mlx-platform: Move module from arch/x86")
>> Cc: Vadim Pasternak <vadimp@mellanox.com>
>> Signed-off-by: Ivan Vecera <ivecera@redhat.com>
>> ---
>>  drivers/platform/x86/mlx-platform.c | 10 +++++-----
>>  1 file changed, 5 insertions(+), 5 deletions(-)
>>
>> diff --git a/drivers/platform/x86/mlx-platform.c b/drivers/platform/x86/mlx-platform.c
>> index 504256c3660d..b1a5bbe4acf0 100644
>> --- a/drivers/platform/x86/mlx-platform.c
>> +++ b/drivers/platform/x86/mlx-platform.c
>> @@ -370,8 +370,8 @@ module_exit(mlxplat_exit);
>>  MODULE_AUTHOR("Vadim Pasternak (vadimp@mellanox.com)");
>>  MODULE_DESCRIPTION("Mellanox platform driver");
>>  MODULE_LICENSE("Dual BSD/GPL");
>> -MODULE_ALIAS("dmi:*:*Mellanox*:MSN24*:");
>> -MODULE_ALIAS("dmi:*:*Mellanox*:MSN27*:");
>> -MODULE_ALIAS("dmi:*:*Mellanox*:MSB*:");
>> -MODULE_ALIAS("dmi:*:*Mellanox*:MSX*:");
>> -MODULE_ALIAS("dmi:*:*Mellanox*:MSN21*:");
>> +MODULE_ALIAS("dmi:*:pnMSN24*:*:rvnMellanoxTechnologies*:");
>> +MODULE_ALIAS("dmi:*:pnMSN27*:*:rvnMellanoxTechnologies*:");
>> +MODULE_ALIAS("dmi:*:pnMSB*:*:rvnMellanoxTechnologies*:");
>> +MODULE_ALIAS("dmi:*:pnMSX*:*:rvnMellanoxTechnologies*:");
>> +MODULE_ALIAS("dmi:*:pnMSN21*:*:rvnMellanoxTechnologies*:");
> 
> Strange.  Why do so many dmi drivers depend on such long and fragile
> lists of aliases instead of simply using
> 
>  MODULE_DEVICE_TABLE(dmi, ..);
> 
> like most other drivers do?  Is there something wrong with file2alias?
> If so, then I believe it would be better to fix that instead.
> 
> 
> Bjørn
> 
Good note, will re-send.

Ivan

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

end of thread, other threads:[~2018-01-22 10:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-19  8:31 [PATCH] platform/x86: mlx-platform: fix module aliases Ivan Vecera
2018-01-19 12:37 ` Bjørn Mork
2018-01-22 10:12   ` Ivan Vecera

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.