aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Einon <mark.einon@gmail.com>2015-04-01 17:32:04 -0400
committerIngo Molnar <mingo@kernel.org>2015-04-03 09:21:56 -0400
commit7f99f8b94c9355acdb14f1be28cb19aac741da68 (patch)
tree171c94fb7281576129ebb4f553d190bb3e00b339
parent020b37ac66c5fcec70b6fa51113b84bdfff6a4bc (diff)
x86/earlyprintk: Put CONFIG_PCI-only functions under the #ifdef
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) ^ Also convert a few related instances of uintXX_t to kernel specific uXX defines. Signed-off-by: Mark Einon <mark.einon@gmail.com> Signed-off-by: Borislav Petkov <bp@suse.de> Cc: H. Peter Anvin <hpa@zytor.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: stuart.r.anderson@intel.com Link: http://lkml.kernel.org/r/1427923924-22653-1-git-send-email-mark.einon@gmail.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
-rw-r--r--arch/x86/kernel/early_printk.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/arch/x86/kernel/early_printk.c b/arch/x86/kernel/early_printk.c
index a62536a1be88..49ff55ef9b26 100644
--- a/arch/x86/kernel/early_printk.c
+++ b/arch/x86/kernel/early_printk.c
@@ -95,20 +95,6 @@ static unsigned long early_serial_base = 0x3f8; /* ttyS0 */
95#define DLL 0 /* Divisor Latch Low */ 95#define DLL 0 /* Divisor Latch Low */
96#define DLH 1 /* Divisor latch High */ 96#define DLH 1 /* Divisor latch High */
97 97
98static void mem32_serial_out(unsigned long addr, int offset, int value)
99{
100 uint32_t *vaddr = (uint32_t *)addr;
101 /* shift implied by pointer type */
102 writel(value, vaddr + offset);
103}
104
105static unsigned int mem32_serial_in(unsigned long addr, int offset)
106{
107 uint32_t *vaddr = (uint32_t *)addr;
108 /* shift implied by pointer type */
109 return readl(vaddr + offset);
110}
111
112static unsigned int io_serial_in(unsigned long addr, int offset) 98static unsigned int io_serial_in(unsigned long addr, int offset)
113{ 99{
114 return inb(addr + offset); 100 return inb(addr + offset);
@@ -205,6 +191,20 @@ static __init void early_serial_init(char *s)
205} 191}
206 192
207#ifdef CONFIG_PCI 193#ifdef CONFIG_PCI
194static void mem32_serial_out(unsigned long addr, int offset, int value)
195{
196 u32 *vaddr = (u32 *)addr;
197 /* shift implied by pointer type */
198 writel(value, vaddr + offset);
199}
200
201static unsigned int mem32_serial_in(unsigned long addr, int offset)
202{
203 u32 *vaddr = (u32 *)addr;
204 /* shift implied by pointer type */
205 return readl(vaddr + offset);
206}
207
208/* 208/*
209 * early_pci_serial_init() 209 * early_pci_serial_init()
210 * 210 *
@@ -217,8 +217,8 @@ static __init void early_pci_serial_init(char *s)
217 unsigned divisor; 217 unsigned divisor;
218 unsigned long baud = DEFAULT_BAUD; 218 unsigned long baud = DEFAULT_BAUD;
219 u8 bus, slot, func; 219 u8 bus, slot, func;
220 uint32_t classcode, bar0; 220 u32 classcode, bar0;
221 uint16_t cmdreg; 221 u16 cmdreg;
222 char *e; 222 char *e;
223 223
224 224