Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+40 -40
+1 -1
arch/mips/ar7/platform.c
··· 536 536 537 537 bus_clk = clk_get(NULL, "bus"); 538 538 if (IS_ERR(bus_clk)) 539 - panic("unable to get bus clk\n"); 539 + panic("unable to get bus clk"); 540 540 541 541 uart_port.type = PORT_AR7; 542 542 uart_port.uartclk = clk_get_rate(bus_clk) / 2;
+1 -1
arch/mips/ar7/setup.c
··· 96 96 97 97 io_base = (unsigned long)ioremap(AR7_REGS_BASE, 0x10000); 98 98 if (!io_base) 99 - panic("Can't remap IO base!\n"); 99 + panic("Can't remap IO base!"); 100 100 set_io_port_base(io_base); 101 101 102 102 prom_meminit();
+1 -1
arch/mips/ath79/setup.c
··· 134 134 break; 135 135 136 136 default: 137 - panic("ath79: unknown SoC, id:0x%08x\n", id); 137 + panic("ath79: unknown SoC, id:0x%08x", id); 138 138 } 139 139 140 140 sprintf(ath79_sys_type, "Atheros AR%s rev %u", chip, rev);
+2 -2
arch/mips/bcm47xx/setup.c
··· 289 289 err = ssb_bus_ssbbus_register(&(bcm47xx_bus.ssb), SSB_ENUM_BASE, 290 290 bcm47xx_get_invariants); 291 291 if (err) 292 - panic("Failed to initialize SSB bus (err %d)\n", err); 292 + panic("Failed to initialize SSB bus (err %d)", err); 293 293 294 294 mcore = &bcm47xx_bus.ssb.mipscore; 295 295 if (nvram_getenv("kernel_args", buf, sizeof(buf)) >= 0) { ··· 314 314 315 315 err = bcma_host_soc_register(&bcm47xx_bus.bcma); 316 316 if (err) 317 - panic("Failed to initialize BCMA bus (err %d)\n", err); 317 + panic("Failed to initialize BCMA bus (err %d)", err); 318 318 } 319 319 #endif 320 320
+3 -3
arch/mips/cavium-octeon/setup.c
··· 767 767 : "=r" (insn) : : "$31", "memory"); 768 768 769 769 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."); 771 771 772 772 if (((insn >> 16) & 0x1f) != 28) 773 773 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); 775 775 } 776 776 #ifdef CONFIG_CAVIUM_DECODE_RSL 777 777 cvmx_interrupt_rsl_enable(); ··· 779 779 /* Add an interrupt handler for general failures. */ 780 780 if (request_irq(OCTEON_IRQ_RML, octeon_rlm_interrupt, IRQF_SHARED, 781 781 "RML/RSL", octeon_rlm_interrupt)) { 782 - panic("Unable to request_irq(OCTEON_IRQ_RML)\n"); 782 + panic("Unable to request_irq(OCTEON_IRQ_RML)"); 783 783 } 784 784 #endif 785 785 }
+1 -1
arch/mips/cavium-octeon/smp.c
··· 210 210 if (request_irq(OCTEON_IRQ_MBOX0, mailbox_interrupt, 211 211 IRQF_PERCPU | IRQF_NO_THREAD, "SMP-IPI", 212 212 mailbox_interrupt)) { 213 - panic("Cannot request_irq(OCTEON_IRQ_MBOX0)\n"); 213 + panic("Cannot request_irq(OCTEON_IRQ_MBOX0)"); 214 214 } 215 215 } 216 216
+1 -1
arch/mips/jz4740/board-qi_lb60.c
··· 488 488 board_gpio_setup(); 489 489 490 490 if (qi_lb60_init_platform_devices()) 491 - panic("Failed to initialize platform devices\n"); 491 + panic("Failed to initialize platform devices"); 492 492 493 493 return 0; 494 494 }
+2 -2
arch/mips/kernel/smtc.c
··· 559 559 560 560 pipi = kmalloc(nipi *sizeof(struct smtc_ipi), GFP_KERNEL); 561 561 if (pipi == NULL) 562 - panic("kmalloc of IPI message buffers failed\n"); 562 + panic("kmalloc of IPI message buffers failed"); 563 563 else 564 564 printk("IPI buffer pool of %d buffers\n", nipi); 565 565 for (i = 0; i < nipi; i++) { ··· 813 813 if (pipi == NULL) { 814 814 bust_spinlocks(1); 815 815 mips_mt_regdump(dvpe()); 816 - panic("IPI Msg. Buffers Depleted\n"); 816 + panic("IPI Msg. Buffers Depleted"); 817 817 } 818 818 pipi->type = type; 819 819 pipi->arg = (void *)action;
+2 -2
arch/mips/kernel/traps.c
··· 400 400 panic("Fatal exception in interrupt"); 401 401 402 402 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"); 404 404 ssleep(5); 405 405 panic("Fatal exception"); 406 406 } ··· 1150 1150 asmlinkage void do_dsp(struct pt_regs *regs) 1151 1151 { 1152 1152 if (cpu_has_dsp) 1153 - panic("Unexpected DSP exception\n"); 1153 + panic("Unexpected DSP exception"); 1154 1154 1155 1155 force_sig(SIGILL, current); 1156 1156 }
+2 -2
arch/mips/lantiq/clk.c
··· 134 134 struct clk *clk; 135 135 136 136 if (insert_resource(&iomem_resource, &ltq_cgu_resource) < 0) 137 - panic("Failed to insert cgu memory\n"); 137 + panic("Failed to insert cgu memory"); 138 138 139 139 if (request_mem_region(ltq_cgu_resource.start, 140 140 resource_size(&ltq_cgu_resource), "cgu") < 0) 141 - panic("Failed to request cgu memory\n"); 141 + panic("Failed to request cgu memory"); 142 142 143 143 ltq_cgu_membase = ioremap_nocache(ltq_cgu_resource.start, 144 144 resource_size(&ltq_cgu_resource));
+6 -6
arch/mips/lantiq/irq.c
··· 249 249 int i; 250 250 251 251 if (insert_resource(&iomem_resource, &ltq_icu_resource) < 0) 252 - panic("Failed to insert icu memory\n"); 252 + panic("Failed to insert icu memory"); 253 253 254 254 if (request_mem_region(ltq_icu_resource.start, 255 255 resource_size(&ltq_icu_resource), "icu") < 0) 256 - panic("Failed to request icu memory\n"); 256 + panic("Failed to request icu memory"); 257 257 258 258 ltq_icu_membase = ioremap_nocache(ltq_icu_resource.start, 259 259 resource_size(&ltq_icu_resource)); 260 260 if (!ltq_icu_membase) 261 - panic("Failed to remap icu memory\n"); 261 + panic("Failed to remap icu memory"); 262 262 263 263 if (insert_resource(&iomem_resource, &ltq_eiu_resource) < 0) 264 - panic("Failed to insert eiu memory\n"); 264 + panic("Failed to insert eiu memory"); 265 265 266 266 if (request_mem_region(ltq_eiu_resource.start, 267 267 resource_size(&ltq_eiu_resource), "eiu") < 0) 268 - panic("Failed to request eiu memory\n"); 268 + panic("Failed to request eiu memory"); 269 269 270 270 ltq_eiu_membase = ioremap_nocache(ltq_eiu_resource.start, 271 271 resource_size(&ltq_eiu_resource)); 272 272 if (!ltq_eiu_membase) 273 - panic("Failed to remap eiu memory\n"); 273 + panic("Failed to remap eiu memory"); 274 274 275 275 /* make sure all irqs are turned off by default */ 276 276 for (i = 0; i < 5; i++)
+3 -3
arch/mips/lantiq/xway/dma.c
··· 222 222 223 223 /* insert and request the memory region */ 224 224 if (insert_resource(&iomem_resource, &ltq_dma_resource) < 0) 225 - panic("Failed to insert dma memory\n"); 225 + panic("Failed to insert dma memory"); 226 226 227 227 if (request_mem_region(ltq_dma_resource.start, 228 228 resource_size(&ltq_dma_resource), "dma") < 0) 229 - panic("Failed to request dma memory\n"); 229 + panic("Failed to request dma memory"); 230 230 231 231 /* remap dma register range */ 232 232 ltq_dma_membase = ioremap_nocache(ltq_dma_resource.start, 233 233 resource_size(&ltq_dma_resource)); 234 234 if (!ltq_dma_membase) 235 - panic("Failed to remap dma memory\n"); 235 + panic("Failed to remap dma memory"); 236 236 237 237 /* power up and reset the dma engine */ 238 238 ltq_pmu_enable(PMU_DMA);
+3 -3
arch/mips/lantiq/xway/ebu.c
··· 32 32 { 33 33 /* insert and request the memory region */ 34 34 if (insert_resource(&iomem_resource, &ltq_ebu_resource) < 0) 35 - panic("Failed to insert ebu memory\n"); 35 + panic("Failed to insert ebu memory"); 36 36 37 37 if (request_mem_region(ltq_ebu_resource.start, 38 38 resource_size(&ltq_ebu_resource), "ebu") < 0) 39 - panic("Failed to request ebu memory\n"); 39 + panic("Failed to request ebu memory"); 40 40 41 41 /* remap ebu register range */ 42 42 ltq_ebu_membase = ioremap_nocache(ltq_ebu_resource.start, 43 43 resource_size(&ltq_ebu_resource)); 44 44 if (!ltq_ebu_membase) 45 - panic("Failed to remap ebu memory\n"); 45 + panic("Failed to remap ebu memory"); 46 46 47 47 /* make sure to unprotect the memory region where flash is located */ 48 48 ltq_ebu_w32(ltq_ebu_r32(LTQ_EBU_BUSCON0) & ~EBU_WRDIS, LTQ_EBU_BUSCON0);
+4 -4
arch/mips/lantiq/xway/pmu.c
··· 40 40 do {} while (--err && (ltq_pmu_r32(LTQ_PMU_PWDSR) & module)); 41 41 42 42 if (!err) 43 - panic("activating PMU module failed!\n"); 43 + panic("activating PMU module failed!"); 44 44 } 45 45 EXPORT_SYMBOL(ltq_pmu_enable); 46 46 ··· 53 53 int __init ltq_pmu_init(void) 54 54 { 55 55 if (insert_resource(&iomem_resource, &ltq_pmu_resource) < 0) 56 - panic("Failed to insert pmu memory\n"); 56 + panic("Failed to insert pmu memory"); 57 57 58 58 if (request_mem_region(ltq_pmu_resource.start, 59 59 resource_size(&ltq_pmu_resource), "pmu") < 0) 60 - panic("Failed to request pmu memory\n"); 60 + panic("Failed to request pmu memory"); 61 61 62 62 ltq_pmu_membase = ioremap_nocache(ltq_pmu_resource.start, 63 63 resource_size(&ltq_pmu_resource)); 64 64 if (!ltq_pmu_membase) 65 - panic("Failed to remap pmu memory\n"); 65 + panic("Failed to remap pmu memory"); 66 66 return 0; 67 67 } 68 68
+3 -3
arch/mips/lantiq/xway/reset.c
··· 69 69 { 70 70 /* insert and request the memory region */ 71 71 if (insert_resource(&iomem_resource, &ltq_rcu_resource) < 0) 72 - panic("Failed to insert rcu memory\n"); 72 + panic("Failed to insert rcu memory"); 73 73 74 74 if (request_mem_region(ltq_rcu_resource.start, 75 75 resource_size(&ltq_rcu_resource), "rcu") < 0) 76 - panic("Failed to request rcu memory\n"); 76 + panic("Failed to request rcu memory"); 77 77 78 78 /* remap rcu register range */ 79 79 ltq_rcu_membase = ioremap_nocache(ltq_rcu_resource.start, 80 80 resource_size(&ltq_rcu_resource)); 81 81 if (!ltq_rcu_membase) 82 - panic("Failed to remap rcu memory\n"); 82 + panic("Failed to remap rcu memory"); 83 83 84 84 _machine_restart = ltq_machine_restart; 85 85 _machine_halt = ltq_machine_halt;
+1 -1
arch/mips/mm/c-octeon.c
··· 223 223 break; 224 224 225 225 default: 226 - panic("Unsupported Cavium Networks CPU type\n"); 226 + panic("Unsupported Cavium Networks CPU type"); 227 227 break; 228 228 } 229 229
+1 -1
arch/mips/pci/msi-octeon.c
··· 162 162 msg.address_hi = (0 + CVMX_NPEI_PCIE_MSI_RCV) >> 32; 163 163 break; 164 164 default: 165 - panic("arch_setup_msi_irq: Invalid octeon_dma_bar_type\n"); 165 + panic("arch_setup_msi_irq: Invalid octeon_dma_bar_type"); 166 166 } 167 167 msg.data = irq - OCTEON_IRQ_MSI_BIT0; 168 168
+1 -1
arch/mips/pmc-sierra/msp71xx/msp_setup.c
··· 209 209 default: 210 210 /* we don't recognize the machine */ 211 211 mips_machtype = MACH_UNKNOWN; 212 - panic("***Bogosity factor five***, exiting\n"); 212 + panic("***Bogosity factor five***, exiting"); 213 213 break; 214 214 } 215 215
+2 -2
arch/mips/sgi-ip27/ip27-irq.c
··· 73 73 74 74 level = find_first_zero_bit(hub->irq_alloc_mask, LEVELS_PER_SLICE); 75 75 if (level >= LEVELS_PER_SLICE) 76 - panic("Cpu %d flooded with devices\n", cpu); 76 + panic("Cpu %d flooded with devices", cpu); 77 77 78 78 __set_bit(level, hub->irq_alloc_mask); 79 79 si->level_to_irq[level] = irq; ··· 96 96 } 97 97 } 98 98 99 - panic("Could not identify cpu/level for irq %d\n", irq); 99 + panic("Could not identify cpu/level for irq %d", irq); 100 100 } 101 101 102 102 /*