Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753123AbbDCOG4 (ORCPT ); Fri, 3 Apr 2015 10:06:56 -0400 Received: from terminus.zytor.com ([198.137.202.10]:48142 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753083AbbDCOGv (ORCPT ); Fri, 3 Apr 2015 10:06:51 -0400 Date: Fri, 3 Apr 2015 07:06:35 -0700 From: tip-bot for Mark Einon Message-ID: Cc: tglx@linutronix.de, mark.einon@gmail.com, mingo@kernel.org, hpa@zytor.com, linux-kernel@vger.kernel.org, bp@suse.de Reply-To: mark.einon@gmail.com, mingo@kernel.org, tglx@linutronix.de, linux-kernel@vger.kernel.org, bp@suse.de, hpa@zytor.com In-Reply-To: <1427923924-22653-1-git-send-email-mark.einon@gmail.com> References: <1427923924-22653-1-git-send-email-mark.einon@gmail.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:x86/cleanups] x86/earlyprintk: Put CONFIG_PCI-only functions under the #ifdef Git-Commit-ID: 7f99f8b94c9355acdb14f1be28cb19aac741da68 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3296 Lines: 95 Commit-ID: 7f99f8b94c9355acdb14f1be28cb19aac741da68 Gitweb: http://git.kernel.org/tip/7f99f8b94c9355acdb14f1be28cb19aac741da68 Author: Mark Einon AuthorDate: Wed, 1 Apr 2015 22:32:04 +0100 Committer: Ingo Molnar CommitDate: Fri, 3 Apr 2015 15:21:56 +0200 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 Signed-off-by: Borislav Petkov Cc: H. Peter Anvin Cc: Thomas Gleixner 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 --- arch/x86/kernel/early_printk.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/arch/x86/kernel/early_printk.c b/arch/x86/kernel/early_printk.c index a62536a..49ff55e 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; -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/