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]
Message-ID: <524D4967.4030300@metafoo.de>
Date:	Thu, 03 Oct 2013 12:39:35 +0200
From:	Lars-Peter Clausen <lars@...afoo.de>
To:	Mark Brown <broonie@...nel.org>
CC:	Jean Delvare <khali@...ux-fr.org>,
	Guenter Roeck <linux@...ck-us.net>,
	Jonathan Cameron <jic23@...nel.org>, lm-sensors@...sensors.org,
	linux-kernel@...r.kernel.org, linux-iio@...r.kernel.org,
	linux-spi@...r.kernel.org, Viresh Kumar <viresh.kumar@...aro.org>
Subject: Re: [PATCH 1/3] spi: Add a spi_w8r16be() helper

On 09/29/2013 02:30 PM, Mark Brown wrote:
> On Fri, Sep 27, 2013 at 10:01:36PM +0200, Lars-Peter Clausen wrote:
>> On 09/27/2013 09:22 PM, Mark Brown wrote:
> 
>>> Indeed.  I don't think that's terribly well thought through though,
>>> especially not now we have annotations for endianness (as you noticed!).
> 
>> I wouldn't mind updating spi_w8r16() to do the conversion to big-endian.
>> Especially considering that a driver using the function will probably always
>> need to do a endian conversion anyway to work correctly on both
>> endiannesses. We can add a LE variant if we should ever need it.
> 
> I think that's probably the way to go, the API seems to error prone as
> it is.

It looks as if for the ads7871 the wire order is actually little endian.
I'm still not sure about the STMPE as the datasheet and code seem to
contradict each other. But considering that the code probably was tested on
a LE platform, the driver also assumes that spi_w8r16() returns a little
endian word. Maybe we can merge this series as it is, then add a LE version
for the ads7871 and STMPE driver and afterward remove the wire-order
spi_w8r16().

- Lars
--
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