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] [day] [month] [year] [list]
Date:	Wed, 02 Mar 2016 19:55:28 -0800
From:	Joe Perches <joe@...ches.com>
To:	Jeffrey Lin (林義章) 
	<Jeffrey.Lin@...-ic.com>, "jeffrey.lin" <yajohn@...il.com>,
	"dmitry.torokhov@...il.com" <dmitry.torokhov@...il.com>,
	"rydberg@...omail.se" <rydberg@...omail.se>,
	"grant.likely@...aro.org" <grant.likely@...aro.org>,
	"robh+dt@...nel.org" <robh+dt@...nel.org>,
	"jeesw@...fas.com" <jeesw@...fas.com>,
	"bleung@...omium.org" <bleung@...omium.org>,
	"scott.liu@....com.tw" <scott.liu@....com.tw>
Cc:	Roger Yang (楊鎮瑋) 
	<Roger.Yang@...-ic.com>,
	KP Li (李昆倍) 
	<KP.Li@...-ic.com>,
	Albert Shieh (謝欣瑋) 
	<Albert.Shieh@...-ic.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-input@...r.kernel.org" <linux-input@...r.kernel.org>,
	"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>
Subject: Re: [PATCH] driver: input :touchscreen : add Raydium I2C touch
 driver

On Thu, 2016-03-03 at 03:14 +0000, Jeffrey Lin (林義章) wrote:
> Hi Joe:
> Thank you for your response. I'll follow your comments in next version.

OK, btw: the below looks very odd

> > +static int raydium_i2c_send_message(struct i2c_client *client,
> > +	size_t len, void *data)
> > +{
> > +	int error;
> > +	u8 buf[HEADER_SIZE], ii;
> > +
> > +	for (ii = 0; ii < HEADER_SIZE; ii++)
> > +		buf[ii] = ((u8 *)data)[3 - ii];

It intermixes a #define of 4 with a hard declaration of 3
to reverse copy a byte array of length HEADER_SIZE.

Maybe use:
	for (ii = 0; ii < HEADER_SIZE; ii++)
		buf[ii] = ((u8 *)data)[HEADER_SIZE - 1 - ii]

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ