Commit 7178d2cd authored by Joe Perches's avatar Joe Perches Committed by Ralf Baechle

mips: Convert pr_warning to pr_warn

Use the much more common pr_warn instead of pr_warning
with the goal of removing pr_warning eventually.

Other miscellanea:

o Coalesce formats
o Realign arguments
Signed-off-by: default avatarJoe Perches <joe@perches.com>
Cc: linux-mips <linux-mips@linux-mips.org>
Cc: LKML <linux-kernel@vger.kernel.org>
Patchwork: https://patchwork.linux-mips.org/patch/7935/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
parent e5067c71
...@@ -311,8 +311,7 @@ static void __init cpmac_get_mac(int instance, unsigned char *dev_addr) ...@@ -311,8 +311,7 @@ static void __init cpmac_get_mac(int instance, unsigned char *dev_addr)
&dev_addr[0], &dev_addr[1], &dev_addr[0], &dev_addr[1],
&dev_addr[2], &dev_addr[3], &dev_addr[2], &dev_addr[3],
&dev_addr[4], &dev_addr[5]) != 6) { &dev_addr[4], &dev_addr[5]) != 6) {
pr_warning("cannot parse mac address, " pr_warn("cannot parse mac address, using random address\n");
"using random address\n");
eth_random_addr(dev_addr); eth_random_addr(dev_addr);
} }
} else } else
...@@ -665,7 +664,7 @@ static int __init ar7_register_devices(void) ...@@ -665,7 +664,7 @@ static int __init ar7_register_devices(void)
res = platform_device_register(&physmap_flash); res = platform_device_register(&physmap_flash);
if (res) if (res)
pr_warning("unable to register physmap-flash: %d\n", res); pr_warn("unable to register physmap-flash: %d\n", res);
if (ar7_is_titan()) if (ar7_is_titan())
titan_fixup_devices(); titan_fixup_devices();
...@@ -673,13 +672,13 @@ static int __init ar7_register_devices(void) ...@@ -673,13 +672,13 @@ static int __init ar7_register_devices(void)
ar7_device_disable(vlynq_low_data.reset_bit); ar7_device_disable(vlynq_low_data.reset_bit);
res = platform_device_register(&vlynq_low); res = platform_device_register(&vlynq_low);
if (res) if (res)
pr_warning("unable to register vlynq-low: %d\n", res); pr_warn("unable to register vlynq-low: %d\n", res);
if (ar7_has_high_vlynq()) { if (ar7_has_high_vlynq()) {
ar7_device_disable(vlynq_high_data.reset_bit); ar7_device_disable(vlynq_high_data.reset_bit);
res = platform_device_register(&vlynq_high); res = platform_device_register(&vlynq_high);
if (res) if (res)
pr_warning("unable to register vlynq-high: %d\n", res); pr_warn("unable to register vlynq-high: %d\n", res);
} }
if (ar7_has_high_cpmac()) { if (ar7_has_high_cpmac()) {
...@@ -689,9 +688,10 @@ static int __init ar7_register_devices(void) ...@@ -689,9 +688,10 @@ static int __init ar7_register_devices(void)
res = platform_device_register(&cpmac_high); res = platform_device_register(&cpmac_high);
if (res) if (res)
pr_warning("unable to register cpmac-high: %d\n", res); pr_warn("unable to register cpmac-high: %d\n",
res);
} else } else
pr_warning("unable to add cpmac-high phy: %d\n", res); pr_warn("unable to add cpmac-high phy: %d\n", res);
} else } else
cpmac_low_data.phy_mask = 0xffffffff; cpmac_low_data.phy_mask = 0xffffffff;
...@@ -700,18 +700,18 @@ static int __init ar7_register_devices(void) ...@@ -700,18 +700,18 @@ static int __init ar7_register_devices(void)
cpmac_get_mac(0, cpmac_low_data.dev_addr); cpmac_get_mac(0, cpmac_low_data.dev_addr);
res = platform_device_register(&cpmac_low); res = platform_device_register(&cpmac_low);
if (res) if (res)
pr_warning("unable to register cpmac-low: %d\n", res); pr_warn("unable to register cpmac-low: %d\n", res);
} else } else
pr_warning("unable to add cpmac-low phy: %d\n", res); pr_warn("unable to add cpmac-low phy: %d\n", res);
detect_leds(); detect_leds();
res = platform_device_register(&ar7_gpio_leds); res = platform_device_register(&ar7_gpio_leds);
if (res) if (res)
pr_warning("unable to register leds: %d\n", res); pr_warn("unable to register leds: %d\n", res);
res = platform_device_register(&ar7_udc); res = platform_device_register(&ar7_udc);
if (res) if (res)
pr_warning("unable to register usb slave: %d\n", res); pr_warn("unable to register usb slave: %d\n", res);
/* Register watchdog only if enabled in hardware */ /* Register watchdog only if enabled in hardware */
bootcr = ioremap_nocache(AR7_REGS_DCL, 4); bootcr = ioremap_nocache(AR7_REGS_DCL, 4);
...@@ -726,7 +726,7 @@ static int __init ar7_register_devices(void) ...@@ -726,7 +726,7 @@ static int __init ar7_register_devices(void)
ar7_wdt_res.end = ar7_wdt_res.start + 0x20; ar7_wdt_res.end = ar7_wdt_res.start + 0x20;
res = platform_device_register(&ar7_wdt); res = platform_device_register(&ar7_wdt);
if (res) if (res)
pr_warning("unable to register watchdog: %d\n", res); pr_warn("unable to register watchdog: %d\n", res);
} }
return 0; return 0;
......
...@@ -1066,7 +1066,7 @@ static inline void __cvmx_pow_warn_if_pending_switch(const char *function) ...@@ -1066,7 +1066,7 @@ static inline void __cvmx_pow_warn_if_pending_switch(const char *function)
uint64_t switch_complete; uint64_t switch_complete;
CVMX_MF_CHORD(switch_complete); CVMX_MF_CHORD(switch_complete);
if (!switch_complete) if (!switch_complete)
pr_warning("%s called with tag switch in progress\n", function); pr_warn("%s called with tag switch in progress\n", function);
} }
/** /**
...@@ -1084,8 +1084,7 @@ static inline void cvmx_pow_tag_sw_wait(void) ...@@ -1084,8 +1084,7 @@ static inline void cvmx_pow_tag_sw_wait(void)
if (unlikely(switch_complete)) if (unlikely(switch_complete))
break; break;
if (unlikely(cvmx_get_cycle() > start_cycle + MAX_CYCLES)) { if (unlikely(cvmx_get_cycle() > start_cycle + MAX_CYCLES)) {
pr_warning("Tag switch is taking a long time, " pr_warn("Tag switch is taking a long time, possible deadlock\n");
"possible deadlock\n");
start_cycle = -MAX_CYCLES - 1; start_cycle = -MAX_CYCLES - 1;
} }
} }
...@@ -1296,19 +1295,16 @@ static inline void cvmx_pow_tag_sw_nocheck(uint32_t tag, ...@@ -1296,19 +1295,16 @@ static inline void cvmx_pow_tag_sw_nocheck(uint32_t tag,
__cvmx_pow_warn_if_pending_switch(__func__); __cvmx_pow_warn_if_pending_switch(__func__);
current_tag = cvmx_pow_get_current_tag(); current_tag = cvmx_pow_get_current_tag();
if (current_tag.s.type == CVMX_POW_TAG_TYPE_NULL_NULL) if (current_tag.s.type == CVMX_POW_TAG_TYPE_NULL_NULL)
pr_warning("%s called with NULL_NULL tag\n", pr_warn("%s called with NULL_NULL tag\n", __func__);
__func__);
if (current_tag.s.type == CVMX_POW_TAG_TYPE_NULL) if (current_tag.s.type == CVMX_POW_TAG_TYPE_NULL)
pr_warning("%s called with NULL tag\n", __func__); pr_warn("%s called with NULL tag\n", __func__);
if ((current_tag.s.type == tag_type) if ((current_tag.s.type == tag_type)
&& (current_tag.s.tag == tag)) && (current_tag.s.tag == tag))
pr_warning("%s called to perform a tag switch to the " pr_warn("%s called to perform a tag switch to the same tag\n",
"same tag\n", __func__);
__func__);
if (tag_type == CVMX_POW_TAG_TYPE_NULL) if (tag_type == CVMX_POW_TAG_TYPE_NULL)
pr_warning("%s called to perform a tag switch to " pr_warn("%s called to perform a tag switch to NULL. Use cvmx_pow_tag_sw_null() instead\n",
"NULL. Use cvmx_pow_tag_sw_null() instead\n", __func__);
__func__);
} }
/* /*
...@@ -1407,23 +1403,19 @@ static inline void cvmx_pow_tag_sw_full_nocheck(cvmx_wqe_t *wqp, uint32_t tag, ...@@ -1407,23 +1403,19 @@ static inline void cvmx_pow_tag_sw_full_nocheck(cvmx_wqe_t *wqp, uint32_t tag,
__cvmx_pow_warn_if_pending_switch(__func__); __cvmx_pow_warn_if_pending_switch(__func__);
current_tag = cvmx_pow_get_current_tag(); current_tag = cvmx_pow_get_current_tag();
if (current_tag.s.type == CVMX_POW_TAG_TYPE_NULL_NULL) if (current_tag.s.type == CVMX_POW_TAG_TYPE_NULL_NULL)
pr_warning("%s called with NULL_NULL tag\n", pr_warn("%s called with NULL_NULL tag\n", __func__);
__func__);
if ((current_tag.s.type == tag_type) if ((current_tag.s.type == tag_type)
&& (current_tag.s.tag == tag)) && (current_tag.s.tag == tag))
pr_warning("%s called to perform a tag switch to " pr_warn("%s called to perform a tag switch to the same tag\n",
"the same tag\n", __func__);
__func__);
if (tag_type == CVMX_POW_TAG_TYPE_NULL) if (tag_type == CVMX_POW_TAG_TYPE_NULL)
pr_warning("%s called to perform a tag switch to " pr_warn("%s called to perform a tag switch to NULL. Use cvmx_pow_tag_sw_null() instead\n",
"NULL. Use cvmx_pow_tag_sw_null() instead\n", __func__);
__func__);
if (wqp != cvmx_phys_to_ptr(0x80)) if (wqp != cvmx_phys_to_ptr(0x80))
if (wqp != cvmx_pow_get_current_wqp()) if (wqp != cvmx_pow_get_current_wqp())
pr_warning("%s passed WQE(%p) doesn't match " pr_warn("%s passed WQE(%p) doesn't match the address in the POW(%p)\n",
"the address in the POW(%p)\n", __func__, wqp,
__func__, wqp, cvmx_pow_get_current_wqp());
cvmx_pow_get_current_wqp());
} }
/* /*
...@@ -1507,12 +1499,10 @@ static inline void cvmx_pow_tag_sw_null_nocheck(void) ...@@ -1507,12 +1499,10 @@ static inline void cvmx_pow_tag_sw_null_nocheck(void)
__cvmx_pow_warn_if_pending_switch(__func__); __cvmx_pow_warn_if_pending_switch(__func__);
current_tag = cvmx_pow_get_current_tag(); current_tag = cvmx_pow_get_current_tag();
if (current_tag.s.type == CVMX_POW_TAG_TYPE_NULL_NULL) if (current_tag.s.type == CVMX_POW_TAG_TYPE_NULL_NULL)
pr_warning("%s called with NULL_NULL tag\n", pr_warn("%s called with NULL_NULL tag\n", __func__);
__func__);
if (current_tag.s.type == CVMX_POW_TAG_TYPE_NULL) if (current_tag.s.type == CVMX_POW_TAG_TYPE_NULL)
pr_warning("%s called when we already have a " pr_warn("%s called when we already have a NULL tag\n",
"NULL tag\n", __func__);
__func__);
} }
tag_req.u64 = 0; tag_req.u64 = 0;
...@@ -1725,17 +1715,14 @@ static inline void cvmx_pow_tag_sw_desched_nocheck( ...@@ -1725,17 +1715,14 @@ static inline void cvmx_pow_tag_sw_desched_nocheck(
__cvmx_pow_warn_if_pending_switch(__func__); __cvmx_pow_warn_if_pending_switch(__func__);
current_tag = cvmx_pow_get_current_tag(); current_tag = cvmx_pow_get_current_tag();
if (current_tag.s.type == CVMX_POW_TAG_TYPE_NULL_NULL) if (current_tag.s.type == CVMX_POW_TAG_TYPE_NULL_NULL)
pr_warning("%s called with NULL_NULL tag\n", pr_warn("%s called with NULL_NULL tag\n", __func__);
__func__);
if (current_tag.s.type == CVMX_POW_TAG_TYPE_NULL) if (current_tag.s.type == CVMX_POW_TAG_TYPE_NULL)
pr_warning("%s called with NULL tag. Deschedule not " pr_warn("%s called with NULL tag. Deschedule not allowed from NULL state\n",
"allowed from NULL state\n", __func__);
__func__);
if ((current_tag.s.type != CVMX_POW_TAG_TYPE_ATOMIC) if ((current_tag.s.type != CVMX_POW_TAG_TYPE_ATOMIC)
&& (tag_type != CVMX_POW_TAG_TYPE_ATOMIC)) && (tag_type != CVMX_POW_TAG_TYPE_ATOMIC))
pr_warning("%s called where neither the before or " pr_warn("%s called where neither the before or after tag is ATOMIC\n",
"after tag is ATOMIC\n", __func__);
__func__);
} }
tag_req.u64 = 0; tag_req.u64 = 0;
...@@ -1832,12 +1819,10 @@ static inline void cvmx_pow_desched(uint64_t no_sched) ...@@ -1832,12 +1819,10 @@ static inline void cvmx_pow_desched(uint64_t no_sched)
__cvmx_pow_warn_if_pending_switch(__func__); __cvmx_pow_warn_if_pending_switch(__func__);
current_tag = cvmx_pow_get_current_tag(); current_tag = cvmx_pow_get_current_tag();
if (current_tag.s.type == CVMX_POW_TAG_TYPE_NULL_NULL) if (current_tag.s.type == CVMX_POW_TAG_TYPE_NULL_NULL)
pr_warning("%s called with NULL_NULL tag\n", pr_warn("%s called with NULL_NULL tag\n", __func__);
__func__);
if (current_tag.s.type == CVMX_POW_TAG_TYPE_NULL) if (current_tag.s.type == CVMX_POW_TAG_TYPE_NULL)
pr_warning("%s called with NULL tag. Deschedule not " pr_warn("%s called with NULL tag. Deschedule not expected from NULL state\n",
"expected from NULL state\n", __func__);
__func__);
} }
/* Need to make sure any writes to the work queue entry are complete */ /* Need to make sure any writes to the work queue entry are complete */
......
...@@ -38,7 +38,7 @@ ssize_t copy_oldmem_page(unsigned long pfn, char *buf, ...@@ -38,7 +38,7 @@ ssize_t copy_oldmem_page(unsigned long pfn, char *buf,
kunmap_atomic(vaddr); kunmap_atomic(vaddr);
} else { } else {
if (!kdump_buf_page) { if (!kdump_buf_page) {
pr_warning("Kdump: Kdump buffer page not allocated\n"); pr_warn("Kdump: Kdump buffer page not allocated\n");
return -EFAULT; return -EFAULT;
} }
...@@ -57,7 +57,7 @@ static int __init kdump_buf_page_init(void) ...@@ -57,7 +57,7 @@ static int __init kdump_buf_page_init(void)
kdump_buf_page = kmalloc(PAGE_SIZE, GFP_KERNEL); kdump_buf_page = kmalloc(PAGE_SIZE, GFP_KERNEL);
if (!kdump_buf_page) { if (!kdump_buf_page) {
pr_warning("Kdump: Failed to allocate kdump buffer page\n"); pr_warn("Kdump: Failed to allocate kdump buffer page\n");
ret = -ENOMEM; ret = -ENOMEM;
} }
......
...@@ -561,8 +561,8 @@ static int mipspmu_get_irq(void) ...@@ -561,8 +561,8 @@ static int mipspmu_get_irq(void)
IRQF_PERCPU | IRQF_NOBALANCING | IRQF_NO_THREAD, IRQF_PERCPU | IRQF_NOBALANCING | IRQF_NO_THREAD,
"mips_perf_pmu", NULL); "mips_perf_pmu", NULL);
if (err) { if (err) {
pr_warning("Unable to request IRQ%d for MIPS " pr_warn("Unable to request IRQ%d for MIPS performance counters!\n",
"performance counters!\n", mipspmu.irq); mipspmu.irq);
} }
} else if (cp0_perfcount_irq < 0) { } else if (cp0_perfcount_irq < 0) {
/* /*
...@@ -572,8 +572,7 @@ static int mipspmu_get_irq(void) ...@@ -572,8 +572,7 @@ static int mipspmu_get_irq(void)
perf_irq = mipsxx_pmu_handle_shared_irq; perf_irq = mipsxx_pmu_handle_shared_irq;
err = 0; err = 0;
} else { } else {
pr_warning("The platform hasn't properly defined its " pr_warn("The platform hasn't properly defined its interrupt controller\n");
"interrupt controller.\n");
err = -ENOENT; err = -ENOENT;
} }
......
...@@ -89,7 +89,7 @@ void __init add_memory_region(phys_t start, phys_t size, long type) ...@@ -89,7 +89,7 @@ void __init add_memory_region(phys_t start, phys_t size, long type)
/* Sanity check */ /* Sanity check */
if (start + size < start) { if (start + size < start) {
pr_warning("Trying to add an invalid memory region, skipped\n"); pr_warn("Trying to add an invalid memory region, skipped\n");
return; return;
} }
......
...@@ -103,5 +103,5 @@ void __init tx4939_setup_pcierr_irq(void) ...@@ -103,5 +103,5 @@ void __init tx4939_setup_pcierr_irq(void)
tx4927_pcierr_interrupt, tx4927_pcierr_interrupt,
0, "PCI error", 0, "PCI error",
(void *)TX4939_PCIC_REG)) (void *)TX4939_PCIC_REG))
pr_warning("Failed to request irq for PCIERR\n"); pr_warn("Failed to request irq for PCIERR\n");
} }
...@@ -29,8 +29,8 @@ static void __init tx4927_wdr_init(void) ...@@ -29,8 +29,8 @@ static void __init tx4927_wdr_init(void)
{ {
/* report watchdog reset status */ /* report watchdog reset status */
if (____raw_readq(&tx4927_ccfgptr->ccfg) & TX4927_CCFG_WDRST) if (____raw_readq(&tx4927_ccfgptr->ccfg) & TX4927_CCFG_WDRST)
pr_warning("Watchdog reset detected at 0x%lx\n", pr_warn("Watchdog reset detected at 0x%lx\n",
read_c0_errorepc()); read_c0_errorepc());
/* clear WatchDogReset (W1C) */ /* clear WatchDogReset (W1C) */
tx4927_ccfg_set(TX4927_CCFG_WDRST); tx4927_ccfg_set(TX4927_CCFG_WDRST);
/* do reset on watchdog */ /* do reset on watchdog */
......
...@@ -31,8 +31,8 @@ static void __init tx4938_wdr_init(void) ...@@ -31,8 +31,8 @@ static void __init tx4938_wdr_init(void)
{ {
/* report watchdog reset status */ /* report watchdog reset status */
if (____raw_readq(&tx4938_ccfgptr->ccfg) & TX4938_CCFG_WDRST) if (____raw_readq(&tx4938_ccfgptr->ccfg) & TX4938_CCFG_WDRST)
pr_warning("Watchdog reset detected at 0x%lx\n", pr_warn("Watchdog reset detected at 0x%lx\n",
read_c0_errorepc()); read_c0_errorepc());
/* clear WatchDogReset (W1C) */ /* clear WatchDogReset (W1C) */
tx4938_ccfg_set(TX4938_CCFG_WDRST); tx4938_ccfg_set(TX4938_CCFG_WDRST);
/* do reset on watchdog */ /* do reset on watchdog */
......
...@@ -35,8 +35,8 @@ static void __init tx4939_wdr_init(void) ...@@ -35,8 +35,8 @@ static void __init tx4939_wdr_init(void)
{ {
/* report watchdog reset status */ /* report watchdog reset status */
if (____raw_readq(&tx4939_ccfgptr->ccfg) & TX4939_CCFG_WDRST) if (____raw_readq(&tx4939_ccfgptr->ccfg) & TX4939_CCFG_WDRST)
pr_warning("Watchdog reset detected at 0x%lx\n", pr_warn("Watchdog reset detected at 0x%lx\n",
read_c0_errorepc()); read_c0_errorepc());
/* clear WatchDogReset (W1C) */ /* clear WatchDogReset (W1C) */
tx4939_ccfg_set(TX4939_CCFG_WDRST); tx4939_ccfg_set(TX4939_CCFG_WDRST);
/* do reset on watchdog */ /* do reset on watchdog */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment