lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 06 Aug 2015 07:54:37 -0700
From:	Joe Perches <joe@...ches.com>
To:	"Chen, Yu C" <yu.c.chen@...el.com>
Cc:	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"Zhang, Rui" <rui.zhang@...el.com>,
	"jslaby@...e.com" <jslaby@...e.com>,
	"dvhart@...radead.org" <dvhart@...radead.org>,
	"platform-driver-x86@...r.kernel.org" 
	<platform-driver-x86@...r.kernel.org>,
	"akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
	"Wysocki, Rafael J" <rafael.j.wysocki@...el.com>,
	"Westerberg, Mika" <mika.westerberg@...el.com>,
	"gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
	"mchehab@....samsung.com" <mchehab@....samsung.com>,
	"arnd@...db.de" <arnd@...db.de>
Subject: Re: [PATCH] surface pro 3: Add support driver for Surface Pro 3
 buttons

On Thu, 2015-08-06 at 11:20 +0000, Chen, Yu C wrote:
> On Wed, 2015-08-05 at 22:30 -0700, Joe Perches wrote:
[]
> > > +	case SURFACE_BUTTON_NOTIFY_PRESS_HOME:
> > > +		pressed = true;
> > > +	case SURFACE_BUTTON_NOTIFY_RELEASE_HOME:
> > > +		key_code = KEY_LEFTMETA;
> > > +		break;
> > 
> > It may be better to add a comment about the style or
> > maybe add a macro like
> > 
> > #define HANDLE_SURFACE_BUTTON_NOTIFY(type, code)	\
> > 	case SURFACE_BUTTON_NOTIFY_PRESS_##type:	\
> > 		pressed = true;	/* and fall-through */	\
> > 	case SURFACE_BUTTON_NOTIFY_RELEASE_##type:	\
> > 		key_code = code;			\
> > 		break;
> > 
> WRT macro HANDLE_SURFACE_BUTTON_NOTIFY, the checkpatch.pl
> complains that multi lines of codes should be wrapped in 'do
> while'state, but doing like this might lead to incorrect semantic.

checkpatch is a brainless tool that should be ignored
whenever you want.

> Is it ok to keep these codes and add comments like:

Up to you.  It'd OK to do nothing too.


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ