rcu.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH linux-next] refperf: __srcu_struct_srcu_refctl_scale can be static
       [not found] <202006250116.MYIhw039%lkp@intel.com>
@ 2020-06-24 17:47 ` kernel test robot
  2020-06-24 18:28   ` Paul E. McKenney
  0 siblings, 1 reply; 2+ messages in thread
From: kernel test robot @ 2020-06-24 17:47 UTC (permalink / raw)
  To: Paul E. McKenney
  Cc: kbuild-all, Josh Triplett, Steven Rostedt, Mathieu Desnoyers,
	Lai Jiangshan, Joel Fernandes, rcu, linux-kernel


Signed-off-by: kernel test robot <lkp@intel.com>
---
 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)

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

* Re: [RFC PATCH linux-next] refperf: __srcu_struct_srcu_refctl_scale can be static
  2020-06-24 17:47 ` [RFC PATCH linux-next] refperf: __srcu_struct_srcu_refctl_scale can be static kernel test robot
@ 2020-06-24 18:28   ` Paul E. McKenney
  0 siblings, 0 replies; 2+ messages in thread
From: Paul E. McKenney @ 2020-06-24 18:28 UTC (permalink / raw)
  To: kernel test robot
  Cc: kbuild-all, Josh Triplett, Steven Rostedt, Mathieu Desnoyers,
	Lai Jiangshan, Joel Fernandes, rcu, linux-kernel

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)

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

end of thread, other threads:[~2020-06-24 18:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <202006250116.MYIhw039%lkp@intel.com>
2020-06-24 17:47 ` [RFC PATCH linux-next] refperf: __srcu_struct_srcu_refctl_scale can be static kernel test robot
2020-06-24 18:28   ` Paul E. McKenney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).