Skip to content

Commit ab75dc0

Browse files
committed
MIPS: Fix up inconsistency in panic() string argument.
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>
1 parent 864c6c2 commit ab75dc0

19 files changed

Lines changed: 40 additions & 40 deletions

File tree

‎arch/mips/ar7/platform.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -536,7 +536,7 @@ static int __init ar7_register_uarts(void)
536536

537537
bus_clk = clk_get(NULL, "bus");
538538
if (IS_ERR(bus_clk))
539-
panic("unable to get bus clk\n");
539+
panic("unable to get bus clk");
540540

541541
uart_port.type = PORT_AR7;
542542
uart_port.uartclk = clk_get_rate(bus_clk) / 2;

‎arch/mips/ar7/setup.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ void __init plat_mem_setup(void)
9696

9797
io_base = (unsigned long)ioremap(AR7_REGS_BASE, 0x10000);
9898
if (!io_base)
99-
panic("Can't remap IO base!\n");
99+
panic("Can't remap IO base!");
100100
set_io_port_base(io_base);
101101

102102
prom_meminit();

‎arch/mips/ath79/setup.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ static void __init ath79_detect_sys_type(void)
134134
break;
135135

136136
default:
137-
panic("ath79: unknown SoC, id:0x%08x\n", id);
137+
panic("ath79: unknown SoC, id:0x%08x", id);
138138
}
139139

140140
sprintf(ath79_sys_type, "Atheros AR%s rev %u", chip, rev);

‎arch/mips/bcm47xx/setup.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ static void __init bcm47xx_register_ssb(void)
289289
err = ssb_bus_ssbbus_register(&(bcm47xx_bus.ssb), SSB_ENUM_BASE,
290290
bcm47xx_get_invariants);
291291
if (err)
292-
panic("Failed to initialize SSB bus (err %d)\n", err);
292+
panic("Failed to initialize SSB bus (err %d)", err);
293293

294294
mcore = &bcm47xx_bus.ssb.mipscore;
295295
if (nvram_getenv("kernel_args", buf, sizeof(buf)) >= 0) {
@@ -314,7 +314,7 @@ static void __init bcm47xx_register_bcma(void)
314314

315315
err = bcma_host_soc_register(&bcm47xx_bus.bcma);
316316
if (err)
317-
panic("Failed to initialize BCMA bus (err %d)\n", err);
317+
panic("Failed to initialize BCMA bus (err %d)", err);
318318
}
319319
#endif
320320

‎arch/mips/cavium-octeon/setup.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -767,19 +767,19 @@ void prom_free_prom_memory(void)
767767
: "=r" (insn) : : "$31", "memory");
768768

769769
if ((insn >> 26) != 0x33)
770-
panic("No PREF instruction at Core-14449 probe point.\n");
770+
panic("No PREF instruction at Core-14449 probe point.");
771771

772772
if (((insn >> 16) & 0x1f) != 28)
773773
panic("Core-14449 WAR not in place (%04x).\n"
774-
"Please build kernel with proper options (CONFIG_CAVIUM_CN63XXP1).\n", insn);
774+
"Please build kernel with proper options (CONFIG_CAVIUM_CN63XXP1).", insn);
775775
}
776776
#ifdef CONFIG_CAVIUM_DECODE_RSL
777777
cvmx_interrupt_rsl_enable();
778778

779779
/* Add an interrupt handler for general failures. */
780780
if (request_irq(OCTEON_IRQ_RML, octeon_rlm_interrupt, IRQF_SHARED,
781781
"RML/RSL", octeon_rlm_interrupt)) {
782-
panic("Unable to request_irq(OCTEON_IRQ_RML)\n");
782+
panic("Unable to request_irq(OCTEON_IRQ_RML)");
783783
}
784784
#endif
785785
}

‎arch/mips/cavium-octeon/smp.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ void octeon_prepare_cpus(unsigned int max_cpus)
210210
if (request_irq(OCTEON_IRQ_MBOX0, mailbox_interrupt,
211211
IRQF_PERCPU | IRQF_NO_THREAD, "SMP-IPI",
212212
mailbox_interrupt)) {
213-
panic("Cannot request_irq(OCTEON_IRQ_MBOX0)\n");
213+
panic("Cannot request_irq(OCTEON_IRQ_MBOX0)");
214214
}
215215
}
216216

‎arch/mips/jz4740/board-qi_lb60.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,7 @@ static int __init qi_lb60_board_setup(void)
488488
board_gpio_setup();
489489

490490
if (qi_lb60_init_platform_devices())
491-
panic("Failed to initialize platform devices\n");
491+
panic("Failed to initialize platform devices");
492492

493493
return 0;
494494
}

‎arch/mips/kernel/smtc.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -559,7 +559,7 @@ void smtc_prepare_cpus(int cpus)
559559

560560
pipi = kmalloc(nipi *sizeof(struct smtc_ipi), GFP_KERNEL);
561561
if (pipi == NULL)
562-
panic("kmalloc of IPI message buffers failed\n");
562+
panic("kmalloc of IPI message buffers failed");
563563
else
564564
printk("IPI buffer pool of %d buffers\n", nipi);
565565
for (i = 0; i < nipi; i++) {
@@ -813,7 +813,7 @@ void smtc_send_ipi(int cpu, int type, unsigned int action)
813813
if (pipi == NULL) {
814814
bust_spinlocks(1);
815815
mips_mt_regdump(dvpe());
816-
panic("IPI Msg. Buffers Depleted\n");
816+
panic("IPI Msg. Buffers Depleted");
817817
}
818818
pipi->type = type;
819819
pipi->arg = (void *)action;

‎arch/mips/kernel/traps.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ void __noreturn die(const char *str, struct pt_regs *regs)
400400
panic("Fatal exception in interrupt");
401401

402402
if (panic_on_oops) {
403-
printk(KERN_EMERG "Fatal exception: panic in 5 seconds\n");
403+
printk(KERN_EMERG "Fatal exception: panic in 5 seconds");
404404
ssleep(5);
405405
panic("Fatal exception");
406406
}
@@ -1150,7 +1150,7 @@ asmlinkage void do_mt(struct pt_regs *regs)
11501150
asmlinkage void do_dsp(struct pt_regs *regs)
11511151
{
11521152
if (cpu_has_dsp)
1153-
panic("Unexpected DSP exception\n");
1153+
panic("Unexpected DSP exception");
11541154

11551155
force_sig(SIGILL, current);
11561156
}

‎arch/mips/lantiq/clk.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,11 +134,11 @@ void __init plat_time_init(void)
134134
struct clk *clk;
135135

136136
if (insert_resource(&iomem_resource, &ltq_cgu_resource) < 0)
137-
panic("Failed to insert cgu memory\n");
137+
panic("Failed to insert cgu memory");
138138

139139
if (request_mem_region(ltq_cgu_resource.start,
140140
resource_size(&ltq_cgu_resource), "cgu") < 0)
141-
panic("Failed to request cgu memory\n");
141+
panic("Failed to request cgu memory");
142142

143143
ltq_cgu_membase = ioremap_nocache(ltq_cgu_resource.start,
144144
resource_size(&ltq_cgu_resource));

0 commit comments

Comments
 (0)