Message ID | 168392709546.1135523.10424917245934547117.stgit@dwillia2-xfh.jf.intel.com |
---|---|
State | Accepted |
Commit | 270205be711056534d1f86d275d4ec922fb62102 |
Headers | show |
Series | tools/testing/cxl: Use DEFINE_STATIC_SRCU() | expand |
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) > { >
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) > { >
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) {
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(-)