lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 31 Mar 2015 22:20:12 +0100
From:	Mark Einon <mark.einon@...il.com>
To:	x86@...nel.org
Cc:	tglx@...utronix.de, linux-kernel@...r.kernel.org, mingo@...hat.com,
	hpa@...or.com, stuart.r.anderson@...el.com,
	Mark Einon <mark.einon@...il.com>
Subject: [PATCH] x86, earlyprintk: Fix two 'defined but not used' compile warnings

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@...il.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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists