All of lore.kernel.org
 help / color / mirror / Atom feed
* Clang warning in kernel/rcu/tasks.h
@ 2020-03-10 20:49 Nathan Chancellor
  2020-03-10 21:56 ` Paul E. McKenney
  0 siblings, 1 reply; 2+ messages in thread
From: Nathan Chancellor @ 2020-03-10 20:49 UTC (permalink / raw)
  To: Paul E. McKenney; +Cc: rcu, clang-built-linux

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Clang warning in kernel/rcu/tasks.h
  2020-03-10 20:49 Clang warning in kernel/rcu/tasks.h Nathan Chancellor
@ 2020-03-10 21:56 ` Paul E. McKenney
  0 siblings, 0 replies; 2+ messages in thread
From: Paul E. McKenney @ 2020-03-10 21:56 UTC (permalink / raw)
  To: Nathan Chancellor; +Cc: rcu, clang-built-linux

On Tue, Mar 10, 2020 at 01:49:41PM -0700, Nathan Chancellor wrote:
> 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?

Will do, good catch, thank you!

							Thanx, Paul

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-03-10 21:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-10 20:49 Clang warning in kernel/rcu/tasks.h Nathan Chancellor
2020-03-10 21:56 ` Paul E. McKenney

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.