linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] dmaengine: printk(KERN_ERR ...) -> pr_err
@ 2012-07-18 11:34 Andy Shevchenko
  2012-07-18 16:51 ` [PATCH] dmaengine: Cleanup logging messages Joe Perches
  0 siblings, 1 reply; 4+ messages in thread
From: Andy Shevchenko @ 2012-07-18 11:34 UTC (permalink / raw)
  To: Vinod Koul, Dan Williams, linux-kernel; +Cc: Andy Shevchenko

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/dma/dmaengine.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/dma/dmaengine.c b/drivers/dma/dmaengine.c
index 26ac0f8..071bd73 100644
--- a/drivers/dma/dmaengine.c
+++ b/drivers/dma/dmaengine.c
@@ -262,7 +262,7 @@ enum dma_status dma_sync_wait(struct dma_chan *chan, dma_cookie_t cookie)
 	do {
 		status = dma_async_is_tx_complete(chan, cookie, NULL, NULL);
 		if (time_after_eq(jiffies, dma_sync_wait_timeout)) {
-			printk(KERN_ERR "dma_sync_wait_timeout!\n");
+			pr_err("dma_sync_wait_timeout!\n");
 			return DMA_ERROR;
 		}
 	} while (status == DMA_IN_PROGRESS);
-- 
1.7.10.4


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH] dmaengine: Cleanup logging messages
  2012-07-18 11:34 [PATCH] dmaengine: printk(KERN_ERR ...) -> pr_err Andy Shevchenko
@ 2012-07-18 16:51 ` Joe Perches
  2012-07-18 17:09   ` Andy Shevchenko
  2012-07-20  6:41   ` Vinod Koul
  0 siblings, 2 replies; 4+ messages in thread
From: Joe Perches @ 2012-07-18 16:51 UTC (permalink / raw)
  To: Andy Shevchenko; +Cc: Vinod Koul, Dan Williams, linux-kernel

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>
---

Hi Andy.  Maybe a slightly larger patch is better.

 drivers/dma/dmaengine.c |   22 +++++++++++++---------
 1 files changed, 13 insertions(+), 9 deletions(-)

diff --git a/drivers/dma/dmaengine.c b/drivers/dma/dmaengine.c
index 2397f6f..eb51f43 100644
--- a/drivers/dma/dmaengine.c
+++ b/drivers/dma/dmaengine.c
@@ -45,6 +45,8 @@
  * See Documentation/dmaengine.txt for more details
  */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/dma-mapping.h>
 #include <linux/init.h>
 #include <linux/module.h>
@@ -261,7 +263,7 @@ enum dma_status dma_sync_wait(struct dma_chan *chan, dma_cookie_t cookie)
 	do {
 		status = dma_async_is_tx_complete(chan, cookie, NULL, NULL);
 		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;
 		}
 	} while (status == DMA_IN_PROGRESS);
@@ -312,7 +314,7 @@ static int __init dma_channel_table_init(void)
 	}
 
 	if (err) {
-		pr_err("dmaengine: initialization failure\n");
+		pr_err("initialization failure\n");
 		for_each_dma_cap_mask(cap, dma_cap_mask_all)
 			if (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
 			err = dma_chan_get(chan);
 
 			if (err == -ENODEV) {
-				pr_debug("%s: %s module removed\n", __func__,
-					 dma_chan_name(chan));
+				pr_debug("%s: %s module removed\n",
+					 __func__, dma_chan_name(chan));
 				list_del_rcu(&device->global_node);
 			} else if (err)
 				pr_debug("%s: failed to get %s: (%d)\n",
-					__func__, dma_chan_name(chan), err);
+					 __func__, dma_chan_name(chan), err);
 			else
 				break;
 			if (--device->privatecnt == 0)
@@ -535,8 +537,10 @@ struct dma_chan *__dma_request_channel(dma_cap_mask_t *mask, dma_filter_fn fn, v
 	}
 	mutex_unlock(&dma_list_mutex);
 
-	pr_debug("%s: %s (%s)\n", __func__, chan ? "success" : "fail",
-		 chan ? dma_chan_name(chan) : NULL);
+	pr_debug("%s: %s (%s)\n",
+		 __func__,
+		 chan ? "success" : "fail",
+		 chan ? dma_chan_name(chan) : NULL);
 
 	return chan;
 }
@@ -579,7 +583,7 @@ void dmaengine_get(void)
 				break;
 			} else if (err)
 				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)
 	while (tx->cookie == -EBUSY) {
 		if (time_after_eq(jiffies, dma_sync_wait_timeout)) {
 			pr_err("%s timeout waiting for descriptor submission\n",
-				__func__);
+			       __func__);
 			return DMA_ERROR;
 		}
 		cpu_relax();



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] dmaengine: Cleanup logging messages
  2012-07-18 16:51 ` [PATCH] dmaengine: Cleanup logging messages Joe Perches
@ 2012-07-18 17:09   ` Andy Shevchenko
  2012-07-20  6:41   ` Vinod Koul
  1 sibling, 0 replies; 4+ messages in thread
From: Andy Shevchenko @ 2012-07-18 17:09 UTC (permalink / raw)
  To: Joe Perches; +Cc: Andy Shevchenko, Vinod Koul, Dan Williams, linux-kernel

On Wed, Jul 18, 2012 at 7:51 PM, Joe Perches <joe@perches.com> wrote:
> 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>
> ---
>
> Hi Andy.  Maybe a slightly larger patch is better.
Fine by me.


-- 
With Best Regards,
Andy Shevchenko

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] dmaengine: Cleanup logging messages
  2012-07-18 16:51 ` [PATCH] dmaengine: Cleanup logging messages Joe Perches
  2012-07-18 17:09   ` Andy Shevchenko
@ 2012-07-20  6:41   ` Vinod Koul
  1 sibling, 0 replies; 4+ messages in thread
From: Vinod Koul @ 2012-07-20  6:41 UTC (permalink / raw)
  To: Joe Perches; +Cc: Andy Shevchenko, Dan Williams, linux-kernel

On Wed, 2012-07-18 at 09:51 -0700, Joe Perches wrote:
> 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.
> 
Applied thanks

-- 
~Vinod


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-07-20  6:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-18 11:34 [PATCH] dmaengine: printk(KERN_ERR ...) -> pr_err Andy Shevchenko
2012-07-18 16:51 ` [PATCH] dmaengine: Cleanup logging messages Joe Perches
2012-07-18 17:09   ` Andy Shevchenko
2012-07-20  6:41   ` Vinod Koul

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).