Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752486AbdLLAbb (ORCPT ); Mon, 11 Dec 2017 19:31:31 -0500 Received: from bombadil.infradead.org ([65.50.211.133]:51183 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751379AbdLLAb3 (ORCPT ); Mon, 11 Dec 2017 19:31:29 -0500 Date: Mon, 11 Dec 2017 16:31:26 -0800 From: Darren Hart To: Stefan =?iso-8859-1?Q?Br=FCns?= Cc: platform-driver-x86@vger.kernel.org, LKML , AceLan Kao , Andy Shevchenko Subject: Re: [PATCH] platform/x86: intel-vbtn: Simplify autorelease logic Message-ID: <20171212003126.GD27831@fury> References: <3452614.9kDG2CtB8P@pebbles> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <3452614.9kDG2CtB8P@pebbles> User-Agent: Mutt/1.8.0 (2017-02-23) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1247 Lines: 29 On Mon, Dec 11, 2017 at 02:48:23AM +0100, Stefan Br?ns wrote: > On Saturday, December 9, 2017 12:07:08 AM CET Darren Hart (VMware) wrote: > > The new notify_handler logic determining if autorelease should be used or > > not is a bit awkward, and can result in more than one call to > > sparse_keymap_report_event for the same event (scancode). The nesting > > and long lines also made it difficult to read. > > > > Simplify the logic by eliminating a level of nesting with a goto and > > always calculate autorelease and val so we can make a single call to > > sparse_keymap_report_event. > > > > Signed-off-by: Darren Hart (VMware) > > Cc: Stefan Br?ns > > Cc: AceLan Kao > > --- > > Note: This is based on top of Stefan's v2 patch series for intel-vbtn, > > currently in my review-dvhart branch. > > > > drivers/platform/x86/intel-vbtn.c | 25 +++++++++++++------------ > > 1 file changed, 13 insertions(+), 12 deletions(-) > > Reviewed-by: Stefan Br?ns > Tested-by: Stefan Br?ns Appreciate you taking the time to review and test, thank you! -- Darren Hart VMware Open Source Technology Center