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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 12 Apr 2018 16:45:35 +0200
From:   Lukasz Majewski <lukma@...x.de>
To:     Joe Perches <joe@...ches.com>
Cc:     Dmitry Torokhov <dmitry.torokhov@...il.com>,
        linux-kernel@...r.kernel.org, linux-input@...r.kernel.org,
        Sascha Hauer <s.hauer@...gutronix.de>
Subject: Re: [PATCH 2/2] input: touchscreen mc13xxx: Add mc34708 support

On Wed, 11 Apr 2018 09:01:01 -0700
Joe Perches <joe@...ches.com> wrote:

> On Wed, 2018-04-11 at 16:13 +0200, Lukasz Majewski wrote:
> > From: Sascha Hauer <s.hauer@...gutronix.de>
> > 
> > The mc34708 has a different bit to enable pen detection. This
> > adds the driver data and devtype necessary to probe the device
> > and to distinguish between the mc13783 and the mc34708.  
> 
> style trivia:
> 
> > diff --git a/drivers/input/touchscreen/mc13783_ts.c
> > b/drivers/input/touchscreen/mc13783_ts.c  
> []
> > @@ -96,6 +135,10 @@ static void mc13783_ts_report_sample(struct
> > mc13783_ts_priv *priv) 
> >  	cr0 = (cr0 + cr1) / 2;
> >  
> > +	if (priv->drvdata->type == MC13XXX_TYPE_MC34708)
> > +		if (cr0 > 4080)
> > +			cr0 = 0;  
> 
> For easy of reading, this multiple if block should either
> use braces around the first if like:
> 
> 	if (foo) {
> 		if (bar)
> 			single_statement;
> 	}
> 
> or be written
> 
> 	if (foo && bar)
> 		single_statement;
> 
> I generally prefer the latter style.
> 

+1.

I will fix it in v2.


Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@...x.de

Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ