Message ID | 1444844510-13035-1-git-send-email-luisbg@osg.samsung.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Hi Luis,
[auto build test WARNING on spi/for-next -- if it's inappropriate base, please suggest rules for selecting the more suitable base]
url: https://github.com/0day-ci/linux/commits/Luis-de-Bethencourt/spi-kconfig-When-possible-compile-drivers-with-COMPILE_TEST/20151015-014349
config: openrisc-allyesconfig (attached as .config)
reproduce:
wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=openrisc
Note: it may well be a FALSE warning. FWIW you are at least aware of it now.
http://gcc.gnu.org/wiki/Better_Uninitialized_Warnings
All warnings (new ones prefixed by >>):
drivers/spi/spi-davinci.c: In function 'davinci_spi_chipselect':
>> drivers/spi/spi-davinci.c:219:6: warning: 'gpio' may be used uninitialized in this function
vim +/gpio +219 drivers/spi/spi-davinci.c
358934a6 drivers/spi/davinci_spi.c Sandeep Paulraj 2009-12-16 203
358934a6 drivers/spi/davinci_spi.c Sandeep Paulraj 2009-12-16 204 v &= ~bits;
358934a6 drivers/spi/davinci_spi.c Sandeep Paulraj 2009-12-16 205 iowrite32(v, addr);
358934a6 drivers/spi/davinci_spi.c Sandeep Paulraj 2009-12-16 206 }
358934a6 drivers/spi/davinci_spi.c Sandeep Paulraj 2009-12-16 207
358934a6 drivers/spi/davinci_spi.c Sandeep Paulraj 2009-12-16 208 /*
358934a6 drivers/spi/davinci_spi.c Sandeep Paulraj 2009-12-16 209 * Interface to control the chip select signal
358934a6 drivers/spi/davinci_spi.c Sandeep Paulraj 2009-12-16 210 */
358934a6 drivers/spi/davinci_spi.c Sandeep Paulraj 2009-12-16 211 static void davinci_spi_chipselect(struct spi_device *spi, int value)
358934a6 drivers/spi/davinci_spi.c Sandeep Paulraj 2009-12-16 212 {
212d4b69 drivers/spi/davinci_spi.c Sekhar Nori 2010-10-11 213 struct davinci_spi *dspi;
358934a6 drivers/spi/davinci_spi.c Sandeep Paulraj 2009-12-16 214 struct davinci_spi_platform_data *pdata;
365a7bb3 drivers/spi/spi-davinci.c Murali Karicheri 2014-09-16 215 struct davinci_spi_config *spicfg = spi->controller_data;
7978b8c3 drivers/spi/davinci_spi.c Brian Niebuhr 2010-08-13 216 u8 chip_sel = spi->chip_select;
212d4b69 drivers/spi/davinci_spi.c Sekhar Nori 2010-10-11 217 u16 spidat1 = CS_DEFAULT;
23853973 drivers/spi/davinci_spi.c Brian Niebuhr 2010-08-13 218 bool gpio_chipsel = false;
a88e34ea drivers/spi/spi-davinci.c Murali Karicheri 2014-08-01 @219 int gpio;
358934a6 drivers/spi/davinci_spi.c Sandeep Paulraj 2009-12-16 220
212d4b69 drivers/spi/davinci_spi.c Sekhar Nori 2010-10-11 221 dspi = spi_master_get_devdata(spi->master);
aae7147d drivers/spi/spi-davinci.c Murali Karicheri 2012-12-11 222 pdata = &dspi->pdata;
358934a6 drivers/spi/davinci_spi.c Sandeep Paulraj 2009-12-16 223
c0600140 drivers/spi/spi-davinci.c Grygorii Strashko 2014-08-01 224 if (spi->cs_gpio >= 0) {
a88e34ea drivers/spi/spi-davinci.c Murali Karicheri 2014-08-01 225 /* SPI core parse and update master->cs_gpio */
23853973 drivers/spi/davinci_spi.c Brian Niebuhr 2010-08-13 226 gpio_chipsel = true;
a88e34ea drivers/spi/spi-davinci.c Murali Karicheri 2014-08-01 227 gpio = spi->cs_gpio;
:::::: The code at line 219 was first introduced by commit
:::::: a88e34ea213e1bdbd9b2dfca1e1e5fa68b9649a0 spi: davinci: add support to configure gpio cs through dt
:::::: TO: Murali Karicheri <m-karicheri2@ti.com>
:::::: CC: Mark Brown <broonie@linaro.org>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
On Fri, Oct 16, 2015 at 2:30 AM, kbuild test robot <lkp@intel.com> wrote: > [auto build test WARNING on spi/for-next -- if it's inappropriate base, please suggest rules for selecting the more suitable base] > > url: https://github.com/0day-ci/linux/commits/Luis-de-Bethencourt/spi-kconfig-When-possible-compile-drivers-with-COMPILE_TEST/20151015-014349 > config: openrisc-allyesconfig (attached as .config) > reproduce: > wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross > chmod +x ~/bin/make.cross > # save the attached .config to linux build tree > make.cross ARCH=openrisc > > Note: it may well be a FALSE warning. FWIW you are at least aware of it now. > http://gcc.gnu.org/wiki/Better_Uninitialized_Warnings > > All warnings (new ones prefixed by >>): > > drivers/spi/spi-davinci.c: In function 'davinci_spi_chipselect': >>> drivers/spi/spi-davinci.c:219:6: warning: 'gpio' may be used uninitialized in this function That's a false positive... > vim +/gpio +219 drivers/spi/spi-davinci.c > > 358934a6 drivers/spi/davinci_spi.c Sandeep Paulraj 2009-12-16 203 > 358934a6 drivers/spi/davinci_spi.c Sandeep Paulraj 2009-12-16 204 v &= ~bits; > 358934a6 drivers/spi/davinci_spi.c Sandeep Paulraj 2009-12-16 205 iowrite32(v, addr); > 358934a6 drivers/spi/davinci_spi.c Sandeep Paulraj 2009-12-16 206 } > 358934a6 drivers/spi/davinci_spi.c Sandeep Paulraj 2009-12-16 207 > 358934a6 drivers/spi/davinci_spi.c Sandeep Paulraj 2009-12-16 208 /* > 358934a6 drivers/spi/davinci_spi.c Sandeep Paulraj 2009-12-16 209 * Interface to control the chip select signal > 358934a6 drivers/spi/davinci_spi.c Sandeep Paulraj 2009-12-16 210 */ > 358934a6 drivers/spi/davinci_spi.c Sandeep Paulraj 2009-12-16 211 static void davinci_spi_chipselect(struct spi_device *spi, int value) > 358934a6 drivers/spi/davinci_spi.c Sandeep Paulraj 2009-12-16 212 { > 212d4b69 drivers/spi/davinci_spi.c Sekhar Nori 2010-10-11 213 struct davinci_spi *dspi; > 358934a6 drivers/spi/davinci_spi.c Sandeep Paulraj 2009-12-16 214 struct davinci_spi_platform_data *pdata; > 365a7bb3 drivers/spi/spi-davinci.c Murali Karicheri 2014-09-16 215 struct davinci_spi_config *spicfg = spi->controller_data; > 7978b8c3 drivers/spi/davinci_spi.c Brian Niebuhr 2010-08-13 216 u8 chip_sel = spi->chip_select; > 212d4b69 drivers/spi/davinci_spi.c Sekhar Nori 2010-10-11 217 u16 spidat1 = CS_DEFAULT; > 23853973 drivers/spi/davinci_spi.c Brian Niebuhr 2010-08-13 218 bool gpio_chipsel = false; > a88e34ea drivers/spi/spi-davinci.c Murali Karicheri 2014-08-01 @219 int gpio; > 358934a6 drivers/spi/davinci_spi.c Sandeep Paulraj 2009-12-16 220 > 212d4b69 drivers/spi/davinci_spi.c Sekhar Nori 2010-10-11 221 dspi = spi_master_get_devdata(spi->master); > aae7147d drivers/spi/spi-davinci.c Murali Karicheri 2012-12-11 222 pdata = &dspi->pdata; > 358934a6 drivers/spi/davinci_spi.c Sandeep Paulraj 2009-12-16 223 > c0600140 drivers/spi/spi-davinci.c Grygorii Strashko 2014-08-01 224 if (spi->cs_gpio >= 0) { > a88e34ea drivers/spi/spi-davinci.c Murali Karicheri 2014-08-01 225 /* SPI core parse and update master->cs_gpio */ > 23853973 drivers/spi/davinci_spi.c Brian Niebuhr 2010-08-13 226 gpio_chipsel = true; > a88e34ea drivers/spi/spi-davinci.c Murali Karicheri 2014-08-01 227 gpio = spi->cs_gpio; ... which can be avoided by removing the variables gpio_chipsel and gpio, and replacing gpio_chipsel by "spi->cs_gpio >= 0", and gpio by "spi->cs_gpio". Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds -- To unsubscribe from this list: send the line "unsubscribe linux-spi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig index 26b8605..585d0cb 100644 --- a/drivers/spi/Kconfig +++ b/drivers/spi/Kconfig @@ -128,7 +128,7 @@ config SPI_AU1550 config SPI_BCM53XX tristate "Broadcom BCM53xx SPI controller" - depends on ARCH_BCM_5301X + depends on ARCH_BCM_5301X || COMPILE_TEST depends on BCMA_POSSIBLE select BCMA help @@ -192,7 +192,7 @@ config SPI_COLDFIRE_QSPI config SPI_DAVINCI tristate "Texas Instruments DaVinci/DA8x/OMAP-L/AM1x SoC SPI controller" - depends on ARCH_DAVINCI || ARCH_KEYSTONE + depends on ARCH_DAVINCI || ARCH_KEYSTONE || COMPILE_TEST select SPI_BITBANG help SPI master controller for DaVinci/DA8x/OMAP-L/AM1x SPI modules. @@ -209,7 +209,7 @@ config SPI_DLN2 config SPI_EFM32 tristate "EFM32 SPI controller" - depends on OF && ARM && (ARCH_EFM32 || COMPILE_TEST) + depends on OF && (ARM && ARCH_EFM32) || COMPILE_TEST select SPI_BITBANG help Driver for the spi controller found on Energy Micro's EFM32 SoCs. @@ -370,7 +370,7 @@ config SPI_OMAP_UWIRE config SPI_OMAP24XX tristate "McSPI driver for OMAP" depends on HAS_DMA - depends on ARM || ARM64 || AVR32 || HEXAGON || MIPS || SUPERH + depends on ARM || ARM64 || AVR32 || HEXAGON || MIPS || SUPERH || COMPILE_TEST depends on ARCH_OMAP2PLUS || COMPILE_TEST help SPI master controller for OMAP24XX and later Multichannel SPI @@ -488,7 +488,7 @@ config SPI_S3C24XX_FIQ config SPI_S3C64XX tristate "Samsung S3C64XX series type SPI" - depends on (PLAT_SAMSUNG || ARCH_EXYNOS) + depends on (PLAT_SAMSUNG || ARCH_EXYNOS) || COMPILE_TEST help SPI driver for Samsung S3C64XX and newer SoCs. @@ -533,7 +533,7 @@ config SPI_SIRF config SPI_ST_SSC4 tristate "STMicroelectronics SPI SSC-based driver" - depends on ARCH_STI + depends on ARCH_STI || COMPILE_TEST help STMicroelectronics SoCs support for SPI. If you say yes to this option, support will be included for the SSC driven SPI.
These drivers only have runtime but no build time dependencies, so they can be built for testing purposes if the Kconfig COMPILE_TEST option is enabled. This is useful to have more build coverage and make sure that drivers are not affected by changes that could cause build regressions. Signed-off-by: Luis de Bethencourt <luisbg@osg.samsung.com> --- drivers/spi/Kconfig | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)