[PATCH] cxl: fix build when CONFIG_DEBUG_FS=n
Andrew Donnellan
andrew.donnellan at au1.ibm.com
Wed Feb 1 01:10:00 AEDT 2017
Stub out the debugfs functions so that the build doesn't break when
CONFIG_DEBUG_FS=n.
Reported-by: Michael Ellerman <mpe at ellerman.id.au>
Signed-off-by: Andrew Donnellan <andrew.donnellan at au1.ibm.com>
---
drivers/misc/cxl/debugfs.c | 49 ++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 49 insertions(+)
diff --git a/drivers/misc/cxl/debugfs.c b/drivers/misc/cxl/debugfs.c
index 9c06ac8fa5ac..af304ba0dc4e 100644
--- a/drivers/misc/cxl/debugfs.c
+++ b/drivers/misc/cxl/debugfs.c
@@ -13,6 +13,8 @@
#include "cxl.h"
+#ifdef CONFIG_DEBUG_FS
+
static struct dentry *cxl_debugfs;
void cxl_stop_trace(struct cxl *adapter)
@@ -151,3 +153,50 @@ void cxl_debugfs_exit(void)
{
debugfs_remove_recursive(cxl_debugfs);
}
+
+#else /* CONFIG_DEBUG_FS */
+
+void cxl_stop_trace(struct cxl *cxl)
+{
+}
+
+void cxl_debugfs_add_adapter_psl_regs(struct cxl *adapter, struct dentry *dir)
+{
+}
+
+void cxl_debugfs_add_adapter_xsl_regs(struct cxl *adapter, struct dentry *dir)
+{
+}
+
+int cxl_debugfs_adapter_add(struct cxl *adapter)
+{
+ return 0;
+}
+
+void cxl_debugfs_adapter_remove(struct cxl *adapter)
+{
+}
+
+void cxl_debugfs_add_afu_psl_regs(struct cxl_afu *afu, struct dentry *dir)
+{
+}
+
+int cxl_debugfs_afu_add(struct cxl_afu *afu)
+{
+ return 0;
+}
+
+void cxl_debugfs_afu_remove(struct cxl_afu *afu)
+{
+}
+
+int __init cxl_debugfs_init(void)
+{
+ return 0;
+}
+
+void cxl_debugfs_exit(void)
+{
+}
+
+#endif /* CONFIG_DEBUG_FS */
--
Andrew Donnellan OzLabs, ADL Canberra
andrew.donnellan at au1.ibm.com IBM Australia Limited
More information about the Linuxppc-dev
mailing list