spi: fix SPI_BIT_MASK so it always fits into 32-bits
authorStephen Warren <swarren@nvidia.com>
Thu, 1 Aug 2013 22:08:57 +0000 (16:08 -0600)
committerMark Brown <broonie@linaro.org>
Fri, 2 Aug 2013 10:31:22 +0000 (11:31 +0100)
commitb6aa23ccaea1548cfb404b41129717f13443bccf
tree9f09879e7e5483ce24403c7cf8f994907a293536
parent5ae90d8e467e625e447000cb4335c4db973b1095
spi: fix SPI_BIT_MASK so it always fits into 32-bits

On a 64-bit platform, ~0UL fills 64-bits, which causes SPI_BIT_MASK(32)
not to fit into 32 bits. This causes a warning when the result is assigned
to a 32-bit variable. Use ~0U instead to prevent this. This fixes:

drivers/spi/spi-gpio.c: In function 'spi_gpio_probe':
drivers/spi/spi-gpio.c:446:2: warning: large integer implicitly truncated to unsigned type [-Woverflow]

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
include/linux/spi/spi.h