The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Christophe Leroy <christophe.leroy@csgroup.eu>
To: kernel test robot <lkp@intel.com>, linux-btrfs@vger.kernel.org
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
	Michael Ellerman <mpe@ellerman.id.au>
Subject: Re: include/linux/compiler_types.h:326:38: error: call to '__compiletime_assert_791' declared with attribute error: BUILD_BUG_ON failed: (BTRFS_MAX_COMPRESSED % PAGE_SIZE) != 0
Date: Wed, 9 Jun 2021 16:01:20 +0200	[thread overview]
Message-ID: <6cc4b52b-48cd-45e2-67b5-289c4962fedb@csgroup.eu> (raw)
In-Reply-To: <202106092159.05DloM1z-lkp@intel.com>

Le 09/06/2021 à 15:55, kernel test robot a écrit :
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head:   368094df48e680fa51cedb68537408cfa64b788e
> commit: 4eeef098b43242ed145c83fba9989d586d707589 powerpc/44x: Remove STDBINUTILS kconfig option
> date:   4 months ago
> config: powerpc-randconfig-r012-20210609 (attached as .config)
> compiler: powerpc-linux-gcc (GCC) 9.3.0

That's a BTRFS issue, and not directly linked to the above mentioned commit. Before that commit the 
problem was already present.

Problem is that with 256k PAGE_SIZE, following BUILD_BUG() pops up:

BUILD_BUG_ON((BTRFS_MAX_COMPRESSED % PAGE_SIZE) != 0)


> reproduce (this is a W=1 build):
>          wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
>          chmod +x ~/bin/make.cross
>          # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=4eeef098b43242ed145c83fba9989d586d707589
>          git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
>          git fetch --no-tags linus master
>          git checkout 4eeef098b43242ed145c83fba9989d586d707589
>          # save the attached .config to linux build tree
>          COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=powerpc
> 
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
> 
> All error/warnings (new ones prefixed by >>):
> 
>     fs/buffer.c: In function 'block_read_full_page':
>>> fs/buffer.c:2342:1: warning: the frame size of 2048 bytes is larger than 1024 bytes [-Wframe-larger-than=]
>      2342 | }
>           | ^
> --
>     fs/ext4/move_extent.c: In function 'mext_page_mkuptodate':
>>> fs/ext4/move_extent.c:227:1: warning: the frame size of 2056 bytes is larger than 1024 bytes [-Wframe-larger-than=]
>       227 | }
>           | ^
> --
>     fs/fat/dir.c: In function 'fat_add_new_entries':
>>> fs/fat/dir.c:1279:1: warning: the frame size of 2088 bytes is larger than 1024 bytes [-Wframe-larger-than=]
>      1279 | }
>           | ^
>     fs/fat/dir.c: In function 'fat_alloc_new_dir':
>     fs/fat/dir.c:1195:1: warning: the frame size of 2064 bytes is larger than 1024 bytes [-Wframe-larger-than=]
>      1195 | }
>           | ^
> --
>     fs/fat/fatent.c: In function 'fat_free_clusters':
>>> fs/fat/fatent.c:632:1: warning: the frame size of 2080 bytes is larger than 1024 bytes [-Wframe-larger-than=]
>       632 | }
>           | ^
>     fs/fat/fatent.c: In function 'fat_alloc_clusters':
>     fs/fat/fatent.c:550:1: warning: the frame size of 2112 bytes is larger than 1024 bytes [-Wframe-larger-than=]
>       550 | }
>           | ^
> --
>     fs/exfat/fatent.c: In function 'exfat_zeroed_cluster':
>>> fs/exfat/fatent.c:277:1: warning: the frame size of 2048 bytes is larger than 1024 bytes [-Wframe-larger-than=]
>       277 | }
>           | ^
> --
>     In file included from <command-line>:
>     fs/btrfs/inode.c: In function 'compress_file_range':
>>> include/linux/compiler_types.h:326:38: error: call to '__compiletime_assert_791' declared with attribute error: BUILD_BUG_ON failed: (BTRFS_MAX_COMPRESSED % PAGE_SIZE) != 0
>       326 |  _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
>           |                                      ^
>     include/linux/compiler_types.h:307:4: note: in definition of macro '__compiletime_assert'
>       307 |    prefix ## suffix();    \
>           |    ^~~~~~
>     include/linux/compiler_types.h:326:2: note: in expansion of macro '_compiletime_assert'
>       326 |  _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
>           |  ^~~~~~~~~~~~~~~~~~~
>     include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
>        39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
>           |                                     ^~~~~~~~~~~~~~~~~~
>     include/linux/build_bug.h:50:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
>        50 |  BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
>           |  ^~~~~~~~~~~~~~~~
>     fs/btrfs/inode.c:563:2: note: in expansion of macro 'BUILD_BUG_ON'
>       563 |  BUILD_BUG_ON((BTRFS_MAX_COMPRESSED % PAGE_SIZE) != 0);
>           |  ^~~~~~~~~~~~
> 
> 
> vim +/__compiletime_assert_791 +326 include/linux/compiler_types.h
> 
> eb5c2d4b45e3d2 Will Deacon 2020-07-21  312
> eb5c2d4b45e3d2 Will Deacon 2020-07-21  313  #define _compiletime_assert(condition, msg, prefix, suffix) \
> eb5c2d4b45e3d2 Will Deacon 2020-07-21  314  	__compiletime_assert(condition, msg, prefix, suffix)
> eb5c2d4b45e3d2 Will Deacon 2020-07-21  315
> eb5c2d4b45e3d2 Will Deacon 2020-07-21  316  /**
> eb5c2d4b45e3d2 Will Deacon 2020-07-21  317   * compiletime_assert - break build and emit msg if condition is false
> eb5c2d4b45e3d2 Will Deacon 2020-07-21  318   * @condition: a compile-time constant condition to check
> eb5c2d4b45e3d2 Will Deacon 2020-07-21  319   * @msg:       a message to emit if condition is false
> eb5c2d4b45e3d2 Will Deacon 2020-07-21  320   *
> eb5c2d4b45e3d2 Will Deacon 2020-07-21  321   * In tradition of POSIX assert, this macro will break the build if the
> eb5c2d4b45e3d2 Will Deacon 2020-07-21  322   * supplied condition is *false*, emitting the supplied error message if the
> eb5c2d4b45e3d2 Will Deacon 2020-07-21  323   * compiler has support to do so.
> eb5c2d4b45e3d2 Will Deacon 2020-07-21  324   */
> eb5c2d4b45e3d2 Will Deacon 2020-07-21  325  #define compiletime_assert(condition, msg) \
> eb5c2d4b45e3d2 Will Deacon 2020-07-21 @326  	_compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
> eb5c2d4b45e3d2 Will Deacon 2020-07-21  327
> 
> :::::: The code at line 326 was first introduced by commit
> :::::: eb5c2d4b45e3d2d5d052ea6b8f1463976b1020d5 compiler.h: Move compiletime_assert() macros into compiler_types.h
> 
> :::::: TO: Will Deacon <will@kernel.org>
> :::::: CC: Will Deacon <will@kernel.org>
> 
> ---
> 0-DAY CI Kernel Test Service, Intel Corporation
> https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
> 

  reply	other threads:[~2021-06-09 14:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-09 13:55 include/linux/compiler_types.h:326:38: error: call to '__compiletime_assert_791' declared with attribute error: BUILD_BUG_ON failed: (BTRFS_MAX_COMPRESSED % PAGE_SIZE) != 0 kernel test robot
2021-06-09 14:01 ` Christophe Leroy [this message]
2021-06-09 15:22   ` David Sterba

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6cc4b52b-48cd-45e2-67b5-289c4962fedb@csgroup.eu \
    --to=christophe.leroy@csgroup.eu \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=mpe@ellerman.id.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox