public inbox for linuxppc-dev@ozlabs.org
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: "Ira W. Snyder" <iws@ovro.caltech.edu>
Cc: dan.j.williams@intel.com, linuxppc-dev@lists.ozlabs.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 3/9] fsldma: use channel name in printk output
Date: Wed, 02 Mar 2011 15:17:36 -0800	[thread overview]
Message-ID: <1299107856.4208.120.camel@Joe-Laptop> (raw)
In-Reply-To: <1299104601-15447-4-git-send-email-iws@ovro.caltech.edu>

On Wed, 2011-03-02 at 14:23 -0800, Ira W. Snyder wrote:
> This makes debugging the driver much easier when multiple channels are
> running concurrently. In addition, you can see how much descriptor
> memory each channel has allocated via the dmapool API in sysfs.
> 
> Signed-off-by: Ira W. Snyder <iws@ovro.caltech.edu>
> ---
>  drivers/dma/fsldma.c |   60 +++++++++++++++++++++++++++----------------------
>  drivers/dma/fsldma.h |    1 +
>  2 files changed, 34 insertions(+), 27 deletions(-)
> 
> diff --git a/drivers/dma/fsldma.c b/drivers/dma/fsldma.c
> index 2e1af45..6e3d3d7 100644
> --- a/drivers/dma/fsldma.c
> +++ b/drivers/dma/fsldma.c
> @@ -37,7 +37,7 @@
>  
>  #include "fsldma.h"
>  
> -static const char msg_ld_oom[] = "No free memory for link descriptor\n";
> +static const char msg_ld_oom[] = "No free memory for link descriptor";
>  
>  /*
>   * Register Helpers
> @@ -207,7 +207,7 @@ static void dma_halt(struct fsldma_chan *chan)
>  	}
>  
>  	if (!dma_is_idle(chan))
> -		dev_err(chan->dev, "DMA halt timeout!\n");
> +		dev_err(chan->dev, "%s: DMA halt timeout!\n", chan->name);

I suggest instead you add:

#define chan_err(chan, fmt, arg...) 				\
	dev_err(chan->dev, "%s: " fmt, chan->name, ##arg);
#define chan_info(chan, fmt, arg...)				\
	dev_info(chan->dev, "%s: " fmt, chan->name, ##arg);
#define chan_dbg(chan, fmt, arg...)				\
	dev_dbg(chan->dev, "%s: " fmt, chan->name, ##arg);

and change the uses to be similar to:

	if (!dma_is_idle(chan))
		chan_err(chan, "DMA halt timeout!\n");

etc...

  reply	other threads:[~2011-03-02 23:25 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-02 22:23 [PATCH v2 0/9] fsldma: lockup fixes Ira W. Snyder
2011-03-02 22:23 ` [PATCH v2 1/9] dmatest: fix automatic buffer unmap type Ira W. Snyder
2011-03-02 22:23 ` [PATCH v2 2/9] fsldma: move related helper functions near each other Ira W. Snyder
2011-03-02 22:23 ` [PATCH v2 3/9] fsldma: use channel name in printk output Ira W. Snyder
2011-03-02 23:17   ` Joe Perches [this message]
2011-03-02 22:23 ` [PATCH v2 4/9] fsldma: improve link descriptor debugging Ira W. Snyder
2011-03-02 22:23 ` [PATCH v2 5/9] fsldma: minor codingstyle and consistency fixes Ira W. Snyder
2011-03-02 22:23 ` [PATCH v2 6/9] fsldma: fix controller lockups Ira W. Snyder
2011-03-02 22:23 ` [PATCH v2 7/9] fsldma: support async_tx dependencies and automatic unmapping Ira W. Snyder
2011-03-02 22:23 ` [PATCH v2 8/9] fsldma: reduce locking during descriptor cleanup Ira W. Snyder
2011-03-02 22:23 ` [PATCH v2 9/9] fsldma: make halt behave nicely on all supported controllers Ira W. Snyder

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1299107856.4208.120.camel@Joe-Laptop \
    --to=joe@perches.com \
    --cc=dan.j.williams@intel.com \
    --cc=iws@ovro.caltech.edu \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox