X86 platform drivers
 help / color / mirror / Atom feed
From: Darren Hart <dvhart@infradead.org>
To: Mattia Dongili <malattia@linux.it>
Cc: platform-driver-x86@vger.kernel.org, Dominik Matta <dominik@matta.sk>
Subject: Re: [PATCH] Keyboard backlight control for some Vaio Fit models
Date: Tue, 15 Dec 2015 10:01:28 -0800	[thread overview]
Message-ID: <20151215180128.GQ11972@malice.jf.intel.com> (raw)
In-Reply-To: <1450156352-16240-1-git-send-email-malattia@linux.it>

On Mon, Dec 14, 2015 at 09:12:32PM -0800, Mattia Dongili wrote:
> SVF1521P6EW, SVF1521DCXW, SVF13N1L2ES and likely most SVF*.
> do not expose separate timeout controls in auto mode.
> 
> Signed-off-by: Dominik Matta <dominik@matta.sk>
> Signed-off-by: Mattia Dongili <malattia@linux.it>
> ---
>  drivers/platform/x86/sony-laptop.c | 65 ++++++++++++++++++++++++++------------
>  1 file changed, 45 insertions(+), 20 deletions(-)
> 

Thanks Mattia,

The changes look fine.

At some point we should address some of the style inconsistencies with this
driver, but to nitpic on them for this patch wouldn't be productive. I've merged
this patch - please consider the following for future work with the goal toward
making the kernel code as consistent as possible to aid in legibility and
maintainability.

> @@ -1877,6 +1880,8 @@ static int sony_nc_kbd_backlight_setup(struct platform_device *pd,
>  		unsigned int handle)
>  {
>  	int result;
> +	int probe_base = 0;
> +	int ctl_base = 0;
>  	int ret = 0;

This isn't in CodingStyle, but is enforced by several maintainers and something
I'm trying to standardize on within platform/drivers/x86.

Please declare variables in decreasing line length in the absence of
dependencies. Also called "Reverse Christmas Tree Order".

So the above would become:

int probe_base = 0;
int ctl_base = 0;
int ret = 0;
int result;

Some maintainers prefer merging like types, especially with similar purpose. I'm
ambivalent on this.

>  
>  	if (kbdbl_ctl) {
> @@ -1885,11 +1890,25 @@ static int sony_nc_kbd_backlight_setup(struct platform_device *pd,
>  		return -EBUSY;
>  	}
>  
> -	/* verify the kbd backlight presence, these handles are not used for
> -	 * keyboard backlight only
> +	/* verify the kbd backlight presence, some of these handles are not used
> +	 * for keyboard backlight only
>  	 */

Comment blocks should start with a blank line:

/*
 * This is the first line.
 * This is the second.
 */

And should use standard sentence capitalization.

Thanks,

-- 
Darren Hart
Intel Open Source Technology Center

  reply	other threads:[~2015-12-15 18:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-15  5:12 [PATCH] Keyboard backlight control for some Vaio Fit models Mattia Dongili
2015-12-15 18:01 ` Darren Hart [this message]
2015-12-16 15:04   ` Mattia Dongili

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=20151215180128.GQ11972@malice.jf.intel.com \
    --to=dvhart@infradead.org \
    --cc=dominik@matta.sk \
    --cc=malattia@linux.it \
    --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