mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] platform/x86/toshiba_acpi.c: fix defined but not used build warnings
@ 2018-07-07  3:53 Randy Dunlap
  2018-07-09 21:25 ` Darren Hart
  0 siblings, 1 reply; 2+ messages in thread
From: Randy Dunlap @ 2018-07-07  3:53 UTC (permalink / raw)
  To: Platform Driver, Darren Hart, Andy Shevchenko; +Cc: LKML, Azael Avalos

From: Randy Dunlap <rdunlap@infradead.org>

Fix a build warning in toshiba_acpi.c when CONFIG_PROC_FS is not enabled
by marking the unused function as __maybe_unused.

../drivers/platform/x86/toshiba_acpi.c:1685:12: warning: 'version_proc_show' defined but not used [-Wunused-function]

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Azael Avalos <coproscefalo@gmail.com>
Cc: platform-driver-x86@vger.kernel.org
Cc: Darren Hart <dvhart@infradead.org>
Cc: Andy Shevchenko <andy@infradead.org>
---
 drivers/platform/x86/toshiba_acpi.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- linux-next-20180706.orig/drivers/platform/x86/toshiba_acpi.c
+++ linux-next-20180706/drivers/platform/x86/toshiba_acpi.c
@@ -34,6 +34,7 @@
 #define TOSHIBA_ACPI_VERSION	"0.24"
 #define PROC_INTERFACE_VERSION	1
 
+#include <linux/compiler.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/moduleparam.h>
@@ -1682,7 +1683,7 @@ static const struct file_operations keys
 	.write		= keys_proc_write,
 };
 
-static int version_proc_show(struct seq_file *m, void *v)
+static int __maybe_unused version_proc_show(struct seq_file *m, void *v)
 {
 	seq_printf(m, "driver:                  %s\n", TOSHIBA_ACPI_VERSION);
 	seq_printf(m, "proc_interface:          %d\n", PROC_INTERFACE_VERSION);



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

* Re: [PATCH] platform/x86/toshiba_acpi.c: fix defined but not used build warnings
  2018-07-07  3:53 [PATCH] platform/x86/toshiba_acpi.c: fix defined but not used build warnings Randy Dunlap
@ 2018-07-09 21:25 ` Darren Hart
  0 siblings, 0 replies; 2+ messages in thread
From: Darren Hart @ 2018-07-09 21:25 UTC (permalink / raw)
  To: Randy Dunlap; +Cc: Platform Driver, Andy Shevchenko, LKML, Azael Avalos

On Fri, Jul 06, 2018 at 08:53:09PM -0700, Randy Dunlap wrote:
> From: Randy Dunlap <rdunlap@infradead.org>
> 
> Fix a build warning in toshiba_acpi.c when CONFIG_PROC_FS is not enabled
> by marking the unused function as __maybe_unused.
> 
> ../drivers/platform/x86/toshiba_acpi.c:1685:12: warning: 'version_proc_show' defined but not used [-Wunused-function]
> 
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Cc: Azael Avalos <coproscefalo@gmail.com>
> Cc: platform-driver-x86@vger.kernel.org
> Cc: Darren Hart <dvhart@infradead.org>
> Cc: Andy Shevchenko <andy@infradead.org>

Thanks Randy, queued.

-- 
Darren Hart
VMware Open Source Technology Center

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

end of thread, other threads:[~2018-07-09 21:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-07  3:53 [PATCH] platform/x86/toshiba_acpi.c: fix defined but not used build warnings Randy Dunlap
2018-07-09 21:25 ` Darren Hart

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®