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]
Message-ID: <20180803075250.GA29473@hsj-Precision-5520>
Date:   Fri, 3 Aug 2018 15:52:51 +0800
From:   Huang Shijie <sjhuang@...vatar.ai>
To:     Peter Ujfalusi <peter.ujfalusi@...com>
Cc:     vkoul@...nel.org, dmaengine@...r.kernel.org,
        linux-kernel@...r.kernel.org, dave.jiang@...el.com,
        radhey.shyam.pandey@...inx.com, appana.durga.rao@...inx.com,
        jmkrzyszt@...il.com, gomonovych@...il.com, keescook@...omium.org,
        horms+renesas@...ge.net.au, geert+renesas@...der.be,
        shawnguo@...nel.org, baoyou.xie@...aro.org,
        michal.simek@...inx.com, baohua@...nel.org,
        ludovic.desroches@...rochip.com, linus.walleij@...aro.org,
        david.brown@...aro.org
Subject: Re: [PATCH 07/46] dmaengine: omap-dma: use
 dmaenginem_async_device_register to simplify the code

On Fri, Aug 03, 2018 at 10:47:30AM +0300, Peter Ujfalusi wrote:
> 
> 
> On 2018-08-03 10:19, Huang Shijie wrote:
> > Use dmaenginem_async_device_register to simplify the code:
> >    remove dma_async_device_unregister
> > 
> > Signed-off-by: Huang Shijie <sjhuang@...vatar.ai>
> > ---
> >  drivers/dma/ti/omap-dma.c | 5 +----
> >  1 file changed, 1 insertion(+), 4 deletions(-)
> > 
> > diff --git a/drivers/dma/ti/omap-dma.c b/drivers/dma/ti/omap-dma.c
> > index a4a931ddf6f6..085748c6eb67 100644
> > --- a/drivers/dma/ti/omap-dma.c
> > +++ b/drivers/dma/ti/omap-dma.c
> > @@ -1566,7 +1566,7 @@ static int omap_dma_probe(struct platform_device *pdev)
> >  		}
> >  	}
> >  
> > -	rc = dma_async_device_register(&od->ddev);
> > +	rc = dmaenginem_async_device_register(&od->ddev);
> 
> Why it is dmaenginem_async_device_register() and not aligned other
> resource managed functions (devm_* dmam_*), like
> devm_dma_async_device_register()
Vinod prefer the this dmaenginem_async_device_register..	
> 
> and in dmaenginem_async_device_register() what is the 'm' in dmaenginem ?
> DMAengine Managed?
Yes.
> 
> >  	if (rc) {
> >  		pr_warn("OMAP-DMA: failed to register slave DMA engine device: %d\n",
> >  			rc);
> > @@ -1584,7 +1584,6 @@ static int omap_dma_probe(struct platform_device *pdev)
> >  				of_dma_simple_xlate, &omap_dma_info);
> >  		if (rc) {
> >  			pr_warn("OMAP-DMA: failed to register DMA controller\n");
> > -			dma_async_device_unregister(&od->ddev);
> >  			omap_dma_free(od);
> >  		}
> >  	}
> > @@ -1606,8 +1605,6 @@ static int omap_dma_remove(struct platform_device *pdev)
> >  	irq = platform_get_irq(pdev, 1);
> >  	devm_free_irq(&pdev->dev, irq, od);
> >  
> > -	dma_async_device_unregister(&od->ddev);
> > -
> 
> I think this is a bad idea in general.
> We need to unregister the dma-device before we clean up and free resources.
okay, thanks for pointing here.
We can drop this patch now...

> 
> >  	if (!od->legacy) {
> >  		/* Disable all interrupts */
> >  		omap_dma_glbl_write(od, IRQENABLE_L0, 0);
> > 
> 
> I'm sorry to say, but it is a NACK from me.
No problem.

Thanks
Huang Shijie

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ