Re: [PATCH 1/3] spi: fix undefined behaviour in SPI_BPW_RANGE_MASK

From: Mark Brown
Date: Sat Jun 01 2013 - 14:47:34 EST


On Thu, May 30, 2013 at 09:59:39AM -0600, Stephen Warren wrote:
> From: Stephen Warren <swarren@xxxxxxxxxx>
>
> The parameters to SPI_BPW_RANGE_MASK() are in the range 1..32. If 32 is
> used as a parameter, part of the expression is "1 << 32". Since 32 is >=
> the size of the type in use, such a shift is undefined behaviour. Add

Applied all, thanks.

Attachment: signature.asc
Description: Digital signature