From 3381586a40b93d04cf311ba6ccc9858bee5d2fa2 Mon Sep 17 00:00:00 2001 From: Dave Jiang Date: Mon, 22 Apr 2024 10:06:15 -0700 Subject: cxl: Fix compile warning for cxl_security_ops extern Jonathan reported he has observed compiler warning when using running with W=1 C=1 for cxl_security_ops that is declared as an extern in cxl/pmem.c. Move to cxl.h to make it visible to all cxl sources. Suggested-by: Jonathan Cameron Reviewed-by: Alison Schofield Tested-by: Alison Schofield Link: https://lore.kernel.org/linux-cxl/167771196186.3285982.18283746206612049722.stgit@djiang5-mobl3.local/ Signed-off-by: Dave Jiang --- drivers/cxl/cxl.h | 2 ++ drivers/cxl/pmem.c | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/cxl') diff --git a/drivers/cxl/cxl.h b/drivers/cxl/cxl.h index 036d17db68e0..2a09db5f72ee 100644 --- a/drivers/cxl/cxl.h +++ b/drivers/cxl/cxl.h @@ -12,6 +12,8 @@ #include #include +extern const struct nvdimm_security_ops *cxl_security_ops; + /** * DOC: cxl objects * diff --git a/drivers/cxl/pmem.c b/drivers/cxl/pmem.c index 7cb8994f8809..2ecdaee63021 100644 --- a/drivers/cxl/pmem.c +++ b/drivers/cxl/pmem.c @@ -11,8 +11,6 @@ #include "cxlmem.h" #include "cxl.h" -extern const struct nvdimm_security_ops *cxl_security_ops; - static __read_mostly DECLARE_BITMAP(exclusive_cmds, CXL_MEM_COMMAND_ID_MAX); static void clear_exclusive(void *mds) -- cgit v1.2.3