Skip to contentSkip to conversation

platform/x86: dell-sysman: remove match on www.dell.com

PATCH In review Crag Wang 4 participants 5 messages Oct 4, 2024

Subsystems (2)
lore
Share & tools
lore

Crag Wang

author
#0 lore raw

PATCH v3 1/2 platform/x86: dell-sysman: remove match on www.dell.com

The URL is dynamic and may change according to the OEM. It was mainly used for old systems that do not have "Dell System" in the OEM String.

---
 drivers/platform/x86/dell/dell-wmi-sysman/sysman.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/platform/x86/dell/dell-wmi-sysman/sysman.c +1 -2
index 9def7983d7d6..c05474f1ed70 100644
@@ -520,8 +520,7 @@ static int __init sysman_init(void)
 {
 	int ret = 0;
 
-	if (!dmi_find_device(DMI_DEV_TYPE_OEM_STRING, "Dell System", NULL) &&
-	    !dmi_find_device(DMI_DEV_TYPE_OEM_STRING, "www.dell.com", NULL)) {
+	if (!dmi_find_device(DMI_DEV_TYPE_OEM_STRING, "Dell System", NULL)) {
 		pr_err("Unable to run on non-Dell system\n");
 		return -ENODEV;
 	}
Signature · 1 line
2.43.0
author
#1 lore raw

PATCH v3 2/2 platform/x86: dell-sysman: add support for alienware products

Alienware supports firmware-attributes and has its own OEM string.

---
 drivers/platform/x86/dell/dell-wmi-sysman/sysman.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/platform/x86/dell/dell-wmi-sysman/sysman.c +2 -1
index c05474f1ed70..68c63e1fbd27 100644
@@ -520,7 +520,8 @@ static int __init sysman_init(void)
 {
 	int ret = 0;
 
-	if (!dmi_find_device(DMI_DEV_TYPE_OEM_STRING, "Dell System", NULL)) {
+	if (!dmi_find_device(DMI_DEV_TYPE_OEM_STRING, "Dell System", NULL) &&
+	    !dmi_find_device(DMI_DEV_TYPE_OEM_STRING, "Alienware", NULL)) {
 		pr_err("Unable to run on non-Dell system\n");
 		return -ENODEV;
 	}
Signature · 1 line
2.43.0
maintainer
#2 lore raw
In reply to Crag Wang
Quoted 13 lines · Crag Wang

The URL is dynamic and may change according to the OEM. It was mainly used for old systems that do not have "Dell System" in the OEM String.

---
 drivers/platform/x86/dell/dell-wmi-sysman/sysman.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/platform/x86/dell/dell-wmi-sysman/sysman.c +0 -0
index 9def7983d7d6..c05474f1ed70 100644

drivers/platform/x86/dell/dell-wmi-sysman/sysman.c static int __init sysman_init(void) · line 523

Quoted 6 lines
drivers/platform/x86/dell/dell-wmi-sysman/sysman.c +1 -2
@@ -520,8 +520,7 @@ static int __init sysman_init(void)
 {
 	int ret = 0;
 
-	if (!dmi_find_device(DMI_DEV_TYPE_OEM_STRING, "Dell System", NULL) &&
-	    !dmi_find_device(DMI_DEV_TYPE_OEM_STRING, "www.dell.com", NULL)) {
+	if (!dmi_find_device(DMI_DEV_TYPE_OEM_STRING, "Dell System", NULL)) {

I suggested making the changes in the opposite order, that was to faciliate easy revert of the URL patch if needed which is not the case if things are changed in this order.

Signature · 1 line
 i.
#3 lore raw
In reply to Crag Wang

Hi,

Quoted 2 lines · Crag Wang

The URL is dynamic and may change according to the OEM. It was mainly used for old systems that do not have "Dell System" in the OEM String.

But those old systems presumably still exist somewhere out there, right ?

And if they still exist then we do still want to support them, so I'm not sure why you think it is a good idea to drop this test ?

Adding the alienware match seems fine, dropping the URL match seems like a bad idea unless you are 100% sure that there are no systems out there which rely in this match to load dell-wmi-sysman.

Regards,

Hans

Quoted 20 lines
---
 drivers/platform/x86/dell/dell-wmi-sysman/sysman.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/platform/x86/dell/dell-wmi-sysman/sysman.c +1 -2
index 9def7983d7d6..c05474f1ed70 100644
@@ -520,8 +520,7 @@ static int __init sysman_init(void)
 {
 	int ret = 0;
 
-	if (!dmi_find_device(DMI_DEV_TYPE_OEM_STRING, "Dell System", NULL) &&
-	    !dmi_find_device(DMI_DEV_TYPE_OEM_STRING, "www.dell.com", NULL)) {
+	if (!dmi_find_device(DMI_DEV_TYPE_OEM_STRING, "Dell System", NULL)) {
 		pr_err("Unable to run on non-Dell system\n");
 		return -ENODEV;
 	}
#4 lore raw
Quoted 1 line

But those old systems presumably still exist somewhere out there, right ?

Products with this driver have Dell System in place.

Quoted 2 lines

And if they still exist then we do still want to support them, so I'm not sure why you think it is a good idea to drop this test ?

We can keep the check as it's harmless though the match should rely on Dell System more than the URL, which is mainly for super older cases without Dell System.

Quoted 3 lines

Adding the alienware match seems fine, dropping the URL match seems like a bad idea unless you are 100% sure that there are no systems out there which rely in this match to load dell-wmi-sysman.

I'll re-send with just the addition.

Crag