linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PTCH] x86: APM: fix build warning when PROC_FS is not enabled
@ 2018-09-14 22:10 Randy Dunlap
  2018-09-15  6:54 ` Christoph Hellwig
  2018-09-15  8:21 ` [tip:x86/urgent] x86/APM: Fix " tip-bot for Randy Dunlap
  0 siblings, 2 replies; 3+ messages in thread
From: Randy Dunlap @ 2018-09-14 22:10 UTC (permalink / raw)
  To: LKML, X86 ML, Jiri Kosina; +Cc: Christoph Hellwig

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)
 {



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PTCH] x86: APM: fix build warning when PROC_FS is not enabled
  2018-09-14 22:10 [PTCH] x86: APM: fix build warning when PROC_FS is not enabled Randy Dunlap
@ 2018-09-15  6:54 ` Christoph Hellwig
  2018-09-15  8:21 ` [tip:x86/urgent] x86/APM: Fix " tip-bot for Randy Dunlap
  1 sibling, 0 replies; 3+ messages in thread
From: Christoph Hellwig @ 2018-09-15  6:54 UTC (permalink / raw)
  To: Randy Dunlap; +Cc: LKML, X86 ML, Jiri Kosina, Christoph Hellwig

Thanks, this looks good to me:

Reviewed-by: Christoph Hellwig <hch@lst.de>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [tip:x86/urgent] x86/APM: Fix build warning when PROC_FS is not enabled
  2018-09-14 22:10 [PTCH] x86: APM: fix build warning when PROC_FS is not enabled Randy Dunlap
  2018-09-15  6:54 ` Christoph Hellwig
@ 2018-09-15  8:21 ` tip-bot for Randy Dunlap
  1 sibling, 0 replies; 3+ messages in thread
From: tip-bot for Randy Dunlap @ 2018-09-15  8:21 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: jikos, linux-kernel, mingo, rdunlap, tglx, hch, hpa

Commit-ID:  002b87d2aace62b4f3841c3aa43309d2380092be
Gitweb:     https://git.kernel.org/tip/002b87d2aace62b4f3841c3aa43309d2380092be
Author:     Randy Dunlap <rdunlap@infradead.org>
AuthorDate: Fri, 14 Sep 2018 15:10:29 -0700
Committer:  Thomas Gleixner <tglx@linutronix.de>
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@infradead.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Cc: Jiri Kosina <jikos@kernel.org>
Link: https://lkml.kernel.org/r/be39ac12-44c2-4715-247f-4dcc3c525b8b@infradead.org


---
 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)
 {

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-09-15  8:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-14 22:10 [PTCH] x86: APM: fix build warning when PROC_FS is not enabled Randy Dunlap
2018-09-15  6:54 ` Christoph Hellwig
2018-09-15  8:21 ` [tip:x86/urgent] x86/APM: Fix " tip-bot for Randy Dunlap

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).