mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jonathan Woithe <jwoithe@just42.net>
To: Micha?? K??pie?? <kernel@kempniu.pl>
Cc: Darren Hart <dvhart@infradead.org>,
	platform-driver-x86@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 4/4] platform/x86: fujitsu-laptop: make hotkey handling functions more similar
Date: Fri, 13 Jan 2017 23:08:58 +1030	[thread overview]
Message-ID: <20170113123858.GF9036@marvin.atrad.com.au> (raw)
In-Reply-To: <20170111085933.2486-5-kernel@kempniu.pl>

On Wed, Jan 11, 2017 at 09:59:33AM +0100, Micha?? K??pie?? wrote:
> Make two minor tweaks to acpi_fujitsu_hotkey_press() to make it more
> similar to acpi_fujitsu_hotkey_release():
> 
>   * call vdbg_printk() after reporting the input event,
>   * return immediately when kfifo_in_locked() fails.
> 
> Signed-off-by: Micha?? K??pie?? <kernel@kempniu.pl>

Acked-by: Jonathan Woithe <jwoithe@just42.net>

> ---
>  drivers/platform/x86/fujitsu-laptop.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/platform/x86/fujitsu-laptop.c b/drivers/platform/x86/fujitsu-laptop.c
> index 06653a8594ed..96f8163d5002 100644
> --- a/drivers/platform/x86/fujitsu-laptop.c
> +++ b/drivers/platform/x86/fujitsu-laptop.c
> @@ -1035,18 +1035,18 @@ static void acpi_fujitsu_hotkey_press(int keycode)
>  	struct input_dev *input = fujitsu_hotkey->input;
>  	int status;
>  
> -	vdbg_printk(FUJLAPTOP_DBG_TRACE,
> -		    "Push keycode into ringbuffer [%d]\n", keycode);
>  	status = kfifo_in_locked(&fujitsu_hotkey->fifo,
>  				 (unsigned char *)&keycode, sizeof(keycode),
>  				 &fujitsu_hotkey->fifo_lock);
>  	if (status != sizeof(keycode)) {
>  		vdbg_printk(FUJLAPTOP_DBG_WARN,
>  			    "Could not push keycode [0x%x]\n", keycode);
> -	} else {
> -		input_report_key(input, keycode, 1);
> -		input_sync(input);
> +		return;
>  	}
> +	input_report_key(input, keycode, 1);
> +	input_sync(input);
> +	vdbg_printk(FUJLAPTOP_DBG_TRACE,
> +		    "Push keycode into ringbuffer [%d]\n", keycode);
>  }
>  
>  static void acpi_fujitsu_hotkey_release(void)
> -- 
> 2.11.0

-- 

  reply	other threads:[~2017-01-13 12:40 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-11  8:59 [PATCH 0/4] fujitsu-laptop: acpi_fujitsu_hotkey_notify() cleanup Michał Kępień
2017-01-11  8:59 ` [PATCH 1/4] platform/x86: fujitsu-laptop: decrease indentation in acpi_fujitsu_hotkey_notify() Michał Kępień
2017-01-13 12:38   ` Jonathan Woithe
2017-01-11  8:59 ` [PATCH 2/4] platform/x86: fujitsu-laptop: move keycode processing to separate functions Michał Kępień
2017-01-13 12:38   ` Jonathan Woithe
2017-01-11  8:59 ` [PATCH 3/4] platform/x86: fujitsu-laptop: break up complex loop condition Michał Kępień
2017-01-13 12:38   ` Jonathan Woithe
2017-01-11  8:59 ` [PATCH 4/4] platform/x86: fujitsu-laptop: make hotkey handling functions more similar Michał Kępień
2017-01-13 12:38   ` Jonathan Woithe [this message]
2017-01-11 11:58 ` [PATCH 0/4] fujitsu-laptop: acpi_fujitsu_hotkey_notify() cleanup Jonathan Woithe
2017-01-11 12:26   ` Michał Kępień
2017-01-11 12:48     ` Jonathan Woithe
2017-01-13 21:51       ` Darren Hart
2017-01-13 22:09       ` Darren Hart

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=20170113123858.GF9036@marvin.atrad.com.au \
    --to=jwoithe@just42.net \
    --cc=dvhart@infradead.org \
    --cc=kernel@kempniu.pl \
    --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

Powered by JetHome