Re: [PATCH] spi: tegra: avoid unsigned->signed->unsigned promotion

2013-12-02 Thread Michal Nazarewicz
> On Fri, Nov 29, 2013 at 06:12:44PM +0100, Michal Nazarewicz wrote: >> u8 type, which is unsigned, is promoted to int, which is singned, when >> doing a binary shift. Then, on 64-bit machines, it is further promoted >> to unsigned long which may lead to more significant half of the value >> to be

Re: [PATCH] spi: tegra: avoid unsigned->signed->unsigned promotion

2013-11-29 Thread Thierry Reding
On Fri, Nov 29, 2013 at 06:12:44PM +0100, Michal Nazarewicz wrote: > From: Michal Nazarewicz > > u8 type, which is unsigned, is promoted to int, which is singned, when > doing a binary shift. Then, on 64-bit machines, it is further promoted > to unsigned long which may lead to more significant h

[PATCH] spi: tegra: avoid unsigned->signed->unsigned promotion

2013-11-29 Thread Michal Nazarewicz
From: Michal Nazarewicz u8 type, which is unsigned, is promoted to int, which is singned, when doing a binary shift. Then, on 64-bit machines, it is further promoted to unsigned long which may lead to more significant half of the value to be all ones. To avoid this, explicitly promote to an uns