include/linux/compiler_types.h:352:45: error: call to '__compiletime_assert_352' declared with attribute error: Please avoid flushing system_highpri_wq.

From: kernel test robot
Date: Sun May 15 2022 - 22:51:43 EST


tree: https://github.com/intel-lab-lkp/linux/commits/UPDATE-20220516-093322/Tetsuo-Handa/checkpatch-warn-about-flushing-system-wide-workqueues/20220425-073327
head: cd007363b7985a824de0ec5e05f0cb0705e59c88
commit: cd007363b7985a824de0ec5e05f0cb0705e59c88 workqueue: Wrap flush_workqueue() using a macro
date: 75 minutes ago
config: m68k-allmodconfig (https://download.01.org/0day-ci/archive/20220516/202205161020.AQoBsxLz-lkp@xxxxxxxxx/config)
compiler: m68k-linux-gcc (GCC) 11.3.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://github.com/intel-lab-lkp/linux/commit/cd007363b7985a824de0ec5e05f0cb0705e59c88
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review UPDATE-20220516-093322/Tetsuo-Handa/checkpatch-warn-about-flushing-system-wide-workqueues/20220425-073327
git checkout cd007363b7985a824de0ec5e05f0cb0705e59c88
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross W=1 O=build_dir ARCH=m68k SHELL=/bin/bash drivers/block/rnbd/ drivers/staging/wfx/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All errors (new ones prefixed by >>):

In file included from <command-line>:
drivers/staging/wfx/bh.c: In function 'wfx_bh_poll_irq':
>> include/linux/compiler_types.h:352:45: error: call to '__compiletime_assert_352' declared with attribute error: Please avoid flushing system_highpri_wq.
352 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^
include/linux/compiler_types.h:333:25: note: in definition of macro '__compiletime_assert'
333 | prefix ## suffix(); \
| ^~~~~~
include/linux/compiler_types.h:352:9: note: in expansion of macro '_compiletime_assert'
352 | _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/workqueue.h:676:9: note: in expansion of macro 'BUILD_BUG_ON_MSG'
676 | BUILD_BUG_ON_MSG(__builtin_constant_p(&(wq) == &system_highpri_wq) && \
| ^~~~~~~~~~~~~~~~
drivers/staging/wfx/bh.c:298:9: note: in expansion of macro 'flush_workqueue'
298 | flush_workqueue(system_highpri_wq);
| ^~~~~~~~~~~~~~~
--
In file included from <command-line>:
In function 'rnbd_destroy_sessions',
inlined from 'rnbd_client_exit' at drivers/block/rnbd/rnbd-clt.c:1801:2:
>> include/linux/compiler_types.h:352:45: error: call to '__compiletime_assert_319' declared with attribute error: Please avoid flushing system_long_wq.
352 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^
include/linux/compiler_types.h:333:25: note: in definition of macro '__compiletime_assert'
333 | prefix ## suffix(); \
| ^~~~~~
include/linux/compiler_types.h:352:9: note: in expansion of macro '_compiletime_assert'
352 | _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/workqueue.h:679:9: note: in expansion of macro 'BUILD_BUG_ON_MSG'
679 | BUILD_BUG_ON_MSG(__builtin_constant_p(&(wq) == &system_long_wq) && \
| ^~~~~~~~~~~~~~~~
drivers/block/rnbd/rnbd-clt.c:1769:9: note: in expansion of macro 'flush_workqueue'
1769 | flush_workqueue(system_long_wq);
| ^~~~~~~~~~~~~~~


vim +/__compiletime_assert_352 +352 include/linux/compiler_types.h

eb5c2d4b45e3d2 Will Deacon 2020-07-21 338
eb5c2d4b45e3d2 Will Deacon 2020-07-21 339 #define _compiletime_assert(condition, msg, prefix, suffix) \
eb5c2d4b45e3d2 Will Deacon 2020-07-21 340 __compiletime_assert(condition, msg, prefix, suffix)
eb5c2d4b45e3d2 Will Deacon 2020-07-21 341
eb5c2d4b45e3d2 Will Deacon 2020-07-21 342 /**
eb5c2d4b45e3d2 Will Deacon 2020-07-21 343 * compiletime_assert - break build and emit msg if condition is false
eb5c2d4b45e3d2 Will Deacon 2020-07-21 344 * @condition: a compile-time constant condition to check
eb5c2d4b45e3d2 Will Deacon 2020-07-21 345 * @msg: a message to emit if condition is false
eb5c2d4b45e3d2 Will Deacon 2020-07-21 346 *
eb5c2d4b45e3d2 Will Deacon 2020-07-21 347 * In tradition of POSIX assert, this macro will break the build if the
eb5c2d4b45e3d2 Will Deacon 2020-07-21 348 * supplied condition is *false*, emitting the supplied error message if the
eb5c2d4b45e3d2 Will Deacon 2020-07-21 349 * compiler has support to do so.
eb5c2d4b45e3d2 Will Deacon 2020-07-21 350 */
eb5c2d4b45e3d2 Will Deacon 2020-07-21 351 #define compiletime_assert(condition, msg) \
eb5c2d4b45e3d2 Will Deacon 2020-07-21 @352 _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
eb5c2d4b45e3d2 Will Deacon 2020-07-21 353

--
0-DAY CI Kernel Test Service
https://01.org/lkp