RCU Archive on lore.kernel.org
 help / color / Atom feed
From: "Paul E. McKenney" <paulmck@kernel.org>
To: kernel test robot <lkp@intel.com>
Cc: kbuild-all@lists.01.org, Josh Triplett <josh@joshtriplett.org>,
	Steven Rostedt <rostedt@goodmis.org>,
	Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
	Lai Jiangshan <jiangshanlai@gmail.com>,
	Joel Fernandes <joel@joelfernandes.org>,
	rcu@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH linux-next] refperf: __srcu_struct_srcu_refctl_scale can be static
Date: Wed, 24 Jun 2020 11:28:39 -0700
Message-ID: <20200624182839.GI9247@paulmck-ThinkPad-P72> (raw)
In-Reply-To: <20200624174709.GA165567@6b4061f35fb6>

On Thu, Jun 25, 2020 at 01:47:09AM +0800, kernel test robot wrote:
> 
> Signed-off-by: kernel test robot <lkp@intel.com>

This gets me the following from gcc version 7.5.0:

kernel/rcu/refscale.c:162:1: error: duplicate ‘static’
 static DEFINE_STATIC_SRCU(srcu_refctl_scale);
 ^~~~~~

Is the concern the __srcu_struct_srcu_refctl_scale that is defined
as non-static?  Last I checked, non-static was required in order for
the ___srcu_struct_ptrs mechanism to correctly allocate the needed
per-CPU data.

						Thanx, Paul

> ---
>  refscale.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/kernel/rcu/refscale.c b/kernel/rcu/refscale.c
> index d9291f883b5428..4097b53867b33d 100644
> --- a/kernel/rcu/refscale.c
> +++ b/kernel/rcu/refscale.c
> @@ -159,7 +159,7 @@ static struct ref_scale_ops rcu_ops = {
>  };
>  
>  // Definitions for SRCU ref scale testing.
> -DEFINE_STATIC_SRCU(srcu_refctl_scale);
> +static DEFINE_STATIC_SRCU(srcu_refctl_scale);
>  static struct srcu_struct *srcu_ctlp = &srcu_refctl_scale;
>  
>  static void srcu_ref_scale_read_section(const int nloops)

      reply index

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <202006250116.MYIhw039%lkp@intel.com>
2020-06-24 17:47 ` kernel test robot
2020-06-24 18:28   ` Paul E. McKenney [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200624182839.GI9247@paulmck-ThinkPad-P72 \
    --to=paulmck@kernel.org \
    --cc=jiangshanlai@gmail.com \
    --cc=joel@joelfernandes.org \
    --cc=josh@joshtriplett.org \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=rcu@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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