MIPS: Fix up inconsistency in panic() string argument.
authorRalf Baechle <ralf@linux-mips.org>
Thu, 17 Nov 2011 15:07:31 +0000 (15:07 +0000)
committerRalf Baechle <ralf@linux-mips.org>
Wed, 7 Dec 2011 22:01:45 +0000 (22:01 +0000)
Panic() invokes printk() to add a \n internally, so panic arguments should
not themselves end in \n.  Panic invocations in arch/mips and elsewhere
are inconsistently sometimes terminating in \n, sometimes not.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
19 files changed:
arch/mips/ar7/platform.c
arch/mips/ar7/setup.c
arch/mips/ath79/setup.c
arch/mips/bcm47xx/setup.c
arch/mips/cavium-octeon/setup.c
arch/mips/cavium-octeon/smp.c
arch/mips/jz4740/board-qi_lb60.c
arch/mips/kernel/smtc.c
arch/mips/kernel/traps.c
arch/mips/lantiq/clk.c
arch/mips/lantiq/irq.c
arch/mips/lantiq/xway/dma.c
arch/mips/lantiq/xway/ebu.c
arch/mips/lantiq/xway/pmu.c
arch/mips/lantiq/xway/reset.c
arch/mips/mm/c-octeon.c
arch/mips/pci/msi-octeon.c
arch/mips/pmc-sierra/msp71xx/msp_setup.c
arch/mips/sgi-ip27/ip27-irq.c

index 33ffecf6a6d662403cc8cd3fb24de1737dc3e39b..60102392af01d7fbe1d27e8b4fa10c70a68e6896 100644 (file)
@@ -536,7 +536,7 @@ static int __init ar7_register_uarts(void)
 
        bus_clk = clk_get(NULL, "bus");
        if (IS_ERR(bus_clk))
-               panic("unable to get bus clk\n");
+               panic("unable to get bus clk");
 
        uart_port.type          = PORT_AR7;
        uart_port.uartclk       = clk_get_rate(bus_clk) / 2;
index f20b53e597c42fca192bc40866da920452c36cb9..9a357fffcfbe0a0c6767e5b12d70d22f23e5b1b7 100644 (file)
@@ -96,7 +96,7 @@ void __init plat_mem_setup(void)
 
        io_base = (unsigned long)ioremap(AR7_REGS_BASE, 0x10000);
        if (!io_base)
-               panic("Can't remap IO base!\n");
+               panic("Can't remap IO base!");
        set_io_port_base(io_base);
 
        prom_meminit();
index 159b42f106b098185b908eae7efc85b245f8bb52..1cf60e1d9dd3f0197f69c4911c95971afd7e5545 100644 (file)
@@ -134,7 +134,7 @@ static void __init ath79_detect_sys_type(void)
                break;
 
        default:
-               panic("ath79: unknown SoC, id:0x%08x\n", id);
+               panic("ath79: unknown SoC, id:0x%08x", id);
        }
 
        sprintf(ath79_sys_type, "Atheros AR%s rev %u", chip, rev);
index 1cfdda03546a8dc5819d682107e3c52289231e24..aab6b0c40a7569b54767c5e473e75da5ba5b8563 100644 (file)
@@ -289,7 +289,7 @@ static void __init bcm47xx_register_ssb(void)
        err = ssb_bus_ssbbus_register(&(bcm47xx_bus.ssb), SSB_ENUM_BASE,
                                      bcm47xx_get_invariants);
        if (err)
-               panic("Failed to initialize SSB bus (err %d)\n", err);
+               panic("Failed to initialize SSB bus (err %d)", err);
 
        mcore = &bcm47xx_bus.ssb.mipscore;
        if (nvram_getenv("kernel_args", buf, sizeof(buf)) >= 0) {
@@ -314,7 +314,7 @@ static void __init bcm47xx_register_bcma(void)
 
        err = bcma_host_soc_register(&bcm47xx_bus.bcma);
        if (err)
-               panic("Failed to initialize BCMA bus (err %d)\n", err);
+               panic("Failed to initialize BCMA bus (err %d)", err);
 }
 #endif
 
index 2d9028f1474c0a3f343d6a6c75b12de71cbd2231..853bac4f25b2bdaca3672577cdb31d0fb82095b1 100644 (file)
@@ -767,11 +767,11 @@ void prom_free_prom_memory(void)
                        : "=r" (insn) : : "$31", "memory");
 
                if ((insn >> 26) != 0x33)
-                       panic("No PREF instruction at Core-14449 probe point.\n");
+                       panic("No PREF instruction at Core-14449 probe point.");
 
                if (((insn >> 16) & 0x1f) != 28)
                        panic("Core-14449 WAR not in place (%04x).\n"
-                             "Please build kernel with proper options (CONFIG_CAVIUM_CN63XXP1).\n", insn);
+                             "Please build kernel with proper options (CONFIG_CAVIUM_CN63XXP1).", insn);
        }
 #ifdef CONFIG_CAVIUM_DECODE_RSL
        cvmx_interrupt_rsl_enable();
@@ -779,7 +779,7 @@ void prom_free_prom_memory(void)
        /* Add an interrupt handler for general failures. */
        if (request_irq(OCTEON_IRQ_RML, octeon_rlm_interrupt, IRQF_SHARED,
                        "RML/RSL", octeon_rlm_interrupt)) {
-               panic("Unable to request_irq(OCTEON_IRQ_RML)\n");
+               panic("Unable to request_irq(OCTEON_IRQ_RML)");
        }
 #endif
 }
index efcfff4d4627c55f4238bfd3361fe937be25465e..b1535fe409d4b50935654cf04634ab81139c2992 100644 (file)
@@ -210,7 +210,7 @@ void octeon_prepare_cpus(unsigned int max_cpus)
        if (request_irq(OCTEON_IRQ_MBOX0, mailbox_interrupt,
                        IRQF_PERCPU | IRQF_NO_THREAD, "SMP-IPI",
                        mailbox_interrupt)) {
-               panic("Cannot request_irq(OCTEON_IRQ_MBOX0)\n");
+               panic("Cannot request_irq(OCTEON_IRQ_MBOX0)");
        }
 }
 
index c3b04be3fb2bb4c056e2cb531b5c473d53d23c9f..639e3ce6c264d4f8af8137efffff5fdf280992cf 100644 (file)
@@ -488,7 +488,7 @@ static int __init qi_lb60_board_setup(void)
        board_gpio_setup();
 
        if (qi_lb60_init_platform_devices())
-               panic("Failed to initialize platform devices\n");
+               panic("Failed to initialize platform devices");
 
        return 0;
 }
index f0895e70e283b3982c18a672ad8875a8b1e6ad55..b1eea63cc9887b2d22a0ea51bfc2923bee63db72 100644 (file)
@@ -559,7 +559,7 @@ void smtc_prepare_cpus(int cpus)
 
        pipi = kmalloc(nipi *sizeof(struct smtc_ipi), GFP_KERNEL);
        if (pipi == NULL)
-               panic("kmalloc of IPI message buffers failed\n");
+               panic("kmalloc of IPI message buffers failed");
        else
                printk("IPI buffer pool of %d buffers\n", nipi);
        for (i = 0; i < nipi; i++) {
@@ -813,7 +813,7 @@ void smtc_send_ipi(int cpu, int type, unsigned int action)
        if (pipi == NULL) {
                bust_spinlocks(1);
                mips_mt_regdump(dvpe());
-               panic("IPI Msg. Buffers Depleted\n");
+               panic("IPI Msg. Buffers Depleted");
        }
        pipi->type = type;
        pipi->arg = (void *)action;
index 5c8a49d55054dffce696066bad88d1863c5e7f35..363c4764b8187817e975b8de6d7879f154d60070 100644 (file)
@@ -400,7 +400,7 @@ void __noreturn die(const char *str, struct pt_regs *regs)
                panic("Fatal exception in interrupt");
 
        if (panic_on_oops) {
-               printk(KERN_EMERG "Fatal exception: panic in 5 seconds\n");
+               printk(KERN_EMERG "Fatal exception: panic in 5 seconds");
                ssleep(5);
                panic("Fatal exception");
        }
@@ -1150,7 +1150,7 @@ asmlinkage void do_mt(struct pt_regs *regs)
 asmlinkage void do_dsp(struct pt_regs *regs)
 {
        if (cpu_has_dsp)
-               panic("Unexpected DSP exception\n");
+               panic("Unexpected DSP exception");
 
        force_sig(SIGILL, current);
 }
index 77ed70fc2fe5953cd9bf31aa2514820b41e2bbd6..412814fdd3ee239ce5f7cfc6e6c7f6ead93ed9fa 100644 (file)
@@ -134,11 +134,11 @@ void __init plat_time_init(void)
        struct clk *clk;
 
        if (insert_resource(&iomem_resource, &ltq_cgu_resource) < 0)
-               panic("Failed to insert cgu memory\n");
+               panic("Failed to insert cgu memory");
 
        if (request_mem_region(ltq_cgu_resource.start,
                        resource_size(&ltq_cgu_resource), "cgu") < 0)
-               panic("Failed to request cgu memory\n");
+               panic("Failed to request cgu memory");
 
        ltq_cgu_membase = ioremap_nocache(ltq_cgu_resource.start,
                                resource_size(&ltq_cgu_resource));
index f9737bb3c5ab7442b055a6d0d7aa0e7529b37b6d..51fa0a4ba556e66b6465879ffe42a84b30dea5be 100644 (file)
@@ -249,28 +249,28 @@ void __init arch_init_irq(void)
        int i;
 
        if (insert_resource(&iomem_resource, &ltq_icu_resource) < 0)
-               panic("Failed to insert icu memory\n");
+               panic("Failed to insert icu memory");
 
        if (request_mem_region(ltq_icu_resource.start,
                        resource_size(&ltq_icu_resource), "icu") < 0)
-               panic("Failed to request icu memory\n");
+               panic("Failed to request icu memory");
 
        ltq_icu_membase = ioremap_nocache(ltq_icu_resource.start,
                                resource_size(&ltq_icu_resource));
        if (!ltq_icu_membase)
-               panic("Failed to remap icu memory\n");
+               panic("Failed to remap icu memory");
 
        if (insert_resource(&iomem_resource, &ltq_eiu_resource) < 0)
-               panic("Failed to insert eiu memory\n");
+               panic("Failed to insert eiu memory");
 
        if (request_mem_region(ltq_eiu_resource.start,
                        resource_size(&ltq_eiu_resource), "eiu") < 0)
-               panic("Failed to request eiu memory\n");
+               panic("Failed to request eiu memory");
 
        ltq_eiu_membase = ioremap_nocache(ltq_eiu_resource.start,
                                resource_size(&ltq_eiu_resource));
        if (!ltq_eiu_membase)
-               panic("Failed to remap eiu memory\n");
+               panic("Failed to remap eiu memory");
 
        /* make sure all irqs are turned off by default */
        for (i = 0; i < 5; i++)
index cbb6ae5747b97f81c67c8d77916bd10bad34e125..b210e936c7c3a84900eeeb0c1ba628b7479ba71a 100644 (file)
@@ -222,17 +222,17 @@ ltq_dma_init(void)
 
        /* insert and request the memory region */
        if (insert_resource(&iomem_resource, &ltq_dma_resource) < 0)
-               panic("Failed to insert dma memory\n");
+               panic("Failed to insert dma memory");
 
        if (request_mem_region(ltq_dma_resource.start,
                        resource_size(&ltq_dma_resource), "dma") < 0)
-               panic("Failed to request dma memory\n");
+               panic("Failed to request dma memory");
 
        /* remap dma register range */
        ltq_dma_membase = ioremap_nocache(ltq_dma_resource.start,
                                resource_size(&ltq_dma_resource));
        if (!ltq_dma_membase)
-               panic("Failed to remap dma memory\n");
+               panic("Failed to remap dma memory");
 
        /* power up and reset the dma engine */
        ltq_pmu_enable(PMU_DMA);
index 033b3184c7a70d180dbed8950c0d7e4e594317dd..862e3e830680be5642dabaf84519801b63c8ae94 100644 (file)
@@ -32,17 +32,17 @@ static int __init lantiq_ebu_init(void)
 {
        /* insert and request the memory region */
        if (insert_resource(&iomem_resource, &ltq_ebu_resource) < 0)
-               panic("Failed to insert ebu memory\n");
+               panic("Failed to insert ebu memory");
 
        if (request_mem_region(ltq_ebu_resource.start,
                        resource_size(&ltq_ebu_resource), "ebu") < 0)
-               panic("Failed to request ebu memory\n");
+               panic("Failed to request ebu memory");
 
        /* remap ebu register range */
        ltq_ebu_membase = ioremap_nocache(ltq_ebu_resource.start,
                                resource_size(&ltq_ebu_resource));
        if (!ltq_ebu_membase)
-               panic("Failed to remap ebu memory\n");
+               panic("Failed to remap ebu memory");
 
        /* make sure to unprotect the memory region where flash is located */
        ltq_ebu_w32(ltq_ebu_r32(LTQ_EBU_BUSCON0) & ~EBU_WRDIS, LTQ_EBU_BUSCON0);
index 39f0d2641cbfece73d507aa01b0d5e888e26b272..fe85361e032e1146887b9d7e183cc02819b3c1eb 100644 (file)
@@ -40,7 +40,7 @@ void ltq_pmu_enable(unsigned int module)
        do {} while (--err && (ltq_pmu_r32(LTQ_PMU_PWDSR) & module));
 
        if (!err)
-               panic("activating PMU module failed!\n");
+               panic("activating PMU module failed!");
 }
 EXPORT_SYMBOL(ltq_pmu_enable);
 
@@ -53,16 +53,16 @@ EXPORT_SYMBOL(ltq_pmu_disable);
 int __init ltq_pmu_init(void)
 {
        if (insert_resource(&iomem_resource, &ltq_pmu_resource) < 0)
-               panic("Failed to insert pmu memory\n");
+               panic("Failed to insert pmu memory");
 
        if (request_mem_region(ltq_pmu_resource.start,
                        resource_size(&ltq_pmu_resource), "pmu") < 0)
-               panic("Failed to request pmu memory\n");
+               panic("Failed to request pmu memory");
 
        ltq_pmu_membase = ioremap_nocache(ltq_pmu_resource.start,
                                resource_size(&ltq_pmu_resource));
        if (!ltq_pmu_membase)
-               panic("Failed to remap pmu memory\n");
+               panic("Failed to remap pmu memory");
        return 0;
 }
 
index 3d41f0bb5bf73f0d84108129a979642770e632f7..8b66bd87f0c1cbf4a698c47cf78721da799aee0f 100644 (file)
@@ -69,17 +69,17 @@ static int __init mips_reboot_setup(void)
 {
        /* insert and request the memory region */
        if (insert_resource(&iomem_resource, &ltq_rcu_resource) < 0)
-               panic("Failed to insert rcu memory\n");
+               panic("Failed to insert rcu memory");
 
        if (request_mem_region(ltq_rcu_resource.start,
                        resource_size(&ltq_rcu_resource), "rcu") < 0)
-               panic("Failed to request rcu memory\n");
+               panic("Failed to request rcu memory");
 
        /* remap rcu register range */
        ltq_rcu_membase = ioremap_nocache(ltq_rcu_resource.start,
                                resource_size(&ltq_rcu_resource));
        if (!ltq_rcu_membase)
-               panic("Failed to remap rcu memory\n");
+               panic("Failed to remap rcu memory");
 
        _machine_restart = ltq_machine_restart;
        _machine_halt = ltq_machine_halt;
index daa81f7284ac89a5411b88d86f77ff6df1585f55..cf7895db0739023629992e82e425fbf74389eb95 100644 (file)
@@ -223,7 +223,7 @@ static void __cpuinit probe_octeon(void)
                break;
 
        default:
-               panic("Unsupported Cavium Networks CPU type\n");
+               panic("Unsupported Cavium Networks CPU type");
                break;
        }
 
index 5d530f89d87223e86965eb0b013923a461263d32..d37be36dc659b4df1f3b22787f84c6908bc5eb45 100644 (file)
@@ -162,7 +162,7 @@ msi_irq_allocated:
                msg.address_hi = (0 + CVMX_NPEI_PCIE_MSI_RCV) >> 32;
                break;
        default:
-               panic("arch_setup_msi_irq: Invalid octeon_dma_bar_type\n");
+               panic("arch_setup_msi_irq: Invalid octeon_dma_bar_type");
        }
        msg.data = irq - OCTEON_IRQ_MSI_BIT0;
 
index 655308a4e1cda2c02c6d63f9202531cc7ffaabd8..7a834b2f8a5f0b9dcaaad87672eff98d42d906b3 100644 (file)
@@ -209,7 +209,7 @@ void __init prom_init(void)
        default:
                /* we don't recognize the machine */
                mips_machtype  = MACH_UNKNOWN;
-               panic("***Bogosity factor five***, exiting\n");
+               panic("***Bogosity factor five***, exiting");
                break;
        }
 
index f90dce315e0477b960cd68e01002794612bbb101..ec3782d318940fe33fcba37c2c580979e5f95f6c 100644 (file)
@@ -73,7 +73,7 @@ static inline int alloc_level(int cpu, int irq)
 
        level = find_first_zero_bit(hub->irq_alloc_mask, LEVELS_PER_SLICE);
        if (level >= LEVELS_PER_SLICE)
-               panic("Cpu %d flooded with devices\n", cpu);
+               panic("Cpu %d flooded with devices", cpu);
 
        __set_bit(level, hub->irq_alloc_mask);
        si->level_to_irq[level] = irq;
@@ -96,7 +96,7 @@ static inline int find_level(cpuid_t *cpunum, int irq)
                        }
        }
 
-       panic("Could not identify cpu/level for irq %d\n", irq);
+       panic("Could not identify cpu/level for irq %d", irq);
 }
 
 /*