spi: spi-gpio: fix compilation warning on 64 bits systems
PATCH 1/1 spi: spi-gpio: fix compilation warning on 64 bits systems
SPI_GPIO_NO_MOSI and SPI_GPIO_NO_MISO flags are type casted to unsigned long, yet, they are to be stored in an unsigned int field in the spi_gpio_platform_data structure.
This leads to the following warning during compilation on 64 bits systems:
warning: large integer implicitly truncated to unsigned type [-Woverflow]
Reported-by Fengguang Wu <[email protected]>
--- include/linux/spi/spi_gpio.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
include/linux/spi/spi_gpio.h +2 -2
@@ -62,8 +62,8 @@*/ struct spi_gpio_platform_data {unsigned sck; -unsigned mosi; -unsigned miso; +unsigned long mosi; +unsigned long miso;u16 num_chipselect; };
Signature · 8 lines
1.7.10.4 ------------------------------------------------------------------------------ Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_jan
Mark Brown
AppliedQuoted 3 lines · Maxime Ripard
SPI_GPIO_NO_MOSIandSPI_GPIO_NO_MISOflags are type casted to unsigned long, yet, they are to be stored in an unsigned int field in thespi_gpio_platform_datastructure.
Applied, thanks.