summaryrefslogtreecommitdiffstats
path: root/Documentation/devicetree
diff options
context:
space:
mode:
authorTorsten Fleischer <torfl6749@gmail.com>2014-11-07 18:11:58 +0100
committerMark Brown <broonie@kernel.org>2014-11-08 10:12:57 +0100
commitcfb4bbd8fbed76a6b715916fabeca4597cb38721 (patch)
tree738d94a5ed02713d5f82c8f2ec8d8df9f7e1437f /Documentation/devicetree
parentspi: spi-gpio: Add dt support for a single device with no chip select (diff)
downloadlinux-cfb4bbd8fbed76a6b715916fabeca4597cb38721.tar.xz
linux-cfb4bbd8fbed76a6b715916fabeca4597cb38721.zip
spi: spi-gpio: Fix compiler warning when building for 64 bit systems
The assignment of SPI_GPIO_NO_CHIPSELECT to cs_gpios[0] causes the following compiler warning, when building for 64 bit systems: "warning: overflow in implicit constant conversion [-Woverflow]". This is because the SPI_GPIO_NO_CHIPSELECT flag is a '-1' type casted to unsigned long and cs_gpios is of the type int. Furthermore the chip select's GPIO number is locally stored as unsigned int and compared with SPI_GPIO_NO_CHIPSELECT. Thus the result of the comparison is always false, if unsigned long and unsigned int have a different size. As part of the fix this patch adds a check for the device tree's cs-gpios property. Reported-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: Torsten Fleischer <torfl6749@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'Documentation/devicetree')
0 files changed, 0 insertions, 0 deletions