Commit 63433250 authored by Joe Perches's avatar Joe Perches Committed by Vinod Koul

dmaengine: Cleanup logging messages

Use a more current logging style.

Add pr_fmt to prefix dmaengine: to messages.
Convert printk(KERN_ERR to pr_err(.
Convert embedded function name use to "%s: ", __func__
Align arguments.
Original-patch-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: default avatarJoe Perches <joe@perches.com>
Signed-off-by: default avatarVinod Koul <vinod.koul@linux.intel.com>
parent 0e79f9ae
...@@ -45,6 +45,8 @@ ...@@ -45,6 +45,8 @@
* See Documentation/dmaengine.txt for more details * See Documentation/dmaengine.txt for more details
*/ */
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#include <linux/dma-mapping.h> #include <linux/dma-mapping.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/module.h> #include <linux/module.h>
...@@ -261,7 +263,7 @@ enum dma_status dma_sync_wait(struct dma_chan *chan, dma_cookie_t cookie) ...@@ -261,7 +263,7 @@ enum dma_status dma_sync_wait(struct dma_chan *chan, dma_cookie_t cookie)
do { do {
status = dma_async_is_tx_complete(chan, cookie, NULL, NULL); status = dma_async_is_tx_complete(chan, cookie, NULL, NULL);
if (time_after_eq(jiffies, dma_sync_wait_timeout)) { if (time_after_eq(jiffies, dma_sync_wait_timeout)) {
printk(KERN_ERR "dma_sync_wait_timeout!\n"); pr_err("%s: timeout!\n", __func__);
return DMA_ERROR; return DMA_ERROR;
} }
} while (status == DMA_IN_PROGRESS); } while (status == DMA_IN_PROGRESS);
...@@ -312,7 +314,7 @@ static int __init dma_channel_table_init(void) ...@@ -312,7 +314,7 @@ static int __init dma_channel_table_init(void)
} }
if (err) { if (err) {
pr_err("dmaengine: initialization failure\n"); pr_err("initialization failure\n");
for_each_dma_cap_mask(cap, dma_cap_mask_all) for_each_dma_cap_mask(cap, dma_cap_mask_all)
if (channel_table[cap]) if (channel_table[cap])
free_percpu(channel_table[cap]); free_percpu(channel_table[cap]);
...@@ -520,12 +522,12 @@ struct dma_chan *__dma_request_channel(dma_cap_mask_t *mask, dma_filter_fn fn, v ...@@ -520,12 +522,12 @@ struct dma_chan *__dma_request_channel(dma_cap_mask_t *mask, dma_filter_fn fn, v
err = dma_chan_get(chan); err = dma_chan_get(chan);
if (err == -ENODEV) { if (err == -ENODEV) {
pr_debug("%s: %s module removed\n", __func__, pr_debug("%s: %s module removed\n",
dma_chan_name(chan)); __func__, dma_chan_name(chan));
list_del_rcu(&device->global_node); list_del_rcu(&device->global_node);
} else if (err) } else if (err)
pr_debug("%s: failed to get %s: (%d)\n", pr_debug("%s: failed to get %s: (%d)\n",
__func__, dma_chan_name(chan), err); __func__, dma_chan_name(chan), err);
else else
break; break;
if (--device->privatecnt == 0) if (--device->privatecnt == 0)
...@@ -535,7 +537,9 @@ struct dma_chan *__dma_request_channel(dma_cap_mask_t *mask, dma_filter_fn fn, v ...@@ -535,7 +537,9 @@ struct dma_chan *__dma_request_channel(dma_cap_mask_t *mask, dma_filter_fn fn, v
} }
mutex_unlock(&dma_list_mutex); mutex_unlock(&dma_list_mutex);
pr_debug("%s: %s (%s)\n", __func__, chan ? "success" : "fail", pr_debug("%s: %s (%s)\n",
__func__,
chan ? "success" : "fail",
chan ? dma_chan_name(chan) : NULL); chan ? dma_chan_name(chan) : NULL);
return chan; return chan;
...@@ -579,7 +583,7 @@ void dmaengine_get(void) ...@@ -579,7 +583,7 @@ void dmaengine_get(void)
break; break;
} else if (err) } else if (err)
pr_err("%s: failed to get %s: (%d)\n", pr_err("%s: failed to get %s: (%d)\n",
__func__, dma_chan_name(chan), err); __func__, dma_chan_name(chan), err);
} }
} }
...@@ -1015,7 +1019,7 @@ dma_wait_for_async_tx(struct dma_async_tx_descriptor *tx) ...@@ -1015,7 +1019,7 @@ dma_wait_for_async_tx(struct dma_async_tx_descriptor *tx)
while (tx->cookie == -EBUSY) { while (tx->cookie == -EBUSY) {
if (time_after_eq(jiffies, dma_sync_wait_timeout)) { if (time_after_eq(jiffies, dma_sync_wait_timeout)) {
pr_err("%s timeout waiting for descriptor submission\n", pr_err("%s timeout waiting for descriptor submission\n",
__func__); __func__);
return DMA_ERROR; return DMA_ERROR;
} }
cpu_relax(); cpu_relax();
......
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