RCU Archive on lore.kernel.org
 help / color / 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, back to index

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

RCU Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/rcu/0 rcu/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 rcu rcu/ https://lore.kernel.org/rcu \
		rcu@vger.kernel.org
	public-inbox-index rcu

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.rcu


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git