[brauner:pidfd.pidfd_get_task 2/2] mm/madvise.c:1241:22: error: unused variable 'f_flags'

From: kernel test robot
Date: Mon Sep 13 2021 - 20:45:56 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux.git pidfd.pidfd_get_task
head: fd3fd0b4eb17f0ef3605d7bfd85ef7c97b93ec61
commit: fd3fd0b4eb17f0ef3605d7bfd85ef7c97b93ec61 [2/2] mm: use pidfd_get_task()
config: nios2-allyesconfig (attached as .config)
compiler: nios2-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/brauner/linux.git/commit/?id=fd3fd0b4eb17f0ef3605d7bfd85ef7c97b93ec61
git remote add brauner https://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux.git
git fetch --no-tags brauner pidfd.pidfd_get_task
git checkout fd3fd0b4eb17f0ef3605d7bfd85ef7c97b93ec61
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=nios2

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

All errors (new ones prefixed by >>):

mm/madvise.c: In function '__do_sys_process_madvise':
>> mm/madvise.c:1241:22: error: unused variable 'f_flags' [-Werror=unused-variable]
1241 | unsigned int f_flags;
| ^~~~~~~
cc1: all warnings being treated as errors


vim +/f_flags +1241 mm/madvise.c

ecb8ac8b1f1469 Minchan Kim 2020-10-17 1230
ecb8ac8b1f1469 Minchan Kim 2020-10-17 1231 SYSCALL_DEFINE5(process_madvise, int, pidfd, const struct iovec __user *, vec,
ecb8ac8b1f1469 Minchan Kim 2020-10-17 1232 size_t, vlen, int, behavior, unsigned int, flags)
ecb8ac8b1f1469 Minchan Kim 2020-10-17 1233 {
ecb8ac8b1f1469 Minchan Kim 2020-10-17 1234 ssize_t ret;
ecb8ac8b1f1469 Minchan Kim 2020-10-17 1235 struct iovec iovstack[UIO_FASTIOV], iovec;
ecb8ac8b1f1469 Minchan Kim 2020-10-17 1236 struct iovec *iov = iovstack;
ecb8ac8b1f1469 Minchan Kim 2020-10-17 1237 struct iov_iter iter;
ecb8ac8b1f1469 Minchan Kim 2020-10-17 1238 struct task_struct *task;
ecb8ac8b1f1469 Minchan Kim 2020-10-17 1239 struct mm_struct *mm;
ecb8ac8b1f1469 Minchan Kim 2020-10-17 1240 size_t total_len;
ecb8ac8b1f1469 Minchan Kim 2020-10-17 @1241 unsigned int f_flags;

:::::: The code at line 1241 was first introduced by commit
:::::: ecb8ac8b1f146915aa6b96449b66dd48984caacc mm/madvise: introduce process_madvise() syscall: an external memory hinting API

:::::: TO: Minchan Kim <minchan@xxxxxxxxxx>
:::::: CC: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>

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

Attachment: .config.gz
Description: application/gzip