linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] x86/apm: Fix a unused function warning
@ 2018-09-17  6:01 zhong jiang
  2018-09-17  9:24 ` Thomas Gleixner
  0 siblings, 1 reply; 3+ messages in thread
From: zhong jiang @ 2018-09-17  6:01 UTC (permalink / raw)
  To: tglx, mingo, jikos; +Cc: hpa, x86, rafael.j.wysocki, linux-kernel

Fix the following compile warning:

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)

Signed-off-by: zhong jiang <zhongjiang@huawei.com>
---
 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 ec00d1f..f7151cd 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)
 {
-- 
1.7.12.4


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

* Re: [PATCH] x86/apm: Fix a unused function warning
  2018-09-17  6:01 [PATCH] x86/apm: Fix a unused function warning zhong jiang
@ 2018-09-17  9:24 ` Thomas Gleixner
  2018-09-17  9:39   ` zhong jiang
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas Gleixner @ 2018-09-17  9:24 UTC (permalink / raw)
  To: zhong jiang; +Cc: mingo, jikos, hpa, x86, rafael.j.wysocki, linux-kernel

On Mon, 17 Sep 2018, zhong jiang wrote:

> Fix the following compile warning:
> 
> 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)

Thanks for taking care, but it's already fixed the same way with:

 002b87d2aace ("x86/APM: Fix build warning when PROC_FS is not enabled")

Thanks,

	tglx

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

* Re: [PATCH] x86/apm: Fix a unused function warning
  2018-09-17  9:24 ` Thomas Gleixner
@ 2018-09-17  9:39   ` zhong jiang
  0 siblings, 0 replies; 3+ messages in thread
From: zhong jiang @ 2018-09-17  9:39 UTC (permalink / raw)
  To: Thomas Gleixner; +Cc: mingo, jikos, hpa, x86, rafael.j.wysocki, linux-kernel

On 2018/9/17 17:24, Thomas Gleixner wrote:
> On Mon, 17 Sep 2018, zhong jiang wrote:
>
>> Fix the following compile warning:
>>
>> 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)
> Thanks for taking care, but it's already fixed the same way with:
>
>  002b87d2aace ("x86/APM: Fix build warning when PROC_FS is not enabled")
Fine.  Thanks for let me know that.  I has missed that.

Thanks,
zhong jiang
> Thanks,
>
> 	tglx
>
> .
>



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

end of thread, other threads:[~2018-09-17  9:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-17  6:01 [PATCH] x86/apm: Fix a unused function warning zhong jiang
2018-09-17  9:24 ` Thomas Gleixner
2018-09-17  9:39   ` zhong jiang

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