Hi Nipun,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on linus/master]
[also build test ERROR on v4.16-rc6]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system]
url:
https://github.com/0day-ci/linux/commits/Nipun-Gu
> -Original Message-
> From: Christoph Hellwig [mailto:h...@lst.de]
> Sent: Thursday, March 22, 2018 13:46
> To: Nipun Gupta
>
> > +static int amba_dma_configure(struct device *dev)
> > +{
> > + return dma_common_configure(dev);
> > +}
>
> So it turns out we only end with two callers
> > +int dma_configure(struct device *dev)
> > +{
> > + if (dev->bus->dma_configure)
> > + return dev->bus->dma_configure(dev);
>
> What if dma_common_configure() is called in case "bus->dma_configure" is not
> defined?
Then we'd still have a dependency of common code on OF and ACPI.
> +static int amba_dma_configure(struct device *dev)
> +{
> + return dma_common_configure(dev);
> +}
So it turns out we only end with two callers of dma_common_configure
after this series. Based ont hat I'm tempted with the suggestion
from Robin to just have amba call platform_dma_configure,
> -Original Message-
> From: Greg KH [mailto:gre...@linuxfoundation.org]
> Sent: Wednesday, March 21, 2018 15:00
> > +int dma_configure(struct device *dev)
> > +{
> > + if (dev->bus->dma_configure)
> > + return dev->bus->dma_configure(dev);
> > +
> > + return 0;
> > +}
>
On Wed, Mar 21, 2018 at 12:25:22PM +0530, Nipun Gupta wrote:
> It's bus specific aspect to map a given device on the bus and
> relevant firmware description of its DMA configuration.
> So, this change introduces '/dma_configure/' as bus callback
> giving flexibility to busses for implementing its o
> -Original Message-
> From: Bharat Bhushan
> Sent: Wednesday, March 21, 2018 12:49
> >
> > +int dma_configure(struct device *dev)
> > +{
> > + if (dev->bus->dma_configure)
> > + return dev->bus->dma_configure(dev);
>
> What if dma_common_configure() is called in case "bus->
..@vger.kernel.org; Bharat Bhushan
> ; Leo Li ; Nipun Gupta
>
> Subject: [PATCH v2 1/2] dma-mapping: move dma configuration to bus
> infrastructure
>
> It's bus specific aspect to map a given device on the bus and relevant
> firmware
> description of its DMA configurat
It's bus specific aspect to map a given device on the bus and
relevant firmware description of its DMA configuration.
So, this change introduces '/dma_configure/' as bus callback
giving flexibility to busses for implementing its own dma
configuration function.
The change eases the addition of new
9 matches
Mail list logo