summaryrefslogtreecommitdiff
path: root/arch/x86/kernel/early_printk.c
diff options
context:
space:
mode:
authorMark Einon <mark.einon@gmail.com>2015-04-02 00:32:04 +0300
committerIngo Molnar <mingo@kernel.org>2015-04-03 16:21:56 +0300
commit7f99f8b94c9355acdb14f1be28cb19aac741da68 (patch)
tree171c94fb7281576129ebb4f553d190bb3e00b339 /arch/x86/kernel/early_printk.c
parent020b37ac66c5fcec70b6fa51113b84bdfff6a4bc (diff)
downloadlinux-7f99f8b94c9355acdb14f1be28cb19aac741da68.tar.xz
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>
Diffstat (limited to 'arch/x86/kernel/early_printk.c')
-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 */
#define DLL 0 /* Divisor Latch Low */
#define DLH 1 /* Divisor latch High */
-static void mem32_serial_out(unsigned long addr, int offset, int value)
-{
- uint32_t *vaddr = (uint32_t *)addr;
- /* shift implied by pointer type */
- writel(value, vaddr + offset);
-}
-
-static unsigned int mem32_serial_in(unsigned long addr, int offset)
-{
- uint32_t *vaddr = (uint32_t *)addr;
- /* shift implied by pointer type */
- return readl(vaddr + offset);
-}
-
static unsigned int io_serial_in(unsigned long addr, int offset)
{
return inb(addr + offset);
@@ -205,6 +191,20 @@ static __init void early_serial_init(char *s)
}
#ifdef CONFIG_PCI
+static void mem32_serial_out(unsigned long addr, int offset, int value)
+{
+ u32 *vaddr = (u32 *)addr;
+ /* shift implied by pointer type */
+ writel(value, vaddr + offset);
+}
+
+static unsigned int mem32_serial_in(unsigned long addr, int offset)
+{
+ u32 *vaddr = (u32 *)addr;
+ /* shift implied by pointer type */
+ return readl(vaddr + offset);
+}
+
/*
* early_pci_serial_init()
*
@@ -217,8 +217,8 @@ static __init void early_pci_serial_init(char *s)
unsigned divisor;
unsigned long baud = DEFAULT_BAUD;
u8 bus, slot, func;
- uint32_t classcode, bar0;
- uint16_t cmdreg;
+ u32 classcode, bar0;
+ u16 cmdreg;
char *e;