[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <52139B4E.6070700@wwwdotorg.org>
Date: Tue, 20 Aug 2013 10:37:34 -0600
From: Stephen Warren <swarren@...dotorg.org>
To: Mika Westerberg <mika.westerberg@...ux.intel.com>
CC: linux-spi@...r.kernel.org, Mark Brown <broonie@...nel.org>,
Stephen Warren <swarren@...dia.com>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] spi: fix SPI_BIT_MASK() to use correct size for 32-bit
transfer mask
On 08/20/2013 06:15 AM, Mika Westerberg wrote:
> When building a 64-bit kernel we get the following warning from the
> compiler:
>
> drivers/spi/spi-pxa2xx.c: In function ‘pxa2xx_spi_probe’:
> drivers/spi/spi-pxa2xx.c:1152:3: warning: large integer implicitly truncated to unsigned type [-Woverflow]
> master->bits_per_word_mask = SPI_BPW_RANGE_MASK(4, 32);
> ^
> This is due the fact that when the max range is specified as 32
> SPI_BIT_MASK() expands to ~0UL which doesn't fit to the u32 type that the
> master->bits_per_word_mask is.
>
> Fix this by using ~0U instead.
The same patch is already in next-20130819 at least, as:
b6aa23c spi: fix SPI_BIT_MASK so it always fits into 32-bits
--
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