net/core/gro.c:290:9: error: implicit declaration of function 'list_for_each_entry_safe_reverse_inside'; did you mean 'list_for_each_entry_safe_reverse'?

From: kernel test robot
Date: Fri Mar 11 2022 - 06:30:27 EST


tree: https://github.com/0day-ci/linux/commits/UPDATE-20220311-151720/Xiaomeng-Tong/list_for_each_entry-make-iterator-invisiable-outside-the-loop/20220301-160113
head: 54ae283053c127aac4b946dffa0f31f9885dbb77
commit: c74b61caeb4780382f24aa0d6e0fabe81b703eac net/core: remove iterator use outside the loop
date: 4 hours ago
config: arm-buildonly-randconfig-r006-20220310 (https://download.01.org/0day-ci/archive/20220311/202203111919.3iLzhcNo-lkp@xxxxxxxxx/config)
compiler: arm-linux-gnueabi-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://github.com/0day-ci/linux/commit/c74b61caeb4780382f24aa0d6e0fabe81b703eac
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review UPDATE-20220311-151720/Xiaomeng-Tong/list_for_each_entry-make-iterator-invisiable-outside-the-loop/20220301-160113
git checkout c74b61caeb4780382f24aa0d6e0fabe81b703eac
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=arm SHELL=/bin/bash net/core/

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

All errors (new ones prefixed by >>):

net/core/gro.c: In function '__napi_gro_flush_chain':
>> net/core/gro.c:290:9: error: implicit declaration of function 'list_for_each_entry_safe_reverse_inside'; did you mean 'list_for_each_entry_safe_reverse'? [-Werror=implicit-function-declaration]
290 | list_for_each_entry_safe_reverse_inside(skb, p, struct sk_buff, head, list) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| list_for_each_entry_safe_reverse
>> net/core/gro.c:290:49: error: 'skb' undeclared (first use in this function)
290 | list_for_each_entry_safe_reverse_inside(skb, p, struct sk_buff, head, list) {
| ^~~
net/core/gro.c:290:49: note: each undeclared identifier is reported only once for each function it appears in
>> net/core/gro.c:290:54: error: 'p' undeclared (first use in this function); did you mean 'up'?
290 | list_for_each_entry_safe_reverse_inside(skb, p, struct sk_buff, head, list) {
| ^
| up
>> net/core/gro.c:290:57: error: expected expression before 'struct'
290 | list_for_each_entry_safe_reverse_inside(skb, p, struct sk_buff, head, list) {
| ^~~~~~
>> net/core/gro.c:290:84: error: expected ';' before '{' token
290 | list_for_each_entry_safe_reverse_inside(skb, p, struct sk_buff, head, list) {
| ^~
| ;
net/core/gro.c:288:27: warning: unused variable 'head' [-Wunused-variable]
288 | struct list_head *head = &napi->gro_hash[index].list;
| ^~~~
cc1: some warnings being treated as errors


vim +290 net/core/gro.c

284
285 static void __napi_gro_flush_chain(struct napi_struct *napi, u32 index,
286 bool flush_old)
287 {
288 struct list_head *head = &napi->gro_hash[index].list;
289
> 290 list_for_each_entry_safe_reverse_inside(skb, p, struct sk_buff, head, list) {
291 if (flush_old && NAPI_GRO_CB(skb)->age == jiffies)
292 return;
293 skb_list_del_init(skb);
294 napi_gro_complete(napi, skb);
295 napi->gro_hash[index].count--;
296 }
297
298 if (!napi->gro_hash[index].count)
299 __clear_bit(index, &napi->gro_bitmask);
300 }
301

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