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

powerpc: Use pr_warn instead of pr_warning

At some point, pr_warning will be removed so all logging messages use
a consistent <prefix>_warn style.

Update arch/powerpc/

Miscellanea:

o Coalesce formats
o Realign arguments
o Use %s, __func__ instead of embedded function names
o Remove unnecessary line continuations

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Geoff Levand <geoff@infradead.org>
[mpe: Rebase due to some %pOF changes.]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>

authored by

Joe Perches and committed by
Michael Ellerman
f2c2cbcc ae64f9bd

+56 -65
+2 -2
arch/powerpc/kernel/pci-common.c
··· 1276 1276 i + PCI_BRIDGE_RESOURCES) == 0) 1277 1277 continue; 1278 1278 } 1279 - pr_warning("PCI: Cannot allocate resource region " 1280 - "%d of PCI bridge %d, will remap\n", i, bus->number); 1279 + pr_warn("PCI: Cannot allocate resource region %d of PCI bridge %d, will remap\n", 1280 + i, bus->number); 1281 1281 clear_resource: 1282 1282 /* The resource might be figured out when doing 1283 1283 * reassignment based on the resources required
+2 -3
arch/powerpc/mm/init_64.c
··· 214 214 215 215 rc = vmemmap_create_mapping(start, page_size, __pa(p)); 216 216 if (rc < 0) { 217 - pr_warning( 218 - "vmemmap_populate: Unable to create vmemmap mapping: %d\n", 219 - rc); 217 + pr_warn("%s: Unable to create vmemmap mapping: %d\n", 218 + __func__, rc); 220 219 return -EFAULT; 221 220 } 222 221 }
+1 -2
arch/powerpc/mm/mem.c
··· 138 138 start = (unsigned long)__va(start); 139 139 rc = create_section_mapping(start, start + size); 140 140 if (rc) { 141 - pr_warning( 142 - "Unable to create mapping for hot added memory 0x%llx..0x%llx: %d\n", 141 + pr_warn("Unable to create mapping for hot added memory 0x%llx..0x%llx: %d\n", 143 142 start, start + size, rc); 144 143 return -EFAULT; 145 144 }
+2 -2
arch/powerpc/platforms/512x/mpc512x_shared.c
··· 387 387 if (fp) 388 388 return *fp; 389 389 390 - pr_warning("no %s property in %pOF node, defaulting to %d\n", 391 - prop_name, np, DEFAULT_FIFO_SIZE); 390 + pr_warn("no %s property in %pOF node, defaulting to %d\n", 391 + prop_name, np, DEFAULT_FIFO_SIZE); 392 392 393 393 return DEFAULT_FIFO_SIZE; 394 394 }
+3 -4
arch/powerpc/platforms/85xx/socrates_fpga_pic.c
··· 252 252 /* type is configurable */ 253 253 if (intspec[1] != IRQ_TYPE_LEVEL_LOW && 254 254 intspec[1] != IRQ_TYPE_LEVEL_HIGH) { 255 - pr_warning("FPGA PIC: invalid irq type, " 256 - "setting default active low\n"); 255 + pr_warn("FPGA PIC: invalid irq type, setting default active low\n"); 257 256 *out_flags = IRQ_TYPE_LEVEL_LOW; 258 257 } else { 259 258 *out_flags = intspec[1]; ··· 266 267 if (intspec[2] <= 2) 267 268 fpga_irq->irq_line = intspec[2]; 268 269 else 269 - pr_warning("FPGA PIC: invalid irq routing\n"); 270 + pr_warn("FPGA PIC: invalid irq routing\n"); 270 271 271 272 return 0; 272 273 } ··· 292 293 for (i = 0; i < 3; i++) { 293 294 socrates_fpga_irqs[i] = irq_of_parse_and_map(pic, i); 294 295 if (!socrates_fpga_irqs[i]) { 295 - pr_warning("FPGA PIC: can't get irq%d.\n", i); 296 + pr_warn("FPGA PIC: can't get irq%d\n", i); 296 297 continue; 297 298 } 298 299 irq_set_chained_handler(socrates_fpga_irqs[i],
+1 -1
arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
··· 101 101 102 102 /* Be nice and don't give silent boot death. Delete this in 2.6.27 */ 103 103 if (of_machine_is_compatible("mpc86xx")) { 104 - pr_warning("WARNING: your dts/dtb is old. You must update before the next kernel release\n"); 104 + pr_warn("WARNING: your dts/dtb is old. You must update before the next kernel release.\n"); 105 105 return 1; 106 106 } 107 107
+2 -2
arch/powerpc/platforms/pasemi/dma_lib.c
··· 589 589 pasemi_write_dma_reg(PAS_DMA_COM_RXCMD, 0); 590 590 while (pasemi_read_dma_reg(PAS_DMA_COM_RXSTA) & 1) { 591 591 if (time_after(jiffies, timeout)) { 592 - pr_warning("Warning: Could not disable RX section\n"); 592 + pr_warn("Warning: Could not disable RX section\n"); 593 593 break; 594 594 } 595 595 } ··· 598 598 pasemi_write_dma_reg(PAS_DMA_COM_TXCMD, 0); 599 599 while (pasemi_read_dma_reg(PAS_DMA_COM_TXSTA) & 1) { 600 600 if (time_after(jiffies, timeout)) { 601 - pr_warning("Warning: Could not disable TX section\n"); 601 + pr_warn("Warning: Could not disable TX section\n"); 602 602 break; 603 603 } 604 604 }
+4 -4
arch/powerpc/platforms/powernv/opal.c
··· 239 239 struct notifier_block *nb) 240 240 { 241 241 if (!nb || msg_type >= OPAL_MSG_TYPE_MAX) { 242 - pr_warning("%s: Invalid arguments, msg_type:%d\n", 243 - __func__, msg_type); 242 + pr_warn("%s: Invalid arguments, msg_type:%d\n", 243 + __func__, msg_type); 244 244 return -EINVAL; 245 245 } 246 246 ··· 281 281 282 282 /* check for errors. */ 283 283 if (ret) { 284 - pr_warning("%s: Failed to retrieve opal message, err=%lld\n", 285 - __func__, ret); 284 + pr_warn("%s: Failed to retrieve opal message, err=%lld\n", 285 + __func__, ret); 286 286 return; 287 287 } 288 288
+5 -5
arch/powerpc/platforms/powernv/pci-ioda.c
··· 1059 1059 1060 1060 pe = pnv_ioda_alloc_pe(phb); 1061 1061 if (!pe) { 1062 - pr_warning("%s: Not enough PE# available, disabling device\n", 1063 - pci_name(dev)); 1062 + pr_warn("%s: Not enough PE# available, disabling device\n", 1063 + pci_name(dev)); 1064 1064 return NULL; 1065 1065 } 1066 1066 ··· 1164 1164 pe = pnv_ioda_alloc_pe(phb); 1165 1165 1166 1166 if (!pe) { 1167 - pr_warning("%s: Not enough PE# available for PCI bus %04x:%02x\n", 1167 + pr_warn("%s: Not enough PE# available for PCI bus %04x:%02x\n", 1168 1168 __func__, pci_domain_nr(bus), bus->number); 1169 1169 return NULL; 1170 1170 } ··· 3293 3293 sprintf(name, "PCI%04x", hose->global_number); 3294 3294 phb->dbgfs = debugfs_create_dir(name, powerpc_debugfs_root); 3295 3295 if (!phb->dbgfs) { 3296 - pr_warning("%s: Error on creating debugfs on PHB#%x\n", 3296 + pr_warn("%s: Error on creating debugfs on PHB#%x\n", 3297 3297 __func__, hose->global_number); 3298 3298 continue; 3299 3299 } ··· 4026 4026 /* Reset IODA tables to a clean state */ 4027 4027 rc = opal_pci_reset(phb_id, OPAL_RESET_PCI_IODA_TABLE, OPAL_ASSERT_RESET); 4028 4028 if (rc) 4029 - pr_warning(" OPAL Error %ld performing IODA table reset !\n", rc); 4029 + pr_warn(" OPAL Error %ld performing IODA table reset !\n", rc); 4030 4030 4031 4031 /* 4032 4032 * If we're running in kdump kernel, the previous kernel never
+5 -7
arch/powerpc/platforms/ps3/device-init.c
··· 663 663 if (rem) 664 664 break; 665 665 } 666 - pr_warning("%s:%u: device %llu:%llu not found\n", __func__, __LINE__, 667 - bus_id, dev_id); 666 + pr_warn("%s:%u: device %llu:%llu not found\n", 667 + __func__, __LINE__, bus_id, dev_id); 668 668 return; 669 669 670 670 found: ··· 859 859 860 860 if (notify_event->event_type != notify_region_probe || 861 861 notify_event->bus_id != dev.sbd.bus_id) { 862 - pr_warning("%s:%u: bad notify_event: event %llu, " 863 - "dev_id %llu, dev_type %llu\n", 864 - __func__, __LINE__, notify_event->event_type, 865 - notify_event->dev_id, 866 - notify_event->dev_type); 862 + pr_warn("%s:%u: bad notify_event: event %llu, dev_id %llu, dev_type %llu\n", 863 + __func__, __LINE__, notify_event->event_type, 864 + notify_event->dev_id, notify_event->dev_type); 867 865 continue; 868 866 } 869 867
+2 -2
arch/powerpc/platforms/ps3/mm.c
··· 607 607 r->ioid, 608 608 iopte_flag); 609 609 if (result) { 610 - pr_warning("%s:%d: lv1_put_iopte failed: %s\n", 611 - __func__, __LINE__, ps3_result(result)); 610 + pr_warn("%s:%d: lv1_put_iopte failed: %s\n", 611 + __func__, __LINE__, ps3_result(result)); 612 612 goto fail_map; 613 613 } 614 614 DBG("%s: pg=%d bus=%#lx, lpar=%#lx, ioid=%#x\n", __func__,
+1 -1
arch/powerpc/platforms/ps3/os-area.c
··· 699 699 700 700 error = update_flash_db(); 701 701 if (error) 702 - pr_warning("%s: Could not update FLASH ROM\n", __func__); 702 + pr_warn("%s: Could not update FLASH ROM\n", __func__); 703 703 704 704 pr_debug(" <- %s:%d\n", __func__, __LINE__); 705 705 }
+4 -4
arch/powerpc/platforms/pseries/iommu.c
··· 816 816 ret = tce_clearrange_multi_pSeriesLP(0, 817 817 1ULL << (be32_to_cpu(dwp->window_shift) - PAGE_SHIFT), dwp); 818 818 if (ret) 819 - pr_warning("%pOF failed to clear tces in window.\n", 820 - np); 819 + pr_warn("%pOF failed to clear tces in window.\n", 820 + np); 821 821 else 822 822 pr_debug("%pOF successfully cleared tces in window.\n", 823 823 np); 824 824 825 825 ret = rtas_call(ddw_avail[2], 1, 1, NULL, liobn); 826 826 if (ret) 827 - pr_warning("%pOF: failed to remove direct window: rtas returned " 827 + pr_warn("%pOF: failed to remove direct window: rtas returned " 828 828 "%d to ibm,remove-pe-dma-window(%x) %llx\n", 829 829 np, ret, ddw_avail[2], liobn); 830 830 else ··· 836 836 if (remove_prop) 837 837 ret = of_remove_property(np, win64); 838 838 if (ret) 839 - pr_warning("%pOF: failed to remove direct window property: %d\n", 839 + pr_warn("%pOF: failed to remove direct window property: %d\n", 840 840 np, ret); 841 841 } 842 842
+2 -2
arch/powerpc/platforms/pseries/setup.c
··· 371 371 mdelay(get_longbusy_msecs(rc)); 372 372 } 373 373 if (rc != H_SUCCESS) 374 - pr_warning("Warning: Failed to disable relocation on " 375 - "exceptions: %ld\n", rc); 374 + pr_warn("Warning: Failed to disable relocation on exceptions: %ld\n", 375 + rc); 376 376 } 377 377 EXPORT_SYMBOL(pseries_disable_reloc_on_exc); 378 378
+4 -4
arch/powerpc/sysdev/fsl_pci.c
··· 448 448 #endif 449 449 /* adjusting outbound windows could reclaim space in mem map */ 450 450 if (paddr_hi < 0xffffffffull) 451 - pr_warning("%pOF: WARNING: Outbound window cfg leaves " 451 + pr_warn("%pOF: WARNING: Outbound window cfg leaves " 452 452 "gaps in memory map. Adjusting the memory map " 453 453 "could reduce unnecessary bounce buffering.\n", 454 454 hose->dn); ··· 531 531 dev = pdev->dev.of_node; 532 532 533 533 if (!of_device_is_available(dev)) { 534 - pr_warning("%pOF: disabled\n", dev); 534 + pr_warn("%pOF: disabled\n", dev); 535 535 return -ENODEV; 536 536 } 537 537 ··· 808 808 is_mpc83xx_pci = 1; 809 809 810 810 if (!of_device_is_available(dev)) { 811 - pr_warning("%pOF: disabled by the firmware.\n", 812 - dev); 811 + pr_warn("%pOF: disabled by the firmware.\n", 812 + dev); 813 813 return -ENODEV; 814 814 } 815 815 pr_debug("Adding PCI host bridge %pOF\n", dev);
+4 -6
arch/powerpc/sysdev/mpic.c
··· 1008 1008 if (hw == mpic->spurious_vec) 1009 1009 return -EINVAL; 1010 1010 if (mpic->protected && test_bit(hw, mpic->protected)) { 1011 - pr_warning("mpic: Mapping of source 0x%x failed, " 1012 - "source protected by firmware !\n",\ 1013 - (unsigned int)hw); 1011 + pr_warn("mpic: Mapping of source 0x%x failed, source protected by firmware !\n", 1012 + (unsigned int)hw); 1014 1013 return -EPERM; 1015 1014 } 1016 1015 ··· 1039 1040 return 0; 1040 1041 1041 1042 if (hw >= mpic->num_sources) { 1042 - pr_warning("mpic: Mapping of source 0x%x failed, " 1043 - "source out of range !\n",\ 1044 - (unsigned int)hw); 1043 + pr_warn("mpic: Mapping of source 0x%x failed, source out of range !\n", 1044 + (unsigned int)hw); 1045 1045 return -EINVAL; 1046 1046 } 1047 1047
+4 -6
arch/powerpc/sysdev/xics/icp-native.c
··· 241 241 cpu, hw_id); 242 242 243 243 if (!request_mem_region(addr, size, rname)) { 244 - pr_warning("icp_native: Could not reserve ICP MMIO" 245 - " for CPU %d, interrupt server #0x%x\n", 246 - cpu, hw_id); 244 + pr_warn("icp_native: Could not reserve ICP MMIO for CPU %d, interrupt server #0x%x\n", 245 + cpu, hw_id); 247 246 return -EBUSY; 248 247 } 249 248 250 249 icp_native_regs[cpu] = ioremap(addr, size); 251 250 kvmppc_set_xics_phys(cpu, addr); 252 251 if (!icp_native_regs[cpu]) { 253 - pr_warning("icp_native: Failed ioremap for CPU %d, " 254 - "interrupt server #0x%x, addr %#lx\n", 255 - cpu, hw_id, addr); 252 + pr_warn("icp_native: Failed ioremap for CPU %d, interrupt server #0x%x, addr %#lx\n", 253 + cpu, hw_id, addr); 256 254 release_mem_region(addr, size); 257 255 return -ENOMEM; 258 256 }
+2 -2
arch/powerpc/sysdev/xics/ics-opal.c
··· 131 131 132 132 wanted_server = xics_get_irq_server(d->irq, cpumask, 1); 133 133 if (wanted_server < 0) { 134 - pr_warning("%s: No online cpus in the mask %*pb for irq %d\n", 135 - __func__, cpumask_pr_args(cpumask), d->irq); 134 + pr_warn("%s: No online cpus in the mask %*pb for irq %d\n", 135 + __func__, cpumask_pr_args(cpumask), d->irq); 136 136 return -1; 137 137 } 138 138 server = ics_opal_mangle_server(wanted_server);
+2 -2
arch/powerpc/sysdev/xics/ics-rtas.c
··· 141 141 142 142 irq_server = xics_get_irq_server(d->irq, cpumask, 1); 143 143 if (irq_server == -1) { 144 - pr_warning("%s: No online cpus in the mask %*pb for irq %d\n", 145 - __func__, cpumask_pr_args(cpumask), d->irq); 144 + pr_warn("%s: No online cpus in the mask %*pb for irq %d\n", 145 + __func__, cpumask_pr_args(cpumask), d->irq); 146 146 return -1; 147 147 } 148 148
+4 -4
arch/powerpc/sysdev/xics/xics-common.c
··· 243 243 244 244 /* This is expected during cpu offline. */ 245 245 if (cpu_online(cpu)) 246 - pr_warning("IRQ %u affinity broken off cpu %u\n", 247 - virq, cpu); 246 + pr_warn("IRQ %u affinity broken off cpu %u\n", 247 + virq, cpu); 248 248 249 249 /* Reset affinity to all cpus */ 250 250 raw_spin_unlock_irqrestore(&desc->lock, flags); ··· 466 466 rc = icp_opal_init(); 467 467 } 468 468 if (rc < 0) { 469 - pr_warning("XICS: Cannot find a Presentation Controller !\n"); 469 + pr_warn("XICS: Cannot find a Presentation Controller !\n"); 470 470 return; 471 471 } 472 472 ··· 481 481 if (rc < 0) 482 482 rc = ics_opal_init(); 483 483 if (rc < 0) 484 - pr_warning("XICS: Cannot find a Source Controller !\n"); 484 + pr_warn("XICS: Cannot find a Source Controller !\n"); 485 485 486 486 /* Initialize common bits */ 487 487 xics_get_server_size();