lkml.org 
[lkml]   [2018]   [Sep]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PTCH] x86: APM: fix build warning when PROC_FS is not enabled
Date
From: Randy Dunlap <rdunlap@infradead.org>

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@infradead.org>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Jiri Kosina <jikos@kernel.org>
Cc: x86@kernel.org
---
arch/x86/kernel/apm_32.c | 2 ++
1 file changed, 2 insertions(+)

--- linux-next-20180913.orig/arch/x86/kernel/apm_32.c
+++ linux-next-20180913/arch/x86/kernel/apm_32.c
@@ -1640,6 +1640,7 @@ static int do_open(struct inode *inode,
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
units);
return 0;
}
+#endif

static int apm(void *unused)
{

\
 
 \ /
  Last update: 2018-09-15 00:10    [W:0.046 / U:1.108 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site