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:40:05 +0200
From:	Peter Ujfalusi <peter.ujfalusi@...com>
To:	"Shevchenko, Andriy" <andriy.shevchenko@...el.com>
CC:	"davinci-linux-open-source@...ux.davincidsp.com" 
	<davinci-linux-open-source@...ux.davincidsp.com>,
	"alsa-devel@...a-project.org" <alsa-devel@...a-project.org>,
	"joelf@...com" <joelf@...com>,
	"Koul, Vinod" <vinod.koul@...el.com>,
	"nsekhar@...com" <nsekhar@...com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Jyri Sarha <jsarha@...com>,
	Liam Girdwood <lgirdwood@...il.com>,
	Tony Lindgren <tony@...mide.com>,
	Mark Brown <broonie@...nel.org>,
	"mporter@...aro.org" <mporter@...aro.org>,
	"dmaengine@...r.kernel.org" <dmaengine@...r.kernel.org>,
	"Williams, Dan J" <dan.j.williams@...el.com>,
	"linux-omap@...r.kernel.org" <linux-omap@...r.kernel.org>,
	"linux-arm-kernel@...ts.infradead.org" 
	<linux-arm-kernel@...ts.infradead.org>
Subject: Re: [alsa-devel] [PATCH 13/18] dma: edma: Print the direction value
 as well when it is not supported

On 03/13/2014 03:03 PM, Shevchenko, Andriy wrote:
> On Thu, 2014-03-13 at 11:18 +0200, Peter Ujfalusi wrote:
>> In case of not supported direction it is better to print the direction also.
>> It is unlikely, but in such an event it helps with the debugging.
>>
>> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@...com>
>> ---
>>  drivers/dma/edma.c | 4 ++--
>>  1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/dma/edma.c b/drivers/dma/edma.c
>> index 47abaac7eb18..69dd4e3de67e 100644
>> --- a/drivers/dma/edma.c
>> +++ b/drivers/dma/edma.c
>> @@ -426,7 +426,7 @@ static struct dma_async_tx_descriptor *edma_prep_slave_sg(
>>  		dev_width = echan->cfg.dst_addr_width;
>>  		burst = echan->cfg.dst_maxburst;
>>  	} else {
>> -		dev_err(dev, "%s: bad direction?\n", __func__);
>> +		dev_err(dev, "%s: bad direction: %d\n", __func__, direction);
> 
> Is it possible to have direction less than zero? Maybe %u?

It is 'enum dma_transfer_direction direction'. %d should be fine.

> 
>>  		return NULL;
>>  	}
>>  
>> @@ -519,7 +519,7 @@ static struct dma_async_tx_descriptor *edma_prep_dma_cyclic(
>>  		dev_width = echan->cfg.dst_addr_width;
>>  		burst = echan->cfg.dst_maxburst;
>>  	} else {
>> -		dev_err(dev, "%s: bad direction?\n", __func__);
>> +		dev_err(dev, "%s: bad direction: %d\n", __func__, direction);
> 
> Ditto.
> 
>>  		return NULL;
>>  	}
>>  
> 
> 


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