[mcgrof-next:20211028-test-sysfs 4/6] fs/kernfs/kernfs-internal.h:217:43: error: statement with no effect

From: kernel test robot
Date: Fri Oct 29 2021 - 05:08:05 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux-next.git 20211028-test-sysfs
head: 6cd5d9d434e1e4c2de556f102825bf7a5dff0206
commit: 0637867b1c56c145c20b01256254456b2c30b374 [4/6] kernfs: add initial failure injection support
config: openrisc-buildonly-randconfig-r003-20211028 (attached as .config)
compiler: or1k-linux-gcc (GCC) 11.2.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/mcgrof/linux-next.git/commit/?id=0637867b1c56c145c20b01256254456b2c30b374
git remote add mcgrof-next https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux-next.git
git fetch --no-tags mcgrof-next 20211028-test-sysfs
git checkout 0637867b1c56c145c20b01256254456b2c30b374
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=openrisc

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 fs/kernfs/file.c:19:
fs/kernfs/file.c: In function 'kernfs_fop_write_iter':
>> fs/kernfs/kernfs-internal.h:217:43: error: statement with no effect [-Werror=unused-value]
217 | #define may_wait_kernfs_debug(func, when) (false)
| ^
fs/kernfs/file.c:262:9: note: in expansion of macro 'may_wait_kernfs_debug'
262 | may_wait_kernfs_debug(kernfs_fop_write_iter, at_start);
| ^~~~~~~~~~~~~~~~~~~~~
>> fs/kernfs/kernfs-internal.h:217:43: error: statement with no effect [-Werror=unused-value]
217 | #define may_wait_kernfs_debug(func, when) (false)
| ^
fs/kernfs/file.c:285:9: note: in expansion of macro 'may_wait_kernfs_debug'
285 | may_wait_kernfs_debug(kernfs_fop_write_iter, before_mutex);
| ^~~~~~~~~~~~~~~~~~~~~
>> fs/kernfs/kernfs-internal.h:217:43: error: statement with no effect [-Werror=unused-value]
217 | #define may_wait_kernfs_debug(func, when) (false)
| ^
fs/kernfs/file.c:293:9: note: in expansion of macro 'may_wait_kernfs_debug'
293 | may_wait_kernfs_debug(kernfs_fop_write_iter, after_mutex);
| ^~~~~~~~~~~~~~~~~~~~~
>> fs/kernfs/kernfs-internal.h:217:43: error: statement with no effect [-Werror=unused-value]
217 | #define may_wait_kernfs_debug(func, when) (false)
| ^
fs/kernfs/file.c:301:9: note: in expansion of macro 'may_wait_kernfs_debug'
301 | may_wait_kernfs_debug(kernfs_fop_write_iter, after_active);
| ^~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors


vim +217 fs/kernfs/kernfs-internal.h

211
212 #define may_wait_kernfs_debug(func, when) \
213 __kernfs_debug_should_wait_func_name(func)(__kernfs_config_wait_var(func, when))
214 void __kernfs_debug_should_wait_kernfs_fop_write_iter(bool evaluate);
215 #else
216 static inline void kernfs_init_failure_injection(void) {}
> 217 #define may_wait_kernfs_debug(func, when) (false)
218 #endif
219

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip