linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] platform/x86: dell-privacy: Remove usage of wmi_has_guid()
@ 2024-02-23 16:29 Armin Wolf
  2024-02-26 10:49 ` Hans de Goede
  2024-02-26 13:27 ` Ilpo Järvinen
  0 siblings, 2 replies; 3+ messages in thread
From: Armin Wolf @ 2024-02-23 16:29 UTC (permalink / raw)
  To: hdegoede, ilpo.jarvinen
  Cc: Dell.Client.Kernel, platform-driver-x86, linux-kernel

The WMI driver core already takes care that the WMI driver is
only bound to WMI devices with a matching GUID.

Remove the unnecessary call to wmi_has_guid(), which will always
be true when the driver probes.

Tested on a Dell Inspiron 3505.

Signed-off-by: Armin Wolf <W_Armin@gmx.de>
---
 drivers/platform/x86/dell/dell-wmi-privacy.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/platform/x86/dell/dell-wmi-privacy.c b/drivers/platform/x86/dell/dell-wmi-privacy.c
index 4d94603f7785..4b65e1655d42 100644
--- a/drivers/platform/x86/dell/dell-wmi-privacy.c
+++ b/drivers/platform/x86/dell/dell-wmi-privacy.c
@@ -297,10 +297,6 @@ static int dell_privacy_wmi_probe(struct wmi_device *wdev, const void *context)
 	struct key_entry *keymap;
 	int ret, i, j;

-	ret = wmi_has_guid(DELL_PRIVACY_GUID);
-	if (!ret)
-		pr_debug("Unable to detect available Dell privacy devices!\n");
-
 	priv = devm_kzalloc(&wdev->dev, sizeof(*priv), GFP_KERNEL);
 	if (!priv)
 		return -ENOMEM;
--
2.39.2


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

* Re: [PATCH] platform/x86: dell-privacy: Remove usage of wmi_has_guid()
  2024-02-23 16:29 [PATCH] platform/x86: dell-privacy: Remove usage of wmi_has_guid() Armin Wolf
@ 2024-02-26 10:49 ` Hans de Goede
  2024-02-26 13:27 ` Ilpo Järvinen
  1 sibling, 0 replies; 3+ messages in thread
From: Hans de Goede @ 2024-02-26 10:49 UTC (permalink / raw)
  To: Armin Wolf, ilpo.jarvinen
  Cc: Dell.Client.Kernel, platform-driver-x86, linux-kernel

Hi,

On 2/23/24 17:29, Armin Wolf wrote:
> The WMI driver core already takes care that the WMI driver is
> only bound to WMI devices with a matching GUID.
> 
> Remove the unnecessary call to wmi_has_guid(), which will always
> be true when the driver probes.
> 
> Tested on a Dell Inspiron 3505.
> 
> Signed-off-by: Armin Wolf <W_Armin@gmx.de>

Thanks, patch looks good to me:

Reviewed-by: Hans de Goede <hdegoede@redhat.com>

Regards,

Hans



> ---
>  drivers/platform/x86/dell/dell-wmi-privacy.c | 4 ----
>  1 file changed, 4 deletions(-)
> 
> diff --git a/drivers/platform/x86/dell/dell-wmi-privacy.c b/drivers/platform/x86/dell/dell-wmi-privacy.c
> index 4d94603f7785..4b65e1655d42 100644
> --- a/drivers/platform/x86/dell/dell-wmi-privacy.c
> +++ b/drivers/platform/x86/dell/dell-wmi-privacy.c
> @@ -297,10 +297,6 @@ static int dell_privacy_wmi_probe(struct wmi_device *wdev, const void *context)
>  	struct key_entry *keymap;
>  	int ret, i, j;
> 
> -	ret = wmi_has_guid(DELL_PRIVACY_GUID);
> -	if (!ret)
> -		pr_debug("Unable to detect available Dell privacy devices!\n");
> -
>  	priv = devm_kzalloc(&wdev->dev, sizeof(*priv), GFP_KERNEL);
>  	if (!priv)
>  		return -ENOMEM;
> --
> 2.39.2
> 


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

* Re: [PATCH] platform/x86: dell-privacy: Remove usage of wmi_has_guid()
  2024-02-23 16:29 [PATCH] platform/x86: dell-privacy: Remove usage of wmi_has_guid() Armin Wolf
  2024-02-26 10:49 ` Hans de Goede
@ 2024-02-26 13:27 ` Ilpo Järvinen
  1 sibling, 0 replies; 3+ messages in thread
From: Ilpo Järvinen @ 2024-02-26 13:27 UTC (permalink / raw)
  To: hdegoede, Armin Wolf
  Cc: Dell.Client.Kernel, platform-driver-x86, linux-kernel

On Fri, 23 Feb 2024 17:29:05 +0100, Armin Wolf wrote:

> The WMI driver core already takes care that the WMI driver is
> only bound to WMI devices with a matching GUID.
> 
> Remove the unnecessary call to wmi_has_guid(), which will always
> be true when the driver probes.
> 
> Tested on a Dell Inspiron 3505.
> 
> [...]


Thank you for your contribution, it has been applied to my local
review-ilpo branch. Note it will show up in the public
platform-drivers-x86/review-ilpo branch only once I've pushed my
local branch there, which might take a while.

The list of commits applied:
[1/1] platform/x86: dell-privacy: Remove usage of wmi_has_guid()
      commit: 39849d8fa03c501305dd6fb814fbfbc768fcf96f

--
 i.


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

end of thread, other threads:[~2024-02-26 13:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-23 16:29 [PATCH] platform/x86: dell-privacy: Remove usage of wmi_has_guid() Armin Wolf
2024-02-26 10:49 ` Hans de Goede
2024-02-26 13:27 ` Ilpo Järvinen

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