Commit 634332502366554849fe37e88d05ec0a13e550c8

Authored by Joe Perches
Committed by Vinod Koul
1 parent 0e79f9ae16

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: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>

Showing 1 changed file with 12 additions and 8 deletions Side-by-side Diff

drivers/dma/dmaengine.c
... ... @@ -45,6 +45,8 @@
45 45 * See Documentation/dmaengine.txt for more details
46 46 */
47 47  
  48 +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
  49 +
48 50 #include <linux/dma-mapping.h>
49 51 #include <linux/init.h>
50 52 #include <linux/module.h>
... ... @@ -261,7 +263,7 @@
261 263 do {
262 264 status = dma_async_is_tx_complete(chan, cookie, NULL, NULL);
263 265 if (time_after_eq(jiffies, dma_sync_wait_timeout)) {
264   - printk(KERN_ERR "dma_sync_wait_timeout!\n");
  266 + pr_err("%s: timeout!\n", __func__);
265 267 return DMA_ERROR;
266 268 }
267 269 } while (status == DMA_IN_PROGRESS);
... ... @@ -312,7 +314,7 @@
312 314 }
313 315  
314 316 if (err) {
315   - pr_err("dmaengine: initialization failure\n");
  317 + pr_err("initialization failure\n");
316 318 for_each_dma_cap_mask(cap, dma_cap_mask_all)
317 319 if (channel_table[cap])
318 320 free_percpu(channel_table[cap]);
319 321  
... ... @@ -520,12 +522,12 @@
520 522 err = dma_chan_get(chan);
521 523  
522 524 if (err == -ENODEV) {
523   - pr_debug("%s: %s module removed\n", __func__,
524   - dma_chan_name(chan));
  525 + pr_debug("%s: %s module removed\n",
  526 + __func__, dma_chan_name(chan));
525 527 list_del_rcu(&device->global_node);
526 528 } else if (err)
527 529 pr_debug("%s: failed to get %s: (%d)\n",
528   - __func__, dma_chan_name(chan), err);
  530 + __func__, dma_chan_name(chan), err);
529 531 else
530 532 break;
531 533 if (--device->privatecnt == 0)
... ... @@ -535,7 +537,9 @@
535 537 }
536 538 mutex_unlock(&dma_list_mutex);
537 539  
538   - pr_debug("%s: %s (%s)\n", __func__, chan ? "success" : "fail",
  540 + pr_debug("%s: %s (%s)\n",
  541 + __func__,
  542 + chan ? "success" : "fail",
539 543 chan ? dma_chan_name(chan) : NULL);
540 544  
541 545 return chan;
... ... @@ -579,7 +583,7 @@
579 583 break;
580 584 } else if (err)
581 585 pr_err("%s: failed to get %s: (%d)\n",
582   - __func__, dma_chan_name(chan), err);
  586 + __func__, dma_chan_name(chan), err);
583 587 }
584 588 }
585 589  
... ... @@ -1015,7 +1019,7 @@
1015 1019 while (tx->cookie == -EBUSY) {
1016 1020 if (time_after_eq(jiffies, dma_sync_wait_timeout)) {
1017 1021 pr_err("%s timeout waiting for descriptor submission\n",
1018   - __func__);
  1022 + __func__);
1019 1023 return DMA_ERROR;
1020 1024 }
1021 1025 cpu_relax();