From patchwork Fri Feb 1 22:45:45 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brad Figg X-Patchwork-Id: 217609 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from chlorine.canonical.com (chlorine.canonical.com [91.189.94.204]) by ozlabs.org (Postfix) with ESMTP id 0F4612C0082 for ; Sat, 2 Feb 2013 09:46:27 +1100 (EST) Received: from localhost ([127.0.0.1] helo=chlorine.canonical.com) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1U1PNB-0000Qf-BT; Fri, 01 Feb 2013 22:46:17 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1U1PN2-0000N1-Bw for kernel-team@lists.ubuntu.com; Fri, 01 Feb 2013 22:46:08 +0000 Received: from static-50-53-107-235.bvtn.or.frontiernet.net ([50.53.107.235] helo=localhost) by youngberry.canonical.com with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1U1PN1-0000FF-SB for kernel-team@lists.ubuntu.com; Fri, 01 Feb 2013 22:46:08 +0000 From: Brad Figg To: kernel-team@lists.ubuntu.com Subject: [Precise] [PATCH 05/12] x86, efi: Convert printk to pr_*() Date: Fri, 1 Feb 2013 14:45:45 -0800 Message-Id: <1359758752-21643-6-git-send-email-brad.figg@canonical.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1359758752-21643-1-git-send-email-brad.figg@canonical.com> References: <1359758752-21643-1-git-send-email-brad.figg@canonical.com> X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.13 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: kernel-team-bounces@lists.ubuntu.com Errors-To: kernel-team-bounces@lists.ubuntu.com From: Olof Johansson BugLink: http://bugs.launchpad.net/bugs/1111689 Alright, I guess I'll go through and convert them, even though there's no net gain to speak of. v4: * Switched to pr_fmt and removed some redundant use of "EFI" in messages. Signed-off-by: Olof Johansson Link: http://lkml.kernel.org/r/1329081869-20779-3-git-send-email-olof@lixom.net Cc: Joe Perches Signed-off-by: H. Peter Anvin (cherry picked from commit e3cb3f5a35997906f9b79bf860029c02a54cfae6) Signed-off-by: Brad Figg --- arch/x86/platform/efi/efi.c | 58 +++++++++++++++++++++---------------------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/arch/x86/platform/efi/efi.c b/arch/x86/platform/efi/efi.c index 00098c2..b6ef331 100644 --- a/arch/x86/platform/efi/efi.c +++ b/arch/x86/platform/efi/efi.c @@ -26,6 +26,8 @@ * Skip non-WB memory and ignore empty memory ranges. */ +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + #include #include #include @@ -47,7 +49,6 @@ #include #define EFI_DEBUG 1 -#define PFX "EFI: " int efi_enabled; EXPORT_SYMBOL(efi_enabled); @@ -253,7 +254,7 @@ int efi_set_rtc_mmss(unsigned long nowtime) status = efi.get_time(&eft, &cap); if (status != EFI_SUCCESS) { - printk(KERN_ERR "Oops: efitime: can't read time!\n"); + pr_err("Oops: efitime: can't read time!\n"); return -1; } @@ -267,7 +268,7 @@ int efi_set_rtc_mmss(unsigned long nowtime) status = efi.set_time(&eft); if (status != EFI_SUCCESS) { - printk(KERN_ERR "Oops: efitime: can't write time!\n"); + pr_err("Oops: efitime: can't write time!\n"); return -1; } return 0; @@ -281,7 +282,7 @@ unsigned long efi_get_time(void) status = efi.get_time(&eft, &cap); if (status != EFI_SUCCESS) - printk(KERN_ERR "Oops: efitime: can't read time!\n"); + pr_err("Oops: efitime: can't read time!\n"); return mktime(eft.year, eft.month, eft.day, eft.hour, eft.minute, eft.second); @@ -370,7 +371,7 @@ static void __init print_efi_memmap(void) p < memmap.map_end; p += memmap.desc_size, i++) { md = p; - printk(KERN_INFO PFX "mem%02u: type=%u, attr=0x%llx, " + pr_info("mem%02u: type=%u, attr=0x%llx, " "range=[0x%016llx-0x%016llx) (%lluMB)\n", i, md->type, md->attribute, md->phys_addr, md->phys_addr + (md->num_pages << EFI_PAGE_SHIFT), @@ -404,7 +405,7 @@ void __init efi_reserve_boot_services(void) 1<num_pages = 0; - memblock_dbg(PFX "Could not reserve boot range " + memblock_dbg("Could not reserve boot range " "[0x%010llx-0x%010llx]\n", start, start+size-1); } else @@ -439,7 +440,7 @@ static void __init efi_systab_init(void *phys) efi.systab = early_ioremap((unsigned long)efi_phys.systab, sizeof(efi_system_table_t)); if (efi.systab == NULL) - printk(KERN_ERR "Couldn't map the EFI system table!\n"); + pr_err("Couldn't map the system table!\n"); memcpy(&efi_systab, efi.systab, sizeof(efi_system_table_t)); early_iounmap(efi.systab, sizeof(efi_system_table_t)); efi.systab = &efi_systab; @@ -448,9 +449,9 @@ static void __init efi_systab_init(void *phys) * Verify the EFI Table */ if (efi.systab->hdr.signature != EFI_SYSTEM_TABLE_SIGNATURE) - printk(KERN_ERR "EFI system table signature incorrect!\n"); + pr_err("System table signature incorrect!\n"); if ((efi.systab->hdr.revision >> 16) == 0) - printk(KERN_ERR "Warning: EFI system table version " + pr_err("Warning: System table version " "%d.%02d, expected 1.00 or greater!\n", efi.systab->hdr.revision >> 16, efi.systab->hdr.revision & 0xffff); @@ -468,42 +469,42 @@ static void __init efi_config_init(u64 tables, int nr_tables) efi.systab->tables, efi.systab->nr_tables * sizeof(efi_config_table_t)); if (config_tables == NULL) - printk(KERN_ERR "Could not map EFI Configuration Table!\n"); + pr_err("Could not map Configuration table!\n"); - printk(KERN_INFO); + pr_info(""); for (i = 0; i < efi.systab->nr_tables; i++) { if (!efi_guidcmp(config_tables[i].guid, MPS_TABLE_GUID)) { efi.mps = config_tables[i].table; - printk(" MPS=0x%lx ", config_tables[i].table); + pr_cont(" MPS=0x%lx ", config_tables[i].table); } else if (!efi_guidcmp(config_tables[i].guid, ACPI_20_TABLE_GUID)) { efi.acpi20 = config_tables[i].table; - printk(" ACPI 2.0=0x%lx ", config_tables[i].table); + pr_cont(" ACPI 2.0=0x%lx ", config_tables[i].table); } else if (!efi_guidcmp(config_tables[i].guid, ACPI_TABLE_GUID)) { efi.acpi = config_tables[i].table; - printk(" ACPI=0x%lx ", config_tables[i].table); + pr_cont(" ACPI=0x%lx ", config_tables[i].table); } else if (!efi_guidcmp(config_tables[i].guid, SMBIOS_TABLE_GUID)) { efi.smbios = config_tables[i].table; - printk(" SMBIOS=0x%lx ", config_tables[i].table); + pr_cont(" SMBIOS=0x%lx ", config_tables[i].table); #ifdef CONFIG_X86_UV } else if (!efi_guidcmp(config_tables[i].guid, UV_SYSTEM_TABLE_GUID)) { efi.uv_systab = config_tables[i].table; - printk(" UVsystab=0x%lx ", config_tables[i].table); + pr_cont(" UVsystab=0x%lx ", config_tables[i].table); #endif } else if (!efi_guidcmp(config_tables[i].guid, HCDP_TABLE_GUID)) { efi.hcdp = config_tables[i].table; - printk(" HCDP=0x%lx ", config_tables[i].table); + pr_cont(" HCDP=0x%lx ", config_tables[i].table); } else if (!efi_guidcmp(config_tables[i].guid, UGA_IO_PROTOCOL_GUID)) { efi.uga = config_tables[i].table; - printk(" UGA=0x%lx ", config_tables[i].table); + pr_cont(" UGA=0x%lx ", config_tables[i].table); } } - printk("\n"); + pr_cont("\n"); early_iounmap(config_tables, efi.systab->nr_tables * sizeof(efi_config_table_t)); } @@ -536,8 +537,7 @@ static void __init efi_runtime_init(void) */ efi.get_time = phys_efi_get_time; } else - printk(KERN_ERR "Could not map the EFI runtime service " - "table!\n"); + pr_err("Could not map the runtime service table!\n"); early_iounmap(runtime, sizeof(efi_runtime_services_t)); } @@ -547,7 +547,7 @@ static void __init efi_memmap_init(void) memmap.map = early_ioremap((unsigned long)memmap.phys_map, memmap.nr_map * memmap.desc_size); if (memmap.map == NULL) - printk(KERN_ERR "Could not map the EFI memory map!\n"); + pr_err("Could not map the memory map!\n"); memmap.map_end = memmap.map + (memmap.nr_map * memmap.desc_size); if (add_efi_memmap) @@ -580,12 +580,12 @@ void __init efi_init(void) vendor[i] = *c16++; vendor[i] = '\0'; } else - printk(KERN_ERR PFX "Could not map the firmware vendor!\n"); + pr_err("Could not map the firmware vendor!\n"); early_iounmap(tmp, 2); - printk(KERN_INFO "EFI v%u.%.02u by %s\n", - efi.systab->hdr.revision >> 16, - efi.systab->hdr.revision & 0xffff, vendor); + pr_info("EFI v%u.%.02u by %s\n", + efi.systab->hdr.revision >> 16, + efi.systab->hdr.revision & 0xffff, vendor); efi_config_init(efi.systab->tables, efi.systab->nr_tables); @@ -712,7 +712,7 @@ void __init efi_enter_virtual_mode(void) md->virt_addr = (u64) (unsigned long) va; if (!va) { - printk(KERN_ERR PFX "ioremap of 0x%llX failed!\n", + pr_err("ioremap of 0x%llX failed!\n", (unsigned long long)md->phys_addr); continue; } @@ -739,8 +739,8 @@ void __init efi_enter_virtual_mode(void) (efi_memory_desc_t *)__pa(new_memmap)); if (status != EFI_SUCCESS) { - printk(KERN_ALERT "Unable to switch EFI into virtual mode " - "(status=%lx)!\n", status); + pr_alert("Unable to switch EFI into virtual mode " + "(status=%lx)!\n", status); panic("EFI call to SetVirtualAddressMap() failed!"); }