From: Chen Zhou <chenzhou10@huawei.com>
To: <rajneesh.bhardwaj@intel.com>, <vishwanath.somayaji@intel.com>
Cc: <dvhart@infradead.org>, <andy@infradead.org>,
<platform-driver-x86@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, <chenzhou10@huawei.com>
Subject: [PATCH -next] platform/x86: intel_pmc_core: fix build error without CONFIG_DEBUG_FS
Date: Thu, 20 Feb 2020 11:33:35 +0800 [thread overview]
Message-ID: <20200220033335.106963-1-chenzhou10@huawei.com> (raw)
If CONFIG_DEBUG_FS is n, build fails:
drivers/platform/x86/intel_pmc_core.c: In function pmc_core_resume:
drivers/platform/x86/intel_pmc_core.c:1327:3: error: implicit declaration of function pmc_core_slps0_display; did you mean pmc_core_is_pc10_failed? [-Werror=implicit-function-declaration]
pmc_core_slps0_display(pmcdev, dev, NULL);
^~~~~~~~~~~~~~~~~~~~~~
Function pmc_core_slps0_display() is responsible for displaying debug
registers, which is under CONFIG_DEBUG_FS.
Providing the static inline stub whenever CONFIG_DEBUG_FS is disabled
to fix this. Function pmc_core_lpm_display() is the same.
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Chen Zhou <chenzhou10@huawei.com>
---
drivers/platform/x86/intel_pmc_core.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/drivers/platform/x86/intel_pmc_core.c b/drivers/platform/x86/intel_pmc_core.c
index f4a36fb..939f8e0 100644
--- a/drivers/platform/x86/intel_pmc_core.c
+++ b/drivers/platform/x86/intel_pmc_core.c
@@ -1117,6 +1117,20 @@ static void pmc_core_dbgfs_register(struct pmc_dev *pmcdev)
}
}
#else
+static inline void pmc_core_slps0_display(struct pmc_dev *pmcdev,
+ struct device *dev,
+ struct seq_file *s)
+{
+}
+
+static inline void pmc_core_lpm_display(struct pmc_dev *pmcdev,
+ struct device *dev,
+ struct seq_file *s, u32 offset,
+ const char *str,
+ const struct pmc_bit_map **maps)
+{
+}
+
static inline void pmc_core_dbgfs_register(struct pmc_dev *pmcdev)
{
}
--
2.7.4
next reply other threads:[~2020-02-20 3:40 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-20 3:33 Chen Zhou [this message]
2020-02-25 10:13 ` [PATCH -next] platform/x86: intel_pmc_core: fix build error without CONFIG_DEBUG_FS Andy Shevchenko
2020-02-25 17:10 ` Kammela, Gayatri
2020-02-26 1:56 ` Kammela, Gayatri
2020-02-26 8:33 ` Andy Shevchenko
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=20200220033335.106963-1-chenzhou10@huawei.com \
--to=chenzhou10@huawei.com \
--cc=andy@infradead.org \
--cc=dvhart@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=platform-driver-x86@vger.kernel.org \
--cc=rajneesh.bhardwaj@intel.com \
--cc=vishwanath.somayaji@intel.com \
/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