Linux CXL
 help / color / mirror / Atom feed
* [PATCH] tools/testing/cxl: Use DEFINE_STATIC_SRCU()
@ 2023-05-12 21:31 Dan Williams
  2023-05-12 21:51 ` Dave Jiang
  2023-05-15  9:37 ` Jonathan Cameron
  0 siblings, 2 replies; 3+ messages in thread
From: Dan Williams @ 2023-05-12 21:31 UTC (permalink / raw)
  To: linux-cxl; +Cc: vishal.l.verma, dave.jiang, ira.weiny, alison.schofield

Starting with commit:

95433f726301 ("srcu: Begin offloading srcu_struct fields to srcu_update")

...it is no longer possible to do:

static DEFINE_SRCU(x)

Switch to DEFINE_STATIC_SRCU(x) to fix:

tools/testing/cxl/test/mock.c:22:1: error: duplicate ‘static’
   22 | static DEFINE_SRCU(cxl_mock_srcu);
      | ^~~~~~

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
---
 tools/testing/cxl/test/mock.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/cxl/test/mock.c b/tools/testing/cxl/test/mock.c
index c4e53f22e421..de3933a776fd 100644
--- a/tools/testing/cxl/test/mock.c
+++ b/tools/testing/cxl/test/mock.c
@@ -19,7 +19,7 @@ void register_cxl_mock_ops(struct cxl_mock_ops *ops)
 }
 EXPORT_SYMBOL_GPL(register_cxl_mock_ops);
 
-static DEFINE_SRCU(cxl_mock_srcu);
+DEFINE_STATIC_SRCU(cxl_mock_srcu);
 
 void unregister_cxl_mock_ops(struct cxl_mock_ops *ops)
 {


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

* Re: [PATCH] tools/testing/cxl: Use DEFINE_STATIC_SRCU()
  2023-05-12 21:31 [PATCH] tools/testing/cxl: Use DEFINE_STATIC_SRCU() Dan Williams
@ 2023-05-12 21:51 ` Dave Jiang
  2023-05-15  9:37 ` Jonathan Cameron
  1 sibling, 0 replies; 3+ messages in thread
From: Dave Jiang @ 2023-05-12 21:51 UTC (permalink / raw)
  To: Dan Williams, linux-cxl; +Cc: vishal.l.verma, ira.weiny, alison.schofield



On 5/12/23 2:31 PM, Dan Williams wrote:
> Starting with commit:
> 
> 95433f726301 ("srcu: Begin offloading srcu_struct fields to srcu_update")
> 
> ...it is no longer possible to do:
> 
> static DEFINE_SRCU(x)
> 
> Switch to DEFINE_STATIC_SRCU(x) to fix:
> 
> tools/testing/cxl/test/mock.c:22:1: error: duplicate ‘static’
>     22 | static DEFINE_SRCU(cxl_mock_srcu);
>        | ^~~~~~
> 
> Signed-off-by: Dan Williams <dan.j.williams@intel.com>

Reviewed-by: Dave Jiang <dave.jiang@intel.com>

> ---
>   tools/testing/cxl/test/mock.c |    2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/testing/cxl/test/mock.c b/tools/testing/cxl/test/mock.c
> index c4e53f22e421..de3933a776fd 100644
> --- a/tools/testing/cxl/test/mock.c
> +++ b/tools/testing/cxl/test/mock.c
> @@ -19,7 +19,7 @@ void register_cxl_mock_ops(struct cxl_mock_ops *ops)
>   }
>   EXPORT_SYMBOL_GPL(register_cxl_mock_ops);
>   
> -static DEFINE_SRCU(cxl_mock_srcu);
> +DEFINE_STATIC_SRCU(cxl_mock_srcu);
>   
>   void unregister_cxl_mock_ops(struct cxl_mock_ops *ops)
>   {
> 

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

* Re: [PATCH] tools/testing/cxl: Use DEFINE_STATIC_SRCU()
  2023-05-12 21:31 [PATCH] tools/testing/cxl: Use DEFINE_STATIC_SRCU() Dan Williams
  2023-05-12 21:51 ` Dave Jiang
@ 2023-05-15  9:37 ` Jonathan Cameron
  1 sibling, 0 replies; 3+ messages in thread
From: Jonathan Cameron @ 2023-05-15  9:37 UTC (permalink / raw)
  To: Dan Williams
  Cc: linux-cxl, vishal.l.verma, dave.jiang, ira.weiny,
	alison.schofield

On Fri, 12 May 2023 14:31:35 -0700
Dan Williams <dan.j.williams@intel.com> wrote:

> Starting with commit:
> 
> 95433f726301 ("srcu: Begin offloading srcu_struct fields to srcu_update")
> 
> ...it is no longer possible to do:
> 
> static DEFINE_SRCU(x)
> 
> Switch to DEFINE_STATIC_SRCU(x) to fix:
> 
> tools/testing/cxl/test/mock.c:22:1: error: duplicate ‘static’
>    22 | static DEFINE_SRCU(cxl_mock_srcu);
>       | ^~~~~~
> 
> Signed-off-by: Dan Williams <dan.j.williams@intel.com>

Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

I guess this got missed because of hiding kernel code in tools :)
(not that I want to restart that 'discussion / argument')

Jonathan


> ---
>  tools/testing/cxl/test/mock.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/testing/cxl/test/mock.c b/tools/testing/cxl/test/mock.c
> index c4e53f22e421..de3933a776fd 100644
> --- a/tools/testing/cxl/test/mock.c
> +++ b/tools/testing/cxl/test/mock.c
> @@ -19,7 +19,7 @@ void register_cxl_mock_ops(struct cxl_mock_ops *ops)
>  }
>  EXPORT_SYMBOL_GPL(register_cxl_mock_ops);
>  
> -static DEFINE_SRCU(cxl_mock_srcu);
> +DEFINE_STATIC_SRCU(cxl_mock_srcu);
>  
>  void unregister_cxl_mock_ops(struct cxl_mock_ops *ops)
>  {
> 


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

end of thread, other threads:[~2023-05-15  9:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-12 21:31 [PATCH] tools/testing/cxl: Use DEFINE_STATIC_SRCU() Dan Williams
2023-05-12 21:51 ` Dave Jiang
2023-05-15  9:37 ` Jonathan Cameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox