lkml.org 
[lkml]   [2017]   [Dec]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] platform/x86: intel-vbtn: Simplify autorelease logic
Date
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) <dvhart@infradead.org>
> Cc: Stefan Brüns <stefan.bruens@rwth-aachen.de>
> Cc: AceLan Kao <acelan.kao@canonical.com>
> ---
> 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 <stefan.bruens@rwth-aachen.de>
Tested-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>

Regards,

Stefan

--
Stefan Brüns / Bergstraße 21 / 52062 Aachen
home: +49 241 53809034 mobile: +49 151 50412019[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2017-12-11 02:49    [W:0.056 / U:0.180 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site