All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] hwmon: (dell-smm) Move error message to make probing silent
@ 2022-11-30 18:34 Armin Wolf
  2022-12-05  3:35 ` Guenter Roeck
  0 siblings, 1 reply; 2+ messages in thread
From: Armin Wolf @ 2022-11-30 18:34 UTC (permalink / raw)
  To: pali; +Cc: jdelvare, linux, linux-hwmon, linux-kernel

If dell-smm-hwmon loads on unsupported hardware like the
Dell XPS 17 9710, an error message is printed.
This might confuse users, as drivers are expected to be
silent if no supported hardware is found.
Reorder the error message so its only printed when the
driver is loaded with the "force" option being set.
Also reword the error message slightly.

Tested on a Dell Inspiron 3505.

Signed-off-by: Armin Wolf <W_Armin@gmx.de>
---
 drivers/hwmon/dell-smm-hwmon.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/hwmon/dell-smm-hwmon.c b/drivers/hwmon/dell-smm-hwmon.c
index 1572b5416015..7ac778aedc68 100644
--- a/drivers/hwmon/dell-smm-hwmon.c
+++ b/drivers/hwmon/dell-smm-hwmon.c
@@ -1447,9 +1447,10 @@ static int __init i8k_init(void)
 	 */
 	if (i8k_get_dell_signature(I8K_SMM_GET_DELL_SIG1) &&
 	    i8k_get_dell_signature(I8K_SMM_GET_DELL_SIG2)) {
-		pr_err("unable to get SMM Dell signature\n");
 		if (!force)
 			return -ENODEV;
+
+		pr_err("Unable to get Dell SMM signature\n");
 	}

 	dell_smm_device = platform_create_bundle(&dell_smm_driver, dell_smm_probe, NULL, 0, NULL,
--
2.30.2


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

* Re: [PATCH] hwmon: (dell-smm) Move error message to make probing silent
  2022-11-30 18:34 [PATCH] hwmon: (dell-smm) Move error message to make probing silent Armin Wolf
@ 2022-12-05  3:35 ` Guenter Roeck
  0 siblings, 0 replies; 2+ messages in thread
From: Guenter Roeck @ 2022-12-05  3:35 UTC (permalink / raw)
  To: Armin Wolf; +Cc: pali, jdelvare, linux-hwmon, linux-kernel

On Wed, Nov 30, 2022 at 07:34:18PM +0100, Armin Wolf wrote:
> If dell-smm-hwmon loads on unsupported hardware like the
> Dell XPS 17 9710, an error message is printed.
> This might confuse users, as drivers are expected to be
> silent if no supported hardware is found.
> Reorder the error message so its only printed when the
> driver is loaded with the "force" option being set.
> Also reword the error message slightly.
> 
> Tested on a Dell Inspiron 3505.
> 
> Signed-off-by: Armin Wolf <W_Armin@gmx.de>

Applied to hwmon-next.

Thanks,
Guenter

> ---
>  drivers/hwmon/dell-smm-hwmon.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> --
> 2.30.2
> 
> diff --git a/drivers/hwmon/dell-smm-hwmon.c b/drivers/hwmon/dell-smm-hwmon.c
> index 1572b5416015..7ac778aedc68 100644
> --- a/drivers/hwmon/dell-smm-hwmon.c
> +++ b/drivers/hwmon/dell-smm-hwmon.c
> @@ -1447,9 +1447,10 @@ static int __init i8k_init(void)
>  	 */
>  	if (i8k_get_dell_signature(I8K_SMM_GET_DELL_SIG1) &&
>  	    i8k_get_dell_signature(I8K_SMM_GET_DELL_SIG2)) {
> -		pr_err("unable to get SMM Dell signature\n");
>  		if (!force)
>  			return -ENODEV;
> +
> +		pr_err("Unable to get Dell SMM signature\n");
>  	}
> 
>  	dell_smm_device = platform_create_bundle(&dell_smm_driver, dell_smm_probe, NULL, 0, NULL,

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

end of thread, other threads:[~2022-12-05  3:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-30 18:34 [PATCH] hwmon: (dell-smm) Move error message to make probing silent Armin Wolf
2022-12-05  3:35 ` Guenter Roeck

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.