From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751901AbdAMMkz (ORCPT ); Fri, 13 Jan 2017 07:40:55 -0500 Received: from server.atrad.com.au ([150.101.241.2]:36160 "EHLO server.atrad.com.au" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751650AbdAMMkL (ORCPT ); Fri, 13 Jan 2017 07:40:11 -0500 Date: Fri, 13 Jan 2017 23:08:58 +1030 From: Jonathan Woithe To: Micha?? K??pie?? Cc: Darren Hart , 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 Message-ID: <20170113123858.GF9036@marvin.atrad.com.au> References: <20170111085933.2486-1-kernel@kempniu.pl> <20170111085933.2486-5-kernel@kempniu.pl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170111085933.2486-5-kernel@kempniu.pl> User-Agent: Mutt/1.5.23 (2014-03-12) X-MIMEDefang-action: accept Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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?? Acked-by: Jonathan Woithe > --- > 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 --