Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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]

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>

authored by

Maxime Ripard and committed by
Mark Brown
d560040f 5cbc7ca9

+2 -2
+2 -2
include/linux/spi/spi_gpio.h
··· 62 62 */ 63 63 struct spi_gpio_platform_data { 64 64 unsigned sck; 65 - unsigned mosi; 66 - unsigned miso; 65 + unsigned long mosi; 66 + unsigned long miso; 67 67 68 68 u16 num_chipselect; 69 69 };