Re: [linux-stable-rc:linux-4.20.y 80/146] include/linux/compiler.h:342: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]

 



Dear Greg,

please consider applying upstream commit

    29bdedfd9cf4 ("spi: bcm2835: Unbreak the build of esoteric configs")

to all stable branches to which you've applied upstream commit

    e82b0b382845 ("spi: bcm2835: Fix race on DMA termination")

to fix the build failure reported below by 0-day.  The affected stable
branches are:  4.9  4.14  4.19  4.20.  Thanks!


On Mon, Jan 07, 2019 at 11:46:04PM +0800, kbuild test robot wrote:
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.20.y
> head:   b3b71d0e3c63a729d9d98c74e0a2db10b4133d9e
> commit: 3e1dcfe60a4c32180150c925fea30a623c51521d [80/146] spi: bcm2835: Fix race on DMA termination
> config: riscv-allmodconfig (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 3e1dcfe60a4c32180150c925fea30a623c51521d
>         # 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:236: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:342: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:323:4: note: in definition of macro '__compiletime_assert'
>        prefix ## suffix();    \
>        ^~~~~~
>    include/linux/compiler.h:342: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:342:38: error: call to '__compiletime_assert_236' declared with attribute error: BUILD_BUG failed
>      _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
>                                          ^
>    include/linux/compiler.h:323:4: note: in definition of macro '__compiletime_assert'
>        prefix ## suffix();    \
>        ^~~~~~
>    include/linux/compiler.h:342: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:236:6: note: in expansion of macro 'cmpxchg'
>      if (cmpxchg(&bs->dma_pending, true, false)) {
>          ^~~~~~~
> --
>    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:236: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:342: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:323:4: note: in definition of macro '__compiletime_assert'
>        prefix ## suffix();    \
>        ^~~~~~
>    include/linux/compiler.h:342: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:342:38: error: call to '__compiletime_assert_236' declared with attribute error: BUILD_BUG failed
>      _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
>                                          ^
>    include/linux/compiler.h:323:4: note: in definition of macro '__compiletime_assert'
>        prefix ## suffix();    \
>        ^~~~~~
>    include/linux/compiler.h:342: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:236:6: note: in expansion of macro 'cmpxchg'
>      if (cmpxchg(&bs->dma_pending, true, false)) {
>          ^~~~~~~
> 
> vim +/__compiletime_assert_619 +342 include/linux/compiler.h
> 
> 9a8ab1c3 Daniel Santos 2013-02-21  328  
> 9a8ab1c3 Daniel Santos 2013-02-21  329  #define _compiletime_assert(condition, msg, prefix, suffix) \
> 9a8ab1c3 Daniel Santos 2013-02-21  330  	__compiletime_assert(condition, msg, prefix, suffix)
> 9a8ab1c3 Daniel Santos 2013-02-21  331  
> 9a8ab1c3 Daniel Santos 2013-02-21  332  /**
> 9a8ab1c3 Daniel Santos 2013-02-21  333   * compiletime_assert - break build and emit msg if condition is false
> 9a8ab1c3 Daniel Santos 2013-02-21  334   * @condition: a compile-time constant condition to check
> 9a8ab1c3 Daniel Santos 2013-02-21  335   * @msg:       a message to emit if condition is false
> 9a8ab1c3 Daniel Santos 2013-02-21  336   *
> 9a8ab1c3 Daniel Santos 2013-02-21  337   * In tradition of POSIX assert, this macro will break the build if the
> 9a8ab1c3 Daniel Santos 2013-02-21  338   * supplied condition is *false*, emitting the supplied error message if the
> 9a8ab1c3 Daniel Santos 2013-02-21  339   * compiler has support to do so.
> 9a8ab1c3 Daniel Santos 2013-02-21  340   */
> 9a8ab1c3 Daniel Santos 2013-02-21  341  #define compiletime_assert(condition, msg) \
> 9a8ab1c3 Daniel Santos 2013-02-21 @342  	_compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
> 9a8ab1c3 Daniel Santos 2013-02-21  343  
> 
> :::::: The code at line 342 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





[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