platform-driver-x86.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] platform/x86: dell-smbios: Remove unused dmi_system_id table
@ 2021-08-02 12:07 Hans de Goede
  2021-08-06 13:35 ` Hans de Goede
  0 siblings, 1 reply; 2+ messages in thread
From: Hans de Goede @ 2021-08-02 12:07 UTC (permalink / raw)
  To: Mark Gross, Andy Shevchenko, Dell.Client.Kernel
  Cc: Hans de Goede, platform-driver-x86, Mario Limonciello

dell-smbios is depended on by dell-laptop and that has this same table +
some extra entries for chassis-type 30, 31 and 32.

Since dell-laptop will already auto-load based on the DMI table in there
(which also is more complete) and since dell-laptop will then bring in
the dell-smbios module, the only scenario I can think of where this DMI
table inside dell-smbios-smm.c is useful is if users have the dell-laptop
module disabled and they want to use the sysfs interface offered by
dell-smbios-smm.c. But that is such a corner case, even requiring a custom
kernel build, that it does not weigh up against having this duplicate
table, which as the current state already shows can only grow stale.

Users who do hit this corner-case can always explicitly modprobe /
insmod the module.

Cc: Mario Limonciello <mario.limonciello@outlook.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 drivers/platform/x86/dell/dell-smbios-smm.c | 31 ---------------------
 1 file changed, 31 deletions(-)

diff --git a/drivers/platform/x86/dell/dell-smbios-smm.c b/drivers/platform/x86/dell/dell-smbios-smm.c
index 97c52a839a3e..320c032418ac 100644
--- a/drivers/platform/x86/dell/dell-smbios-smm.c
+++ b/drivers/platform/x86/dell/dell-smbios-smm.c
@@ -24,37 +24,6 @@ static struct calling_interface_buffer *buffer;
 static struct platform_device *platform_device;
 static DEFINE_MUTEX(smm_mutex);
 
-static const struct dmi_system_id dell_device_table[] __initconst = {
-	{
-		.ident = "Dell laptop",
-		.matches = {
-			DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
-			DMI_MATCH(DMI_CHASSIS_TYPE, "8"),
-		},
-	},
-	{
-		.matches = {
-			DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
-			DMI_MATCH(DMI_CHASSIS_TYPE, "9"), /*Laptop*/
-		},
-	},
-	{
-		.matches = {
-			DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
-			DMI_MATCH(DMI_CHASSIS_TYPE, "10"), /*Notebook*/
-		},
-	},
-	{
-		.ident = "Dell Computer Corporation",
-		.matches = {
-			DMI_MATCH(DMI_SYS_VENDOR, "Dell Computer Corporation"),
-			DMI_MATCH(DMI_CHASSIS_TYPE, "8"),
-		},
-	},
-	{ }
-};
-MODULE_DEVICE_TABLE(dmi, dell_device_table);
-
 static void parse_da_table(const struct dmi_header *dm)
 {
 	struct calling_interface_structure *table =
-- 
2.31.1


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

* Re: [PATCH] platform/x86: dell-smbios: Remove unused dmi_system_id table
  2021-08-02 12:07 [PATCH] platform/x86: dell-smbios: Remove unused dmi_system_id table Hans de Goede
@ 2021-08-06 13:35 ` Hans de Goede
  0 siblings, 0 replies; 2+ messages in thread
From: Hans de Goede @ 2021-08-06 13:35 UTC (permalink / raw)
  To: Mark Gross, Andy Shevchenko, Dell.Client.Kernel
  Cc: platform-driver-x86, Mario Limonciello

Hi All,

On 8/2/21 2:07 PM, Hans de Goede wrote:
> dell-smbios is depended on by dell-laptop and that has this same table +
> some extra entries for chassis-type 30, 31 and 32.
> 
> Since dell-laptop will already auto-load based on the DMI table in there
> (which also is more complete) and since dell-laptop will then bring in
> the dell-smbios module, the only scenario I can think of where this DMI
> table inside dell-smbios-smm.c is useful is if users have the dell-laptop
> module disabled and they want to use the sysfs interface offered by
> dell-smbios-smm.c. But that is such a corner case, even requiring a custom
> kernel build, that it does not weigh up against having this duplicate
> table, which as the current state already shows can only grow stale.
> 
> Users who do hit this corner-case can always explicitly modprobe /
> insmod the module.
> 
> Cc: Mario Limonciello <mario.limonciello@outlook.com>
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>

I've merged this into my review-hans (future pdx86/for-next) branch now.

Regards,

Hans


> ---
>  drivers/platform/x86/dell/dell-smbios-smm.c | 31 ---------------------
>  1 file changed, 31 deletions(-)
> 
> diff --git a/drivers/platform/x86/dell/dell-smbios-smm.c b/drivers/platform/x86/dell/dell-smbios-smm.c
> index 97c52a839a3e..320c032418ac 100644
> --- a/drivers/platform/x86/dell/dell-smbios-smm.c
> +++ b/drivers/platform/x86/dell/dell-smbios-smm.c
> @@ -24,37 +24,6 @@ static struct calling_interface_buffer *buffer;
>  static struct platform_device *platform_device;
>  static DEFINE_MUTEX(smm_mutex);
>  
> -static const struct dmi_system_id dell_device_table[] __initconst = {
> -	{
> -		.ident = "Dell laptop",
> -		.matches = {
> -			DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
> -			DMI_MATCH(DMI_CHASSIS_TYPE, "8"),
> -		},
> -	},
> -	{
> -		.matches = {
> -			DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
> -			DMI_MATCH(DMI_CHASSIS_TYPE, "9"), /*Laptop*/
> -		},
> -	},
> -	{
> -		.matches = {
> -			DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
> -			DMI_MATCH(DMI_CHASSIS_TYPE, "10"), /*Notebook*/
> -		},
> -	},
> -	{
> -		.ident = "Dell Computer Corporation",
> -		.matches = {
> -			DMI_MATCH(DMI_SYS_VENDOR, "Dell Computer Corporation"),
> -			DMI_MATCH(DMI_CHASSIS_TYPE, "8"),
> -		},
> -	},
> -	{ }
> -};
> -MODULE_DEVICE_TABLE(dmi, dell_device_table);
> -
>  static void parse_da_table(const struct dmi_header *dm)
>  {
>  	struct calling_interface_structure *table =
> 


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

end of thread, other threads:[~2021-08-06 13:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-02 12:07 [PATCH] platform/x86: dell-smbios: Remove unused dmi_system_id table Hans de Goede
2021-08-06 13:35 ` Hans de Goede

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).