All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 1/1] drivers/hwmon/acpi_power_meter.c: Change log level
       [not found] <6b6af74c-2a2b-1704-173b-bb1b466b2197@roeck-us.net>
@ 2019-07-24  8:01 ` Wang Shenran
  2019-07-24 14:07   ` Guenter Roeck
  0 siblings, 1 reply; 3+ messages in thread
From: Wang Shenran @ 2019-07-24  8:01 UTC (permalink / raw)
  To: linux; +Cc: jdelvare, linux-hwmon

At boot time, the acpi_power_meter driver logs the following error level
message: "Ignoring unsafe software power cap". Having read about it from
a few sources, it seems that the error message can be quite misleading.

While the message can imply that Linux is ignoring the fact that the
system is operating in potentially dangerous conditions, the truth is
the driver found an ACPI_PMC object that supports software power
capping. The driver simply decides not to use it, perhaps because it
doesn't support the object.

The best solution is probably changing the log level from error to warning.
All sources I have found, regarding the error, have downplayed its
significance. There is not much of a reason for it to be on error level,
while causing potential confusions or misinterpretations.

Signed-off-by: Wang Shenran <shenran268@gmail.com>
---
 drivers/hwmon/acpi_power_meter.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/hwmon/acpi_power_meter.c b/drivers/hwmon/acpi_power_meter.c
index 6ba1a08253f0..4cf25458f0b9 100644
--- a/drivers/hwmon/acpi_power_meter.c
+++ b/drivers/hwmon/acpi_power_meter.c
@@ -681,8 +681,8 @@ static int setup_attrs(struct acpi_power_meter_resource *resource)
 
 	if (resource->caps.flags & POWER_METER_CAN_CAP) {
 		if (!can_cap_in_hardware()) {
-			dev_err(&resource->acpi_dev->dev,
-				"Ignoring unsafe software power cap!\n");
+			dev_warn(&resource->acpi_dev->dev,
+				 "Ignoring unsafe software power cap!\n");
 			goto skip_unsafe_cap;
 		}
 
-- 
2.20.1


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

* Re: [PATCH v2 1/1] drivers/hwmon/acpi_power_meter.c: Change log level
  2019-07-24  8:01 ` [PATCH v2 1/1] drivers/hwmon/acpi_power_meter.c: Change log level Wang Shenran
@ 2019-07-24 14:07   ` Guenter Roeck
  2019-07-24 15:00     ` Shenran Wang
  0 siblings, 1 reply; 3+ messages in thread
From: Guenter Roeck @ 2019-07-24 14:07 UTC (permalink / raw)
  To: Wang Shenran; +Cc: jdelvare, linux-hwmon

On Wed, Jul 24, 2019 at 11:01:10AM +0300, Wang Shenran wrote:
> At boot time, the acpi_power_meter driver logs the following error level
> message: "Ignoring unsafe software power cap". Having read about it from
> a few sources, it seems that the error message can be quite misleading.
> 
> While the message can imply that Linux is ignoring the fact that the
> system is operating in potentially dangerous conditions, the truth is
> the driver found an ACPI_PMC object that supports software power
> capping. The driver simply decides not to use it, perhaps because it
> doesn't support the object.
> 
> The best solution is probably changing the log level from error to warning.
> All sources I have found, regarding the error, have downplayed its
> significance. There is not much of a reason for it to be on error level,
> while causing potential confusions or misinterpretations.
> 
> Signed-off-by: Wang Shenran <shenran268@gmail.com>

Applied to hwmon-next.

Thanks,
Guenter

> ---
>  drivers/hwmon/acpi_power_meter.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/hwmon/acpi_power_meter.c b/drivers/hwmon/acpi_power_meter.c
> index 6ba1a08253f0..4cf25458f0b9 100644
> --- a/drivers/hwmon/acpi_power_meter.c
> +++ b/drivers/hwmon/acpi_power_meter.c
> @@ -681,8 +681,8 @@ static int setup_attrs(struct acpi_power_meter_resource *resource)
>  
>  	if (resource->caps.flags & POWER_METER_CAN_CAP) {
>  		if (!can_cap_in_hardware()) {
> -			dev_err(&resource->acpi_dev->dev,
> -				"Ignoring unsafe software power cap!\n");
> +			dev_warn(&resource->acpi_dev->dev,
> +				 "Ignoring unsafe software power cap!\n");
>  			goto skip_unsafe_cap;
>  		}
>  

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

* Re: [PATCH v2 1/1] drivers/hwmon/acpi_power_meter.c: Change log level
  2019-07-24 14:07   ` Guenter Roeck
@ 2019-07-24 15:00     ` Shenran Wang
  0 siblings, 0 replies; 3+ messages in thread
From: Shenran Wang @ 2019-07-24 15:00 UTC (permalink / raw)
  To: Guenter Roeck; +Cc: jdelvare, linux-hwmon

Great, thanks!

Shenran

On Wed, Jul 24, 2019 at 5:07 PM Guenter Roeck <linux@roeck-us.net> wrote:
>
> On Wed, Jul 24, 2019 at 11:01:10AM +0300, Wang Shenran wrote:
> > At boot time, the acpi_power_meter driver logs the following error level
> > message: "Ignoring unsafe software power cap". Having read about it from
> > a few sources, it seems that the error message can be quite misleading.
> >
> > While the message can imply that Linux is ignoring the fact that the
> > system is operating in potentially dangerous conditions, the truth is
> > the driver found an ACPI_PMC object that supports software power
> > capping. The driver simply decides not to use it, perhaps because it
> > doesn't support the object.
> >
> > The best solution is probably changing the log level from error to warning.
> > All sources I have found, regarding the error, have downplayed its
> > significance. There is not much of a reason for it to be on error level,
> > while causing potential confusions or misinterpretations.
> >
> > Signed-off-by: Wang Shenran <shenran268@gmail.com>
>
> Applied to hwmon-next.
>
> Thanks,
> Guenter
>
> > ---
> >  drivers/hwmon/acpi_power_meter.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/hwmon/acpi_power_meter.c b/drivers/hwmon/acpi_power_meter.c
> > index 6ba1a08253f0..4cf25458f0b9 100644
> > --- a/drivers/hwmon/acpi_power_meter.c
> > +++ b/drivers/hwmon/acpi_power_meter.c
> > @@ -681,8 +681,8 @@ static int setup_attrs(struct acpi_power_meter_resource *resource)
> >
> >       if (resource->caps.flags & POWER_METER_CAN_CAP) {
> >               if (!can_cap_in_hardware()) {
> > -                     dev_err(&resource->acpi_dev->dev,
> > -                             "Ignoring unsafe software power cap!\n");
> > +                     dev_warn(&resource->acpi_dev->dev,
> > +                              "Ignoring unsafe software power cap!\n");
> >                       goto skip_unsafe_cap;
> >               }
> >

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

end of thread, other threads:[~2019-07-24 15:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <6b6af74c-2a2b-1704-173b-bb1b466b2197@roeck-us.net>
2019-07-24  8:01 ` [PATCH v2 1/1] drivers/hwmon/acpi_power_meter.c: Change log level Wang Shenran
2019-07-24 14:07   ` Guenter Roeck
2019-07-24 15:00     ` Shenran Wang

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.