]> git.itanic.dy.fi Git - linux-stable/commitdiff
tools/testing/cxl: Use DEFINE_STATIC_SRCU()
authorDan Williams <dan.j.williams@intel.com>
Fri, 12 May 2023 21:31:35 +0000 (14:31 -0700)
committerDan Williams <dan.j.williams@intel.com>
Sat, 13 May 2023 07:16:40 +0000 (00:16 -0700)
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);
      | ^~~~~~

Reviewed-by: Dave Jiang <dave.jiang@intel.com>
Link: https://lore.kernel.org/r/168392709546.1135523.10424917245934547117.stgit@dwillia2-xfh.jf.intel.com
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
tools/testing/cxl/test/mock.c

index c4e53f22e42159735cb14254f2cb464d86b9f085..de3933a776fdb250b4afc7f135cb0d2cf1d7d0ec 100644 (file)
@@ -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)
 {