Re: [PATCH] Remove ambiguous logging for "Unsupported brightness interface"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 30 January 2016 at 12:20, Henrique de Moraes Holschuh <hmh@xxxxxxxxxx> wrote:
> On Wed, 27 Jan 2016, Joe Perches wrote:
>> On Wed, 2016-01-27 at 22:14 +0000, Eric Curtin wrote:
>> > Message gets logged on machines that are well supported.
>> >
>> > Signed-off-by: Eric Curtin <ericcurtin17@xxxxxxxxx>
>> > ---
>> >  drivers/platform/x86/thinkpad_acpi.c | 1 -
>> >  1 file changed, 1 deletion(-)
>> >
>> > diff --git a/drivers/platform/x86/thinkpad_acpi.c
>> > b/drivers/platform/x86/thinkpad_acpi.c
>> > index a268a7a..4eb41aa 100644
>> > --- a/drivers/platform/x86/thinkpad_acpi.c
>> > +++ b/drivers/platform/x86/thinkpad_acpi.c
>> > @@ -6661,7 +6661,6 @@ static void __init
>> > tpacpi_detect_brightness_capabilities(void)
>> >                 pr_info("detected a 8-level brightness capable
>> > ThinkPad\n");
>> >                 break;
>> >         default:
>> > -               pr_info("Unsupported brightness interface\n");
>> >                 tp_features.bright_unkfw = 1;
>> >                 bright_maxlvl = b - 1;
>> >         }
>>
>> Perhaps this should be something like this instead:
>> ---
>>  drivers/platform/x86/thinkpad_acpi.c | 4 +---
>>  1 file changed, 1 insertion(+), 3 deletions(-)
>>
>> diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c
>> index a268a7a..bd12c71 100644
>> --- a/drivers/platform/x86/thinkpad_acpi.c
>> +++ b/drivers/platform/x86/thinkpad_acpi.c
>> @@ -6653,18 +6653,16 @@ static void __init tpacpi_detect_brightness_capabilities(void)
>>       switch (b) {
>>       case 16:
>>               bright_maxlvl = 15;
>> -             pr_info("detected a 16-level brightness capable ThinkPad\n");
>>               break;
>>       case 8:
>>       case 0:
>>               bright_maxlvl = 7;
>> -             pr_info("detected a 8-level brightness capable ThinkPad\n");
>>               break;
>>       default:
>> -             pr_info("Unsupported brightness interface\n");
>>               tp_features.bright_unkfw = 1;
>>               bright_maxlvl = b - 1;
>>       }
>> +     pr_info("detected %u brightness levels\n", bright_maxlvl + 1);
>>  }
>
> This can be made pr_debug, since we're touching it...
>
> --
>   "One disk to rule them all, One disk to find them. One disk to bring
>   them all and in the darkness grind them. In the Land of Redmond
>   where the shadows lie." -- The Silicon Valley Tarot
>   Henrique Holschuh

"Unsupported brightness interface" message gets logged on
 machines that are well supported.

Signed-off-by: Eric Curtin <ericcurtin17@xxxxxxxxx>
---
 drivers/platform/x86/thinkpad_acpi.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/platform/x86/thinkpad_acpi.c
b/drivers/platform/x86/thinkpad_acpi.c
index a268a7a..e305ab5 100644
--- a/drivers/platform/x86/thinkpad_acpi.c
+++ b/drivers/platform/x86/thinkpad_acpi.c
@@ -6653,18 +6653,16 @@ static void __init
tpacpi_detect_brightness_capabilities(void)
        switch (b) {
        case 16:
                bright_maxlvl = 15;
-               pr_info("detected a 16-level brightness capable ThinkPad\n");
                break;
        case 8:
        case 0:
                bright_maxlvl = 7;
-               pr_info("detected a 8-level brightness capable ThinkPad\n");
                break;
        default:
-               pr_info("Unsupported brightness interface\n");
                tp_features.bright_unkfw = 1;
                bright_maxlvl = b - 1;
        }
+       pr_debug("detected %u brightness levels\n", bright_maxlvl + 1);
 }

 static int __init brightness_init(struct ibm_init_struct *iibm)
-- 
2.5.0

------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
ibm-acpi-devel mailing list
ibm-acpi-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/ibm-acpi-devel



[Index of Archives]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Photo]     [Yosemite Photos]     [Yosemite Advice]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]

  Powered by Linux