Linux Hardware Monitor development
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Armin Wolf <W_Armin@gmx.de>
Cc: pali@kernel.org, jdelvare@suse.com, linux-hwmon@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 2/2] hwmon: (dell-smm) Improve warning messages
Date: Mon, 29 Aug 2022 06:52:06 -0700	[thread overview]
Message-ID: <20220829135206.GA168015@roeck-us.net> (raw)
In-Reply-To: <20220822174053.8750-3-W_Armin@gmx.de>

On Mon, Aug 22, 2022 at 07:40:53PM +0200, Armin Wolf wrote:
> When dell-smm-hwmon is loaded on a machine with a buggy BIOS
> with the option "force" being enabled, it wrongly prints
> that the buggy features where disabled. This may cause
> users to wrongly assume that the driver still protects them
> from these BIOS bugs even with "force" being enabled.
> 
> Replace the messages with two messages each which are depending
> on the value of the "force" parameter. The messages which are
> being printed when "force" is not set use dev_notice() instead
> of dev_warn() since they only serve as a notice.
> 
> 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 | 14 ++++++++++----
>  1 file changed, 10 insertions(+), 4 deletions(-)
> 
> --
> 2.30.2
> 
> diff --git a/drivers/hwmon/dell-smm-hwmon.c b/drivers/hwmon/dell-smm-hwmon.c
> index 9cac80358072..01a94b62c2ab 100644
> --- a/drivers/hwmon/dell-smm-hwmon.c
> +++ b/drivers/hwmon/dell-smm-hwmon.c
> @@ -1356,15 +1356,21 @@ static int __init dell_smm_probe(struct platform_device *pdev)
>  	platform_set_drvdata(pdev, data);
> 
>  	if (dmi_check_system(i8k_blacklist_fan_support_dmi_table)) {
> -		dev_warn(&pdev->dev, "broken Dell BIOS detected, disallow fan support\n");
> -		if (!force)
> +		if (!force) {
> +			dev_notice(&pdev->dev, "Disabling fan support due to BIOS bugs\n");
>  			data->disallow_fan_support = true;
> +		} else {
> +			dev_warn(&pdev->dev, "Enabling fan support despite BIOS bugs\n");
> +		}
>  	}
> 
>  	if (dmi_check_system(i8k_blacklist_fan_type_dmi_table)) {
> -		dev_warn(&pdev->dev, "broken Dell BIOS detected, disallow fan type call\n");
> -		if (!force)
> +		if (!force) {
> +			dev_notice(&pdev->dev, "Disabling fan type call due to BIOS bugs\n");
>  			data->disallow_fan_type_call = true;
> +		} else {
> +			dev_warn(&pdev->dev, "Enabling fan type call despite BIOS bugs\n");
> +		}
>  	}
> 
>  	strscpy(data->bios_version, i8k_get_dmi_data(DMI_BIOS_VERSION),

      reply	other threads:[~2022-08-29 13:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-22 17:40 [PATCH v2 0/2] hwmon: (dell-smm) Minor fixes Armin Wolf
2022-08-22 17:40 ` [PATCH v2 1/2] hwmon: (dell-smm) Add FW_BUG to SMM warning message Armin Wolf
2022-08-29 13:50   ` Guenter Roeck
2022-08-22 17:40 ` [PATCH v2 2/2] hwmon: (dell-smm) Improve warning messages Armin Wolf
2022-08-29 13:52   ` Guenter Roeck [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220829135206.GA168015@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=W_Armin@gmx.de \
    --cc=jdelvare@suse.com \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pali@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox