linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Darren Hart <dvhart@infradead.org>
To: Eric Curtin <ericcurtin17@gmail.com>
Cc: Henrique de Moraes Holschuh <hmh@hmh.eng.br>,
	Joe Perches <joe@perches.com>,
	platform-driver-x86@vger.kernel.org,
	Kernel development list <linux-kernel@vger.kernel.org>,
	ibm-acpi-devel@lists.sourceforge.net
Subject: Re: [PATCH] Remove ambiguous logging for "Unsupported brightness interface"
Date: Sun, 7 Feb 2016 12:13:24 -0800	[thread overview]
Message-ID: <20160207201324.GH1779@malice.jf.intel.com> (raw)
In-Reply-To: <CANpvso5wg_Zz7VSRDeKamx0XCCcjr3y+i2UKNFLe+BZEofEG_A@mail.gmail.com>

On Sat, Jan 30, 2016 at 04:55:59PM +0000, Eric Curtin wrote:
> On 30 January 2016 at 12:20, Henrique de Moraes Holschuh <hmh@hmh.eng.br> 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@gmail.com>
> >> > ---
> >> >  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@gmail.com>
> ---
>  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);

This patch is malformed, has whitespace issues, and doesn't apply. Please apply
all patches before sending them to the list.

Given it's trivial, I made the change manually and have queued this up to the
testing branch.

Thanks,

-- 
Darren Hart
Intel Open Source Technology Center

      parent reply	other threads:[~2016-02-07 20:13 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-27 22:14 [PATCH] Remove ambiguous logging for "Unsupported brightness interface" Eric Curtin
2016-01-27 23:26 ` Joe Perches
2016-01-28  0:36   ` Eric Curtin
2016-01-28  0:43     ` Joe Perches
2016-01-28  0:52       ` Eric Curtin
2016-01-30 12:20   ` Henrique de Moraes Holschuh
2016-01-30 16:55     ` Eric Curtin
2016-01-30 19:49       ` Henrique de Moraes Holschuh
2016-02-07 20:13       ` Darren Hart [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=20160207201324.GH1779@malice.jf.intel.com \
    --to=dvhart@infradead.org \
    --cc=ericcurtin17@gmail.com \
    --cc=hmh@hmh.eng.br \
    --cc=ibm-acpi-devel@lists.sourceforge.net \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=platform-driver-x86@vger.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;
as well as URLs for NNTP newsgroup(s).