[mingo-tip:sched/headers 1684/2384] arch/mips/kernel/rtlx.c:345:46: error: unknown type name 'poll_table'

From: kernel test robot
Date: Sat Jan 15 2022 - 11:04:25 EST


tree: git://git.kernel.org/pub/scm/linux/kernel/git/mingo/tip.git sched/headers
head: 4c707c1c0de83967079b4e385012fa5b00e2cd11
commit: 4e8d31a2893e3ef566a2e9860e746519711a0ed3 [1684/2384] headers/deps: tracing: Optimize <linux/ring_buffer.h>'s header dependencies, remove <linux/poll.h>
config: mips-maltaaprp_defconfig (https://download.01.org/0day-ci/archive/20220115/202201152345.4hznmFMe-lkp@xxxxxxxxx/config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 650fc40b6d8d9a5869b4fca525d5f237b0ee2803)
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
# install mips cross compiling tool for clang build
# apt-get install binutils-mips-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/mingo/tip.git/commit/?id=4e8d31a2893e3ef566a2e9860e746519711a0ed3
git remote add mingo-tip git://git.kernel.org/pub/scm/linux/kernel/git/mingo/tip.git
git fetch --no-tags mingo-tip sched/headers
git checkout 4e8d31a2893e3ef566a2e9860e746519711a0ed3
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=mips SHELL=/bin/bash

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 arch/mips/kernel/rtlx.c:14:
In file included from include/linux/fs_api.h:2:
In file included from include/linux/fs.h:6:
include/linux/wait_bit.h:35:19: error: expected ';' after top level declarator
extern void __init wait_bit_init(void);
^
;
>> arch/mips/kernel/rtlx.c:345:46: error: unknown type name 'poll_table'
static __poll_t file_poll(struct file *file, poll_table *wait)
^
>> arch/mips/kernel/rtlx.c:350:2: error: implicit declaration of function 'poll_wait' [-Werror,-Wimplicit-function-declaration]
poll_wait(file, &channel_wqs[minor].rt_queue, wait);
^
>> arch/mips/kernel/rtlx.c:358:11: error: use of undeclared identifier 'EPOLLIN'
mask |= EPOLLIN | EPOLLRDNORM;
^
>> arch/mips/kernel/rtlx.c:358:21: error: use of undeclared identifier 'EPOLLRDNORM'
mask |= EPOLLIN | EPOLLRDNORM;
^
>> arch/mips/kernel/rtlx.c:362:11: error: use of undeclared identifier 'EPOLLOUT'
mask |= EPOLLOUT | EPOLLWRNORM;
^
>> arch/mips/kernel/rtlx.c:362:22: error: use of undeclared identifier 'EPOLLWRNORM'
mask |= EPOLLOUT | EPOLLWRNORM;
^
7 errors generated.


vim +/poll_table +345 arch/mips/kernel/rtlx.c

2600990e640e3b Ralf Baechle 2006-04-05 344
8b9aab09aaf390 Al Viro 2017-07-02 @345 static __poll_t file_poll(struct file *file, poll_table *wait)
2600990e640e3b Ralf Baechle 2006-04-05 346 {
496ad9aa8ef448 Al Viro 2013-01-23 347 int minor = iminor(file_inode(file));
8b9aab09aaf390 Al Viro 2017-07-02 348 __poll_t mask = 0;
2600990e640e3b Ralf Baechle 2006-04-05 349
2600990e640e3b Ralf Baechle 2006-04-05 @350 poll_wait(file, &channel_wqs[minor].rt_queue, wait);
2600990e640e3b Ralf Baechle 2006-04-05 351 poll_wait(file, &channel_wqs[minor].lx_queue, wait);
2600990e640e3b Ralf Baechle 2006-04-05 352
2600990e640e3b Ralf Baechle 2006-04-05 353 if (rtlx == NULL)
2600990e640e3b Ralf Baechle 2006-04-05 354 return 0;
2600990e640e3b Ralf Baechle 2006-04-05 355
2600990e640e3b Ralf Baechle 2006-04-05 356 /* data available to read? */
2600990e640e3b Ralf Baechle 2006-04-05 357 if (rtlx_read_poll(minor, 0))
a9a08845e9acbd Linus Torvalds 2018-02-11 @358 mask |= EPOLLIN | EPOLLRDNORM;
2600990e640e3b Ralf Baechle 2006-04-05 359
2600990e640e3b Ralf Baechle 2006-04-05 360 /* space to write */
2600990e640e3b Ralf Baechle 2006-04-05 361 if (rtlx_write_poll(minor))
a9a08845e9acbd Linus Torvalds 2018-02-11 @362 mask |= EPOLLOUT | EPOLLWRNORM;
2600990e640e3b Ralf Baechle 2006-04-05 363
2600990e640e3b Ralf Baechle 2006-04-05 364 return mask;
2600990e640e3b Ralf Baechle 2006-04-05 365 }
2600990e640e3b Ralf Baechle 2006-04-05 366

:::::: The code at line 345 was first introduced by commit
:::::: 8b9aab09aaf390b868359b9365b667cf6506473c mips: annotate ->poll() instances

:::::: TO: Al Viro <viro@xxxxxxxxxxxxxxxxxx>
:::::: CC: Al Viro <viro@xxxxxxxxxxxxxxxxxx>

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