Re: [PATCH v2 1/2] dma-mapping: move dma configuration to bus infrastructure

2018-03-24 Thread kbuild test robot
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

RE: [PATCH v2 1/2] dma-mapping: move dma configuration to bus infrastructure

2018-03-22 Thread Nipun Gupta
> -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

Re: [PATCH v2 1/2] dma-mapping: move dma configuration to bus infrastructure

2018-03-22 Thread h...@lst.de
> > +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.

Re: [PATCH v2 1/2] dma-mapping: move dma configuration to bus infrastructure

2018-03-22 Thread Christoph Hellwig
> +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,

RE: [PATCH v2 1/2] dma-mapping: move dma configuration to bus infrastructure

2018-03-21 Thread Nipun Gupta
> -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; > > +} >

Re: [PATCH v2 1/2] dma-mapping: move dma configuration to bus infrastructure

2018-03-21 Thread Greg KH
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

RE: [PATCH v2 1/2] dma-mapping: move dma configuration to bus infrastructure

2018-03-21 Thread Nipun Gupta
> -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->

RE: [PATCH v2 1/2] dma-mapping: move dma configuration to bus infrastructure

2018-03-21 Thread Bharat Bhushan
..@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

[PATCH v2 1/2] dma-mapping: move dma configuration to bus infrastructure

2018-03-20 Thread Nipun Gupta
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