Skip to content

Commit 3381586

Browse files
committed
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 <[email protected]> Reviewed-by: Alison Schofield <[email protected]> Tested-by: Alison Schofield <[email protected]> Link: https://lore.kernel.org/linux-cxl/167771196186.3285982.18283746206612049722.stgit@djiang5-mobl3.local/ Signed-off-by: Dave Jiang <[email protected]>
1 parent e67572c commit 3381586

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

drivers/cxl/cxl.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
#include <linux/node.h>
1313
#include <linux/io.h>
1414

15+
extern const struct nvdimm_security_ops *cxl_security_ops;
16+
1517
/**
1618
* DOC: cxl objects
1719
*

drivers/cxl/pmem.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111
#include "cxlmem.h"
1212
#include "cxl.h"
1313

14-
extern const struct nvdimm_security_ops *cxl_security_ops;
15-
1614
static __read_mostly DECLARE_BITMAP(exclusive_cmds, CXL_MEM_COMMAND_ID_MAX);
1715

1816
static void clear_exclusive(void *mds)

0 commit comments

Comments
 (0)