Clang warning in kernel/rcu/tasks.h
Hi Paul,
It appears that the commits 37564025a3d7 ("rcu-tasks: Refactor RCU-tasks to allow variants to be added") and cbd703932774 ("rcu-tasks: Add an RCU-tasks rude variant") both add a forward declaration to rcu_tasks and the rcu_tasks_gp_func_t typedef, resulting in the following clang warning:
In file included from kernel/rcu/update.c:563:kernel/rcu/tasks.h:24:16: warning: redefinition of typedef 'rcu_tasks_gp_func_t' is a C11 feature [-Wtypedef-redefinition]
typedef void (*rcu_tasks_gp_func_t)(struct rcu_tasks *rtp);
^
kernel/rcu/tasks.h:17:16: note: previous definition is here
typedef void (*rcu_tasks_gp_func_t)(struct rcu_tasks *rtp);
^1 warning generated.
Maybe a rebase or merge gone wrong? Would you mind taking a look and fixing it up if possible?
Cheers,
Nathan
Paul E. McKenney
maintainerQuoted 15 lines · Nathan Chancellor
Hi Paul,
It appears that the commits
37564025a3d7("rcu-tasks: Refactor RCU-tasks to allow variants to be added") andcbd703932774("rcu-tasks: Add an RCU-tasks rude variant") both add a forward declaration torcu_tasksand thercu_tasks_gp_func_ttypedef, resulting in the following clang warning:In file included from
kernel/rcu/update.c:563:kernel/rcu/tasks.h:24:16: warning: redefinition of typedef 'rcu_tasks_gp_func_t' is a C11 feature [-Wtypedef-redefinition]typedef void (*rcu_tasks_gp_func_t)(struct rcu_tasks *rtp); ^ kernel/rcu/tasks.h:17:16: note: previous definition is here typedef void (*rcu_tasks_gp_func_t)(struct rcu_tasks *rtp); ^
Quoted 4 lines
1 warning generated.
Maybe a rebase or merge gone wrong? Would you mind taking a look and fixing it up if possible?
Will do, good catch, thank you!
Thanx, Paul