[tip:x86/urgent] x86/APM: Fix build warning when PROC_FS is not enabled
From: tip-bot for Randy Dunlap
Date: Sat Sep 15 2018 - 04:25:38 EST
Commit-ID: 002b87d2aace62b4f3841c3aa43309d2380092be
Gitweb: https://git.kernel.org/tip/002b87d2aace62b4f3841c3aa43309d2380092be
Author: Randy Dunlap <rdunlap@xxxxxxxxxxxxx>
AuthorDate: Fri, 14 Sep 2018 15:10:29 -0700
Committer: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
CommitDate: Sat, 15 Sep 2018 10:16:25 +0200
x86/APM: Fix build warning when PROC_FS is not enabled
Fix build warning in apm_32.c when CONFIG_PROC_FS is not enabled:
../arch/x86/kernel/apm_32.c:1643:12: warning: 'proc_apm_show' defined but not used [-Wunused-function]
static int proc_apm_show(struct seq_file *m, void *v)
Fixes: 3f3942aca6da ("proc: introduce proc_create_single{,_data}")
Signed-off-by: Randy Dunlap <rdunlap@xxxxxxxxxxxxx>
Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
Reviewed-by: Christoph Hellwig <hch@xxxxxx>
Cc: Jiri Kosina <jikos@xxxxxxxxxx>
Link: https://lkml.kernel.org/r/be39ac12-44c2-4715-247f-4dcc3c525b8b@xxxxxxxxxxxxx
---
arch/x86/kernel/apm_32.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/x86/kernel/apm_32.c b/arch/x86/kernel/apm_32.c
index ec00d1ff5098..f7151cd03cb0 100644
--- a/arch/x86/kernel/apm_32.c
+++ b/arch/x86/kernel/apm_32.c
@@ -1640,6 +1640,7 @@ static int do_open(struct inode *inode, struct file *filp)
return 0;
}
+#ifdef CONFIG_PROC_FS
static int proc_apm_show(struct seq_file *m, void *v)
{
unsigned short bx;
@@ -1719,6 +1720,7 @@ static int proc_apm_show(struct seq_file *m, void *v)
units);
return 0;
}
+#endif
static int apm(void *unused)
{