[ammarfaizi2-block:mellanox/linux/queue-next 106/133] include/linux/rcupdate.h:390:9: error: dereferencing pointer to incomplete type 'struct mlx5e_selq_params'

From: kernel test robot
Date: Mon Jan 24 2022 - 03:16:13 EST


tree: https://github.com/ammarfaizi2/linux-block mellanox/linux/queue-next
head: 32b13b2dd056afa99be1f0904e767d4fc980d6e2
commit: 96e88d9f06884769fac7248d445d5c031da26484 [106/133] net/mlx5e: Use select queue parameters to sync with control flow
config: i386-randconfig-a005-20220124 (https://download.01.org/0day-ci/archive/20220124/202201241612.OX49g5Am-lkp@xxxxxxxxx/config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://github.com/ammarfaizi2/linux-block/commit/96e88d9f06884769fac7248d445d5c031da26484
git remote add ammarfaizi2-block https://github.com/ammarfaizi2/linux-block
git fetch --no-tags ammarfaizi2-block mellanox/linux/queue-next
git checkout 96e88d9f06884769fac7248d445d5c031da26484
# save the config file to linux build tree
mkdir build_dir
make W=1 O=build_dir ARCH=i386 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 include/linux/rculist.h:11,
from include/linux/dcache.h:8,
from include/linux/fs.h:8,
from include/linux/highmem.h:5,
from drivers/net/ethernet/mellanox/mlx5/core/main.c:33:
drivers/net/ethernet/mellanox/mlx5/core/en/selq.h: In function 'mlx5e_selq_get_params':
>> include/linux/rcupdate.h:390:9: error: dereferencing pointer to incomplete type 'struct mlx5e_selq_params'
390 | typeof(*p) *________p1 = (typeof(*p) *__force)READ_ONCE(p); \
| ^
include/linux/rcupdate.h:544:2: note: in expansion of macro '__rcu_dereference_check'
544 | __rcu_dereference_check((p), (c) || rcu_read_lock_bh_held(), __rcu)
| ^~~~~~~~~~~~~~~~~~~~~~~
include/linux/rcupdate.h:605:31: note: in expansion of macro 'rcu_dereference_bh_check'
605 | #define rcu_dereference_bh(p) rcu_dereference_bh_check(p, 0)
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/mellanox/mlx5/core/en/selq.h:21:9: note: in expansion of macro 'rcu_dereference_bh'
21 | return rcu_dereference_bh(selq->active);
| ^~~~~~~~~~~~~~~~~~


vim +390 include/linux/rcupdate.h

76c8eaafe4f061 Paul E. McKenney 2021-04-21 380
ca5ecddfa8fcbd Paul E. McKenney 2010-04-28 381 #define __rcu_access_pointer(p, space) \
ca5ecddfa8fcbd Paul E. McKenney 2010-04-28 382 ({ \
7d0ae8086b8283 Paul E. McKenney 2015-03-03 383 typeof(*p) *_________p1 = (typeof(*p) *__force)READ_ONCE(p); \
423a86a610cad1 Joel Fernandes (Google 2018-12-12 384) rcu_check_sparse(p, space); \
ca5ecddfa8fcbd Paul E. McKenney 2010-04-28 385 ((typeof(*p) __force __kernel *)(_________p1)); \
ca5ecddfa8fcbd Paul E. McKenney 2010-04-28 386 })
ca5ecddfa8fcbd Paul E. McKenney 2010-04-28 387 #define __rcu_dereference_check(p, c, space) \
ca5ecddfa8fcbd Paul E. McKenney 2010-04-28 388 ({ \
ac59853c06993a Pranith Kumar 2014-11-13 389 /* Dependency order vs. p above. */ \
506458efaf153c Will Deacon 2017-10-24 @390 typeof(*p) *________p1 = (typeof(*p) *__force)READ_ONCE(p); \
f78f5b90c4ffa5 Paul E. McKenney 2015-06-18 391 RCU_LOCKDEP_WARN(!(c), "suspicious rcu_dereference_check() usage"); \
423a86a610cad1 Joel Fernandes (Google 2018-12-12 392) rcu_check_sparse(p, space); \
ac59853c06993a Pranith Kumar 2014-11-13 393 ((typeof(*p) __force __kernel *)(________p1)); \
ca5ecddfa8fcbd Paul E. McKenney 2010-04-28 394 })
ca5ecddfa8fcbd Paul E. McKenney 2010-04-28 395 #define __rcu_dereference_protected(p, c, space) \
ca5ecddfa8fcbd Paul E. McKenney 2010-04-28 396 ({ \
f78f5b90c4ffa5 Paul E. McKenney 2015-06-18 397 RCU_LOCKDEP_WARN(!(c), "suspicious rcu_dereference_protected() usage"); \
423a86a610cad1 Joel Fernandes (Google 2018-12-12 398) rcu_check_sparse(p, space); \
ca5ecddfa8fcbd Paul E. McKenney 2010-04-28 399 ((typeof(*p) __force __kernel *)(p)); \
ca5ecddfa8fcbd Paul E. McKenney 2010-04-28 400 })
995f1405610bd8 Paul E. McKenney 2016-07-01 401 #define rcu_dereference_raw(p) \
995f1405610bd8 Paul E. McKenney 2016-07-01 402 ({ \
995f1405610bd8 Paul E. McKenney 2016-07-01 403 /* Dependency order vs. p above. */ \
506458efaf153c Will Deacon 2017-10-24 404 typeof(p) ________p1 = READ_ONCE(p); \
995f1405610bd8 Paul E. McKenney 2016-07-01 405 ((typeof(*p) __force __kernel *)(________p1)); \
995f1405610bd8 Paul E. McKenney 2016-07-01 406 })
ca5ecddfa8fcbd Paul E. McKenney 2010-04-28 407

:::::: The code at line 390 was first introduced by commit
:::::: 506458efaf153c1ea480591c5602a5a3ba5a3b76 locking/barriers: Convert users of lockless_dereference() to READ_ONCE()

:::::: TO: Will Deacon <will.deacon@xxxxxxx>
:::::: CC: Ingo Molnar <mingo@xxxxxxxxxx>

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