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] [day] [month] [year] [list]
Message-ID: <1eecb651-cce7-b099-e2d2-65dcde357a71@ti.com>
Date:   Tue, 17 Dec 2019 14:15:46 +0200
From:   Peter Ujfalusi <peter.ujfalusi@...com>
To:     Nicolas Saenz Julienne <nsaenzjulienne@...e.de>,
        <ulf.hansson@...aro.org>, <f.fainelli@...il.com>,
        <rjui@...adcom.com>, <sbranden@...adcom.com>
CC:     <vkoul@...nel.org>, <linux-mmc@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>,
        <bcm-kernel-feedback-list@...adcom.com>,
        <linux-rpi-kernel@...ts.infradead.org>,
        <linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH] mmc: bcm2835: Use dma_request_chan() instead
 dma_request_slave_channel()



On 17/12/2019 13.37, Nicolas Saenz Julienne wrote:
> Hi Peter,
> 
> On Tue, 2019-12-17 at 13:26 +0200, Peter Ujfalusi wrote:
>> dma_request_slave_channel() is a wrapper on top of dma_request_chan()
>> eating up the error code.
>>
>> By using dma_request_chan() directly the driver can support deferred
>> probing against DMA.
>>
>> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@...com>
>> ---
>>  drivers/mmc/host/bcm2835.c | 10 +++++++++-
>>  1 file changed, 9 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/mmc/host/bcm2835.c b/drivers/mmc/host/bcm2835.c
>> index 99f61fd2a658..3821f159d36d 100644
>> --- a/drivers/mmc/host/bcm2835.c
>> +++ b/drivers/mmc/host/bcm2835.c
>> @@ -1393,7 +1393,15 @@ static int bcm2835_probe(struct platform_device *pdev)
>>  	host->dma_chan = NULL;
>>  	host->dma_desc = NULL;
>>  
>> -	host->dma_chan_rxtx = dma_request_slave_channel(dev, "rx-tx");
>> +	host->dma_chan_rxtx = dma_request_chan(dev, "rx-tx");
>> +	if (IS_ERR(host->dma_chan_rxtx)) {
>> +		if (PTR_ERR(host->dma_chan_rxtx) == -EPROBE_DEFER)
>> +			return -EPROBE_DEFER;
> 
> I think you should 'goto err' here, as you have to free the mmc host structure
> allocated earlier in the probe function.

You are right.

> Other than that the patch looks good to me.
> 
> Regards,
> Nicolas
> 

- Péter

Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ