From: Torsten Fleischer Date: Fri, 7 Nov 2014 17:11:58 +0000 (+0100) Subject: spi: spi-gpio: Fix compiler warning when building for 64 bit systems X-Git-Tag: omap-for-v3.19/fixes-rc1~131^2~2^4 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cfb4bbd8fbed76a6b715916fabeca4597cb38721;p=pandora-kernel.git 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 Signed-off-by: Torsten Fleischer Signed-off-by: Mark Brown --- Reading git-diff-tree failed