From: Dave Jiang Date: Mon, 22 Apr 2024 17:06:15 +0000 (-0700) Subject: cxl: Fix compile warning for cxl_security_ops extern X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=3381586a40b93d04cf311ba6ccc9858bee5d2fa2;p=linux.git 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 --- diff --git a/drivers/cxl/cxl.h b/drivers/cxl/cxl.h index 036d17db68e00..2a09db5f72eed 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 7cb8994f88097..2ecdaee630215 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)