From: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
To: linuxppc-dev@lists.ozlabs.org
Cc: imunsie@au1.ibm.com, fbarrat@linux.vnet.ibm.com
Subject: [PATCH] cxl: fix build when CONFIG_DEBUG_FS=n
Date: Wed, 1 Feb 2017 01:10:00 +1100 [thread overview]
Message-ID: <20170131141000.24636-1-andrew.donnellan@au1.ibm.com> (raw)
Stub out the debugfs functions so that the build doesn't break when
CONFIG_DEBUG_FS=n.
Reported-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Andrew Donnellan <andrew.donnellan@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@au1.ibm.com IBM Australia Limited
next reply other threads:[~2017-01-31 14:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-31 14:10 Andrew Donnellan [this message]
2017-02-01 2:20 ` [PATCH] cxl: fix build when CONFIG_DEBUG_FS=n Michael Ellerman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170131141000.24636-1-andrew.donnellan@au1.ibm.com \
--to=andrew.donnellan@au1.ibm.com \
--cc=fbarrat@linux.vnet.ibm.com \
--cc=imunsie@au1.ibm.com \
--cc=linuxppc-dev@lists.ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).