alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Peter Ujfalusi <peter.ujfalusi-l0cyMroinI0@public.gmane.org>
To: "Shevchenko,
	Andriy"
	<andriy.shevchenko-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Cc: "davinci-linux-open-source-VycZQUHpC/PFrsHnngEfi1aTQe2KTcn/@public.gmane.org"
	<davinci-linux-open-source-VycZQUHpC/PFrsHnngEfi1aTQe2KTcn/@public.gmane.org>,
	"alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw@public.gmane.org"
	<alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw@public.gmane.org>,
	"joelf-l0cyMroinI0@public.gmane.org"
	<joelf-l0cyMroinI0@public.gmane.org>,
	"Koul,
	Vinod" <vinod.koul-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
	"linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Jyri Sarha <jsarha-l0cyMroinI0@public.gmane.org>,
	Liam Girdwood <lgirdwood-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Tony Lindgren <tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>,
	Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	"mporter-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org"
	<mporter-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
	"dmaengine-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<dmaengine-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"Williams,
	Dan J" <dan.j.williams-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
	"linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org"
	<linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>
Subject: Re: [PATCH 10/18] dma: edma: Reduce debug print verbosity for non verbose debugging
Date: Thu, 13 Mar 2014 15:37:56 +0200	[thread overview]
Message-ID: <5321B4B4.30602@ti.com> (raw)
In-Reply-To: <1394715211.28803.239.camel-XvqNBM/wLWRrdx17CPfAsdBPR1lH4CV8@public.gmane.org>

On 03/13/2014 02:53 PM, Shevchenko, Andriy wrote:
> On Thu, 2014-03-13 at 11:18 +0200, Peter Ujfalusi wrote:
>> Do not print the paRAM information when verbose debugging is not asked and
>> also reduce the number of lines printed in edma_prep_dma_cyclic()
>>
>> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
>> ---
>>  drivers/dma/edma.c | 11 +++++------
>>  1 file changed, 5 insertions(+), 6 deletions(-)
>>
>> diff --git a/drivers/dma/edma.c b/drivers/dma/edma.c
>> index e4f4a0cef58c..e2aa42b8342f 100644
>> --- a/drivers/dma/edma.c
>> +++ b/drivers/dma/edma.c
>> @@ -141,7 +141,7 @@ static void edma_execute(struct edma_chan *echan)
>>  	for (i = 0; i < nslots; i++) {
>>  		j = i + edesc->processed;
>>  		edma_write_slot(echan->slot[i], &edesc->pset[j]);
>> -		dev_dbg(echan->vchan.chan.device->dev,
>> +		dev_vdbg(echan->vchan.chan.device->dev,
>>  			"\n pset[%d]:\n"
>>  			"  chnum\t%d\n"
>>  			"  slot\t%d\n"
> 
> I believe you may move this code to separate function and reuse it
> later.

As the per patch description, I only changed the debug level in this patch.

> Moreover %d is not good specifier for unsigned types, maybe %u?

You are right for unsigned type %u is the correct. This is why we have %d
since j, echan->ch_num and echan->slot[i] are integer.

> 
>> @@ -554,9 +554,8 @@ static struct dma_async_tx_descriptor *edma_prep_dma_cyclic(
>>  	edesc->cyclic = 1;
>>  	edesc->pset_nr = nslots;
>>  
>> -	dev_dbg(dev, "%s: nslots=%d\n", __func__, nslots);
>> -	dev_dbg(dev, "%s: period_len=%d\n", __func__, period_len);
>> -	dev_dbg(dev, "%s: buf_len=%d\n", __func__, buf_len);
>> +	dev_dbg(dev, "%s: channel=%d nslots=%d period_len=%d buf_len=%d\n",
>> +		__func__, echan->ch_num, nslots, period_len, buf_len);
> 
> Consider to use proper specifiers for size_t types, namely %zd.

I just collapsed the three line of dev_dbg into one and have not really
checked the formats.
For size_t the correct format should be %zu.
I'll fix this up for the next version.

>>  
>>  	for (i = 0; i < nslots; i++) {
>>  		/* Allocate a PaRAM slot, if needed */
>> @@ -590,8 +589,8 @@ static struct dma_async_tx_descriptor *edma_prep_dma_cyclic(
>>  		else
>>  			src_addr += period_len;
>>  
>> -		dev_dbg(dev, "%s: Configure period %d of buf:\n", __func__, i);
>> -		dev_dbg(dev,
>> +		dev_vdbg(dev, "%s: Configure period %d of buf:\n", __func__, i);
>> +		dev_vdbg(dev,
> 
> See the first comment.

As the per patch description, I only changed the debug level in this patch.
This can be done as a separate patch later IMO as part of a bigger debug cleanup.

-- 
Péter
_______________________________________________
Davinci-linux-open-source mailing list
Davinci-linux-open-source@linux.davincidsp.com
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source

  parent reply	other threads:[~2014-03-13 13:37 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-13  9:18 [PATCH 00/18] edma/ASoC: dmaengine PCM for AM335x and AM447x Peter Ujfalusi
     [not found] ` <1394702320-21743-1-git-send-email-peter.ujfalusi-l0cyMroinI0@public.gmane.org>
2014-03-13  9:18   ` [PATCH 01/18] platform_data: edma: Be precise with the paRAM struct Peter Ujfalusi
2014-03-13  9:18   ` [PATCH 02/18] dma: edma: Add support for DMA_PAUSE/RESUME operation Peter Ujfalusi
2014-03-13  9:18   ` [PATCH 03/18] dma: edma: Set DMA_CYCLIC capability flag Peter Ujfalusi
2014-03-13  9:18   ` [PATCH 09/18] dma: edma: Simplify direction configuration in edma_config_pset() Peter Ujfalusi
2014-03-13  9:18 ` [PATCH 04/18] arm: common: edma: Select event queue 1 as default when booted with DT Peter Ujfalusi
2014-03-13  9:18 ` [PATCH 05/18] arm: common: edma: Save the number of event queues/TCs Peter Ujfalusi
2014-03-13  9:18 ` [PATCH 06/18] arm: common: edma: API to request non default queue for a channel Peter Ujfalusi
2014-03-13  9:18 ` [PATCH 07/18] DMA: edma: Use different eventq for cyclic channels Peter Ujfalusi
2014-03-13  9:18 ` [PATCH 08/18] dma: edma: Implement device_slave_caps callback Peter Ujfalusi
2014-03-13  9:18 ` [PATCH 10/18] dma: edma: Reduce debug print verbosity for non verbose debugging Peter Ujfalusi
2014-03-13 12:53   ` Shevchenko, Andriy
     [not found]     ` <1394715211.28803.239.camel-XvqNBM/wLWRrdx17CPfAsdBPR1lH4CV8@public.gmane.org>
2014-03-13 13:37       ` Peter Ujfalusi [this message]
2014-03-13  9:18 ` [PATCH 11/18] dma: edma: Prefix debug prints where the text were identical in prep callbacks Peter Ujfalusi
2014-03-13  9:18 ` [PATCH 12/18] dma: edma: Add channel number to debug prints Peter Ujfalusi
2014-03-13  9:18 ` [PATCH 13/18] dma: edma: Print the direction value as well when it is not supported Peter Ujfalusi
2014-03-13 13:03   ` Shevchenko, Andriy
2014-03-13 13:40     ` Peter Ujfalusi
2014-03-13  9:18 ` [PATCH 14/18] ASoC: davinci: Add edma dmaengine platform driver Peter Ujfalusi
2014-03-13 10:28   ` [alsa-devel] " Lars-Peter Clausen
     [not found]     ` <53218835.3080909-Qo5EllUWu/uELgA04lAiVw@public.gmane.org>
2014-03-13 11:56       ` Peter Ujfalusi
2014-03-13 12:09         ` Lars-Peter Clausen
2014-03-13 13:03     ` Peter Ujfalusi
2014-03-13 13:38       ` Lars-Peter Clausen
2014-03-13  9:18 ` [PATCH 15/18] ASoC: davinci-mcasp: Use dmaengine based platform driver for AM335x/447x Peter Ujfalusi
2014-03-13  9:18 ` [PATCH 16/18] ASoC: davinci-mcasp: Provide correct filter_data for dmaengine for non-DT boot Peter Ujfalusi
2014-03-13  9:18 ` [PATCH 17/18] ASoC: davinci-mcasp: Assign the dma_data earlier in dai_probe callback Peter Ujfalusi
2014-03-13  9:18 ` [PATCH 18/18] ASoC: davinci-mcasp: Place constraint on the period size based on FIFO config Peter Ujfalusi
2014-03-13 13:46 ` [PATCH 00/18] edma/ASoC: dmaengine PCM for AM335x and AM447x Mark Brown
2014-03-14  9:38   ` Peter Ujfalusi
2014-03-14 10:13     ` Mark Brown

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=5321B4B4.30602@ti.com \
    --to=peter.ujfalusi-l0cymroini0@public.gmane.org \
    --cc=alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw@public.gmane.org \
    --cc=andriy.shevchenko-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=dan.j.williams-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=davinci-linux-open-source-VycZQUHpC/PFrsHnngEfi1aTQe2KTcn/@public.gmane.org \
    --cc=dmaengine-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=joelf-l0cyMroinI0@public.gmane.org \
    --cc=jsarha-l0cyMroinI0@public.gmane.org \
    --cc=lgirdwood-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mporter-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org \
    --cc=vinod.koul-ral2JQCrhuEAvxtiuMwx3w@public.gmane.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;
as well as URLs for NNTP newsgroup(s).