From patchwork Sat Oct 20 11:23:16 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Lunn X-Patchwork-Id: 1621121 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork2.kernel.org (Postfix) with ESMTP id D022BDF26F for ; Sat, 20 Oct 2012 11:25:27 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TPX9k-0007JE-8w; Sat, 20 Oct 2012 11:23:52 +0000 Received: from londo.lunn.ch ([80.238.139.98]) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TPX9f-0007Ht-19 for linux-arm-kernel@lists.infradead.org; Sat, 20 Oct 2012 11:23:48 +0000 Received: from lunn by londo.lunn.ch with local (Exim 3.36 #1 (Debian)) id 1TPX9H-0006yv-00; Sat, 20 Oct 2012 13:23:23 +0200 From: Andrew Lunn To: Jason Cooper Subject: [PATCH v2 3/3] ARM: Kirkwood: checkpatch cleanups Date: Sat, 20 Oct 2012 13:23:16 +0200 Message-Id: <1350732196-26781-3-git-send-email-andrew@lunn.ch> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1350732196-26781-1-git-send-email-andrew@lunn.ch> References: <1350732196-26781-1-git-send-email-andrew@lunn.ch> X-Spam-Note: CRM114 invocation failed X-Spam-Score: -2.3 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record -0.4 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: Andrew Lunn , linux ARM X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Mostly printk to pr_{err|info} changes and a few strings split over multiple lines are combined. Signed-off-by: Andrew Lunn --- arch/arm/mach-kirkwood/board-dt.c | 2 +- arch/arm/mach-kirkwood/common.c | 9 ++++----- arch/arm/mach-kirkwood/common.h | 3 ++- arch/arm/mach-kirkwood/cpuidle.c | 2 +- arch/arm/mach-kirkwood/dockstar-setup.c | 2 +- arch/arm/mach-kirkwood/mpp.c | 4 ++-- arch/arm/mach-kirkwood/netspace_v2-setup.c | 4 ++-- arch/arm/mach-kirkwood/openrd-setup.c | 14 +++++--------- arch/arm/mach-kirkwood/pcie.c | 13 +++++++------ arch/arm/mach-kirkwood/sheevaplug-setup.c | 2 +- arch/arm/mach-kirkwood/ts41x-setup.c | 3 +-- 11 files changed, 27 insertions(+), 31 deletions(-) diff --git a/arch/arm/mach-kirkwood/board-dt.c b/arch/arm/mach-kirkwood/board-dt.c index 2d840da..d699bd0 100644 --- a/arch/arm/mach-kirkwood/board-dt.c +++ b/arch/arm/mach-kirkwood/board-dt.c @@ -100,7 +100,7 @@ static void __init kirkwood_dt_init(void) kirkwood_auxdata_lookup, NULL); } -static const char *kirkwood_dt_board_compat[] = { +static const char * const kirkwood_dt_board_compat[] = { "globalscale,dreamplug", "dlink,dns-320", "dlink,dns-325", diff --git a/arch/arm/mach-kirkwood/common.c b/arch/arm/mach-kirkwood/common.c index f694ba8..a46f90f 100644 --- a/arch/arm/mach-kirkwood/common.c +++ b/arch/arm/mach-kirkwood/common.c @@ -18,10 +18,10 @@ #include #include #include +#include +#include #include #include -#include -#include #include #include #include @@ -644,8 +644,7 @@ void __init kirkwood_l2_init(void) void __init kirkwood_init(void) { - printk(KERN_INFO "Kirkwood: %s, TCLK=%d.\n", - kirkwood_id(), kirkwood_tclk); + pr_info("Kirkwood: %s, TCLK=%d.\n", kirkwood_id(), kirkwood_tclk); /* * Disable propagation of mbus errors to the CPU local bus, @@ -671,7 +670,7 @@ void __init kirkwood_init(void) kirkwood_xor1_init(); kirkwood_crypto_init(); -#ifdef CONFIG_KEXEC +#ifdef CONFIG_KEXEC kexec_reinit = kirkwood_enable_pcie; #endif } diff --git a/arch/arm/mach-kirkwood/common.h b/arch/arm/mach-kirkwood/common.h index bcffd7c..6088e92 100644 --- a/arch/arm/mach-kirkwood/common.h +++ b/arch/arm/mach-kirkwood/common.h @@ -47,7 +47,8 @@ void kirkwood_i2c_init(void); void kirkwood_uart0_init(void); void kirkwood_uart1_init(void); void kirkwood_nand_init(struct mtd_partition *parts, int nr_parts, int delay); -void kirkwood_nand_init_rnb(struct mtd_partition *parts, int nr_parts, int (*dev_ready)(struct mtd_info *)); +void kirkwood_nand_init_rnb(struct mtd_partition *parts, int nr_parts, + int (*dev_ready)(struct mtd_info *)); void kirkwood_audio_init(void); void kirkwood_restart(char, const char *); void kirkwood_clk_init(void); diff --git a/arch/arm/mach-kirkwood/cpuidle.c b/arch/arm/mach-kirkwood/cpuidle.c index 0f17109..f730467 100644 --- a/arch/arm/mach-kirkwood/cpuidle.c +++ b/arch/arm/mach-kirkwood/cpuidle.c @@ -64,7 +64,7 @@ static int kirkwood_init_cpuidle(void) cpuidle_register_driver(&kirkwood_idle_driver); if (cpuidle_register_device(device)) { - printk(KERN_ERR "kirkwood_init_cpuidle: Failed registering\n"); + pr_err("kirkwood_init_cpuidle: Failed registering\n"); return -EIO; } return 0; diff --git a/arch/arm/mach-kirkwood/dockstar-setup.c b/arch/arm/mach-kirkwood/dockstar-setup.c index 23dcb19..791a98f 100644 --- a/arch/arm/mach-kirkwood/dockstar-setup.c +++ b/arch/arm/mach-kirkwood/dockstar-setup.c @@ -93,7 +93,7 @@ static void __init dockstar_init(void) if (gpio_request(29, "USB Power Enable") != 0 || gpio_direction_output(29, 1) != 0) - printk(KERN_ERR "can't set up GPIO 29 (USB Power Enable)\n"); + pr_err("can't set up GPIO 29 (USB Power Enable)\n"); kirkwood_ehci_init(); kirkwood_ge00_init(&dockstar_ge00_data); diff --git a/arch/arm/mach-kirkwood/mpp.c b/arch/arm/mach-kirkwood/mpp.c index 0c6ad63..827cde4 100644 --- a/arch/arm/mach-kirkwood/mpp.c +++ b/arch/arm/mach-kirkwood/mpp.c @@ -30,8 +30,8 @@ static unsigned int __init kirkwood_variant(void) if (dev == MV88F6180_DEV_ID) return MPP_F6180_MASK; - printk(KERN_ERR "MPP setup: unknown kirkwood variant " - "(dev %#x rev %#x)\n", dev, rev); + pr_err("MPP setup: unknown kirkwood variant (dev %#x rev %#x)\n", + dev, rev); return 0; } diff --git a/arch/arm/mach-kirkwood/netspace_v2-setup.c b/arch/arm/mach-kirkwood/netspace_v2-setup.c index 88b0788..728e86d 100644 --- a/arch/arm/mach-kirkwood/netspace_v2-setup.c +++ b/arch/arm/mach-kirkwood/netspace_v2-setup.c @@ -79,7 +79,7 @@ static struct platform_device netspace_v2_gpio_buttons = { .name = "gpio-keys", .id = -1, .dev = { - .platform_data = &netspace_v2_button_data, + .platform_data = &netspace_v2_button_data, }, }; @@ -211,7 +211,7 @@ static unsigned int netspace_v2_mpp_config[] __initdata = { MPP29_GPIO, /* Blue led (slow register) */ MPP30_GPIO, /* Blue led (command register) */ MPP31_GPIO, /* Board power off */ - MPP32_GPIO, /* Power button (0 = Released, 1 = Pushed) */ + MPP32_GPIO, /* Power button (0 = Released, 1 = Pushed) */ MPP33_GPO, /* Fan speed (bit 2) */ 0 }; diff --git a/arch/arm/mach-kirkwood/openrd-setup.c b/arch/arm/mach-kirkwood/openrd-setup.c index 134ef50..7e81e9b 100644 --- a/arch/arm/mach-kirkwood/openrd-setup.c +++ b/arch/arm/mach-kirkwood/openrd-setup.c @@ -121,14 +121,12 @@ static int __init uart1_mpp_config(void) kirkwood_mpp_conf(openrd_uart1_mpp_config); if (gpio_request(34, "SD_UART1_SEL")) { - printk(KERN_ERR "GPIO request failed for SD/UART1 selection" - ", gpio: 34\n"); + pr_err("GPIO request 34 failed for SD/UART1 selection\n"); return -EIO; } if (gpio_request(28, "RS232_RS485_SEL")) { - printk(KERN_ERR "GPIO request failed for RS232/RS485 selection" - ", gpio# 28\n"); + pr_err("GPIO request 28 failed for RS232/RS485 selection\n"); gpio_free(34); return -EIO; } @@ -185,15 +183,13 @@ static void __init openrd_init(void) if (uart1 <= 0) { if (uart1 < 0) - printk(KERN_ERR "Invalid kernel parameter to select " - "UART1. Defaulting to SD. ERROR CODE: %d\n", - uart1); + pr_err("Invalid kernel parameter to select UART1. Defaulting to SD. ERROR CODE: %d\n", + uart1); /* Select SD * Pin # 34: 0 => UART1, 1 => SD */ if (gpio_request(34, "SD_UART1_SEL")) { - printk(KERN_ERR "GPIO request failed for SD/UART1 " - "selection, gpio: 34\n"); + pr_err("GPIO request 34 failed for SD/UART1 selection\n"); } else { gpio_direction_output(34, 1); diff --git a/arch/arm/mach-kirkwood/pcie.c b/arch/arm/mach-kirkwood/pcie.c index ec54491..2585811 100644 --- a/arch/arm/mach-kirkwood/pcie.c +++ b/arch/arm/mach-kirkwood/pcie.c @@ -26,7 +26,7 @@ static void kirkwood_enable_pcie_clk(const char *port) clk = clk_get_sys("pcie", port); if (IS_ERR(clk)) { - printk(KERN_ERR "PCIE clock %s missing\n", port); + pr_err("PCIE clock %s missing\n", port); return; } clk_prepare_enable(clk); @@ -168,7 +168,7 @@ static int __init kirkwood_pcie_setup(int nr, struct pci_sys_data *sys) return 0; index = pcie_port_map[nr]; - printk(KERN_INFO "PCI: bus%d uses PCIe port %d\n", sys->busnr, index); + pr_info("PCI: bus%d uses PCIe port %d\n", sys->busnr, index); pp = kzalloc(sizeof(*pp), GFP_KERNEL); if (!pp) @@ -186,7 +186,8 @@ static int __init kirkwood_pcie_setup(int nr, struct pci_sys_data *sys) case 1: kirkwood_enable_pcie_clk("1"); pcie1_ioresources_init(pp); - pci_ioremap_io(SZ_64K * sys->busnr, KIRKWOOD_PCIE1_IO_PHYS_BASE); + pci_ioremap_io(SZ_64K * sys->busnr, + KIRKWOOD_PCIE1_IO_PHYS_BASE); break; default: panic("PCIe setup: invalid controller %d", index); @@ -257,13 +258,13 @@ static struct hw_pci kirkwood_pci __initdata = { static void __init add_pcie_port(int index, void __iomem *base) { - printk(KERN_INFO "Kirkwood PCIe port %d: ", index); + pr_info("Kirkwood PCIe port %d: ", index); if (orion_pcie_link_up(base)) { - printk(KERN_INFO "link up\n"); + pr_info("link up\n"); pcie_port_map[num_pcie_ports++] = index; } else - printk(KERN_INFO "link down, ignoring\n"); + pr_info("link down, ignoring\n"); } void __init kirkwood_pcie_init(unsigned int portmask) diff --git a/arch/arm/mach-kirkwood/sheevaplug-setup.c b/arch/arm/mach-kirkwood/sheevaplug-setup.c index 28d0aba..8a17594 100644 --- a/arch/arm/mach-kirkwood/sheevaplug-setup.c +++ b/arch/arm/mach-kirkwood/sheevaplug-setup.c @@ -117,7 +117,7 @@ static void __init sheevaplug_init(void) if (gpio_request(29, "USB Power Enable") != 0 || gpio_direction_output(29, 1) != 0) - printk(KERN_ERR "can't set up GPIO 29 (USB Power Enable)\n"); + pr_err("can't set up GPIO 29 (USB Power Enable)\n"); kirkwood_ehci_init(); kirkwood_ge00_init(&sheevaplug_ge00_data); diff --git a/arch/arm/mach-kirkwood/ts41x-setup.c b/arch/arm/mach-kirkwood/ts41x-setup.c index 367a940..e4c6127 100644 --- a/arch/arm/mach-kirkwood/ts41x-setup.c +++ b/arch/arm/mach-kirkwood/ts41x-setup.c @@ -170,8 +170,7 @@ static int __init ts41x_pci_init(void) else kirkwood_pcie_init(KW_PCIE0); } - - return 0; + return 0; } subsys_initcall(ts41x_pci_init);