All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86, earlyprintk: Fix two 'defined but not used' compile warnings
@ 2015-03-31 21:20 Mark Einon
  2015-03-31 21:45 ` Borislav Petkov
  2015-03-31 22:07 ` [PATCH v2] " Mark Einon
  0 siblings, 2 replies; 8+ messages in thread
From: Mark Einon @ 2015-03-31 21:20 UTC (permalink / raw)
  To: x86; +Cc: tglx, linux-kernel, mingo, hpa, stuart.r.anderson, Mark Einon

Two static functions are only used if CONFIG_PCI is defined,so only build them
if this is the case. Fixes the build warnings:

arch/x86/kernel/early_printk.c:98:13: warning: ‘mem32_serial_out’ defined but not used [-Wunused-function]
 static void mem32_serial_out(unsigned long addr, int offset, int value)
             ^
arch/x86/kernel/early_printk.c:105:21: warning: ‘mem32_serial_in’ defined but not used [-Wunused-function]
 static unsigned int mem32_serial_in(unsigned long addr, int offset)
                     ^
Signed-off-by: Mark Einon <mark.einon@gmail.com>
---
 arch/x86/kernel/early_printk.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/x86/kernel/early_printk.c b/arch/x86/kernel/early_printk.c
index f85e3fb..6a69625 100644
--- a/arch/x86/kernel/early_printk.c
+++ b/arch/x86/kernel/early_printk.c
@@ -95,6 +95,7 @@ static unsigned long early_serial_base = 0x3f8;  /* ttyS0 */
 #define DLL             0       /*  Divisor Latch Low         */
 #define DLH             1       /*  Divisor latch High        */
 
+#ifdef CONFIG_PCI
 static void mem32_serial_out(unsigned long addr, int offset, int value)
 {
 	uint32_t *vaddr = (uint32_t *)addr;
@@ -108,6 +109,7 @@ static unsigned int mem32_serial_in(unsigned long addr, int offset)
 	/* shift implied by pointer type */
 	return readl(vaddr + offset);
 }
+#endif
 
 static unsigned int io_serial_in(unsigned long addr, int offset)
 {
-- 
2.1.4


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

end of thread, other threads:[~2015-04-03 14:06 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-31 21:20 [PATCH] x86, earlyprintk: Fix two 'defined but not used' compile warnings Mark Einon
2015-03-31 21:45 ` Borislav Petkov
2015-03-31 22:07 ` [PATCH v2] " Mark Einon
2015-04-01  7:54   ` Ingo Molnar
2015-04-01  8:05     ` Mark Einon
2015-04-01 21:32   ` [PATCH v3] " Mark Einon
2015-04-02  4:35     ` Borislav Petkov
2015-04-03 14:06     ` [tip:x86/cleanups] x86/earlyprintk: Put CONFIG_PCI-only functions under the #ifdef tip-bot for Mark Einon

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.