[spi:for-4.20 83/83] include/linux/compiler.h:358:38: error: call to '__compiletime_assert_619' declared with attribute error: BUILD_BUG failed

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-4.20
head:   e82b0b3828451c1cd331d9f304c6078fcd43b62e
commit: e82b0b3828451c1cd331d9f304c6078fcd43b62e [83/83] spi: bcm2835: Fix race on DMA termination
config: riscv-allyesconfig (attached as .config)
compiler: riscv64-linux-gcc (GCC) 8.1.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        git checkout e82b0b3828451c1cd331d9f304c6078fcd43b62e
        # save the attached .config to linux build tree
        GCC_VERSION=8.1.0 make.cross ARCH=riscv 

All error/warnings (new ones prefixed by >>):

   In file included from arch/riscv/include/asm/atomic.h:23,
                    from include/linux/atomic.h:7,
                    from include/linux/mutex.h:18,
                    from include/linux/notifier.h:14,
                    from include/linux/clk.h:17,
                    from drivers/spi/spi-bcm2835.c:24:
   drivers/spi/spi-bcm2835.c: In function 'bcm2835_spi_handle_err':
>> arch/riscv/include/asm/cmpxchg.h:345:2: warning: '__ret' is used uninitialized in this function [-Wuninitialized]
     __ret;        \
     ^~~~~
   arch/riscv/include/asm/cmpxchg.h:315:21: note: '__ret' was declared here
     __typeof__(*(ptr)) __ret;     \
                        ^~~~~
   arch/riscv/include/asm/cmpxchg.h:352:23: note: in expansion of macro '__cmpxchg'
     (__typeof__(*(ptr))) __cmpxchg((ptr),    \
                          ^~~~~~~~~
   drivers/spi/spi-bcm2835.c:619:6: note: in expansion of macro 'cmpxchg'
     if (cmpxchg(&bs->dma_pending, true, false)) {
         ^~~~~~~
   drivers/spi/spi-bcm2835.c: In function 'bcm2835_spi_dma_done':
>> arch/riscv/include/asm/cmpxchg.h:345:2: warning: '__ret' is used uninitialized in this function [-Wuninitialized]
     __ret;        \
     ^~~~~
   arch/riscv/include/asm/cmpxchg.h:315:21: note: '__ret' was declared here
     __typeof__(*(ptr)) __ret;     \
                        ^~~~~
   arch/riscv/include/asm/cmpxchg.h:352:23: note: in expansion of macro '__cmpxchg'
     (__typeof__(*(ptr))) __cmpxchg((ptr),    \
                          ^~~~~~~~~
   drivers/spi/spi-bcm2835.c:235:6: note: in expansion of macro 'cmpxchg'
     if (cmpxchg(&bs->dma_pending, true, false)) {
         ^~~~~~~
   In file included from include/asm-generic/getorder.h:7,
                    from arch/riscv/include/asm/page.h:124,
                    from drivers/spi/spi-bcm2835.c:23:
   drivers/spi/spi-bcm2835.c: In function 'bcm2835_spi_handle_err':
>> include/linux/compiler.h:358:38: error: call to '__compiletime_assert_619' declared with attribute error: BUILD_BUG failed
     _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
                                         ^
   include/linux/compiler.h:338:4: note: in definition of macro '__compiletime_assert'
       prefix ## suffix();    \
       ^~~~~~
   include/linux/compiler.h:358:2: note: in expansion of macro '_compiletime_assert'
     _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
     ^~~~~~~~~~~~~~~~~~~
   include/linux/build_bug.h:45:37: note: in expansion of macro 'compiletime_assert'
    #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
                                        ^~~~~~~~~~~~~~~~~~
   include/linux/build_bug.h:79:21: note: in expansion of macro 'BUILD_BUG_ON_MSG'
    #define BUILD_BUG() BUILD_BUG_ON_MSG(1, "BUILD_BUG failed")
                        ^~~~~~~~~~~~~~~~
   arch/riscv/include/asm/cmpxchg.h:343:3: note: in expansion of macro 'BUILD_BUG'
      BUILD_BUG();      \
      ^~~~~~~~~
   arch/riscv/include/asm/cmpxchg.h:352:23: note: in expansion of macro '__cmpxchg'
     (__typeof__(*(ptr))) __cmpxchg((ptr),    \
                          ^~~~~~~~~
   drivers/spi/spi-bcm2835.c:619:6: note: in expansion of macro 'cmpxchg'
     if (cmpxchg(&bs->dma_pending, true, false)) {
         ^~~~~~~
   drivers/spi/spi-bcm2835.c: In function 'bcm2835_spi_dma_done':
   include/linux/compiler.h:358:38: error: call to '__compiletime_assert_235' declared with attribute error: BUILD_BUG failed
     _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
                                         ^
   include/linux/compiler.h:338:4: note: in definition of macro '__compiletime_assert'
       prefix ## suffix();    \
       ^~~~~~
   include/linux/compiler.h:358:2: note: in expansion of macro '_compiletime_assert'
     _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
     ^~~~~~~~~~~~~~~~~~~
   include/linux/build_bug.h:45:37: note: in expansion of macro 'compiletime_assert'
    #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
                                        ^~~~~~~~~~~~~~~~~~
   include/linux/build_bug.h:79:21: note: in expansion of macro 'BUILD_BUG_ON_MSG'
    #define BUILD_BUG() BUILD_BUG_ON_MSG(1, "BUILD_BUG failed")
                        ^~~~~~~~~~~~~~~~
   arch/riscv/include/asm/cmpxchg.h:343:3: note: in expansion of macro 'BUILD_BUG'
      BUILD_BUG();      \
      ^~~~~~~~~
   arch/riscv/include/asm/cmpxchg.h:352:23: note: in expansion of macro '__cmpxchg'
     (__typeof__(*(ptr))) __cmpxchg((ptr),    \
                          ^~~~~~~~~
   drivers/spi/spi-bcm2835.c:235:6: note: in expansion of macro 'cmpxchg'
     if (cmpxchg(&bs->dma_pending, true, false)) {
         ^~~~~~~

vim +/__compiletime_assert_619 +358 include/linux/compiler.h

9a8ab1c3 Daniel Santos 2013-02-21  344  
9a8ab1c3 Daniel Santos 2013-02-21  345  #define _compiletime_assert(condition, msg, prefix, suffix) \
9a8ab1c3 Daniel Santos 2013-02-21  346  	__compiletime_assert(condition, msg, prefix, suffix)
9a8ab1c3 Daniel Santos 2013-02-21  347  
9a8ab1c3 Daniel Santos 2013-02-21  348  /**
9a8ab1c3 Daniel Santos 2013-02-21  349   * compiletime_assert - break build and emit msg if condition is false
9a8ab1c3 Daniel Santos 2013-02-21  350   * @condition: a compile-time constant condition to check
9a8ab1c3 Daniel Santos 2013-02-21  351   * @msg:       a message to emit if condition is false
9a8ab1c3 Daniel Santos 2013-02-21  352   *
9a8ab1c3 Daniel Santos 2013-02-21  353   * In tradition of POSIX assert, this macro will break the build if the
9a8ab1c3 Daniel Santos 2013-02-21  354   * supplied condition is *false*, emitting the supplied error message if the
9a8ab1c3 Daniel Santos 2013-02-21  355   * compiler has support to do so.
9a8ab1c3 Daniel Santos 2013-02-21  356   */
9a8ab1c3 Daniel Santos 2013-02-21  357  #define compiletime_assert(condition, msg) \
9a8ab1c3 Daniel Santos 2013-02-21 @358  	_compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
9a8ab1c3 Daniel Santos 2013-02-21  359  

:::::: The code at line 358 was first introduced by commit
:::::: 9a8ab1c39970a4938a72d94e6fd13be88a797590 bug.h, compiler.h: introduce compiletime_assert & BUILD_BUG_ON_MSG

:::::: TO: Daniel Santos <daniel.santos@xxxxxxxxx>
:::::: CC: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux