lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 13 Mar 2014 15:37:56 +0200
From:	Peter Ujfalusi <peter.ujfalusi@...com>
To:	"Shevchenko, Andriy" <andriy.shevchenko@...el.com>
CC:	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"alsa-devel@...a-project.org" <alsa-devel@...a-project.org>,
	"linux-omap@...r.kernel.org" <linux-omap@...r.kernel.org>,
	"linux-arm-kernel@...ts.infradead.org" 
	<linux-arm-kernel@...ts.infradead.org>,
	"dmaengine@...r.kernel.org" <dmaengine@...r.kernel.org>,
	"davinci-linux-open-source@...ux.davincidsp.com" 
	<davinci-linux-open-source@...ux.davincidsp.com>,
	"joelf@...com" <joelf@...com>, Mark Brown <broonie@...nel.org>,
	Liam Girdwood <lgirdwood@...il.com>,
	Tony Lindgren <tony@...mide.com>,
	"nsekhar@...com" <nsekhar@...com>, Jyri Sarha <jsarha@...com>,
	"mporter@...aro.org" <mporter@...aro.org>,
	"Koul, Vinod" <vinod.koul@...el.com>,
	"Williams, Dan J" <dan.j.williams@...el.com>
Subject: Re: [PATCH 10/18] dma: edma: Reduce debug print verbosity for non
 verbose debugging

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@...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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ