Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1419727
| Path | csiph.com!feeder.erje.net!1.us.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!newsfeed.straub-nv.de!news.mixmin.net!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | "Luis R. Rodriguez" <mcgrof@kernel.org> |
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v4 01/44] dma-mapping: Use unsigned long for dma_attrs |
| Date | Fri, 10 Jun 2016 23:10:01 +0200 |
| Message-ID | <rIBQJ-1R3-11@gated-at.bofh.it> (permalink) |
| References | <rIrHH-3il-3@gated-at.bofh.it> <rIrRo-3lN-31@gated-at.bofh.it> <rIvUZ-5O9-17@gated-at.bofh.it> <rIB4m-1c8-25@gated-at.bofh.it> <rIBe1-1h7-1@gated-at.bofh.it> <rIBxn-1rC-9@gated-at.bofh.it> |
| X-Original-To | Krzysztof Kozlowski <k.kozlowski@samsung.com> |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset=us-ascii |
| Content-Disposition | inline |
| User-Agent | Mutt/1.5.21 (2010-09-15) |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 41 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | "Luis R. Rodriguez" <mcgrof@kernel.org>, Andrew Morton <akpm@linux-foundation.org>, hch@infradead.org, Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>, Jonathan Corbet <corbet@lwn.net>, Russell King <rmk+kernel@arm.linux.org.uk>, Robin Murphy <robin.murphy@arm.com>, Marek Szyprowski <m.szyprowski@samsung.com>, Doug Anderson <armlinux@m.disordat.com>, Will Deacon <will.deacon@arm.com>, Joerg Roedel <jroedel@suse.de>, Christian Borntraeger <borntraeger@de.ibm.com>, Zhen Lei <thunder.leizhen@huawei.com>, "Michael S. Tsirkin" <mst@redhat.com>, Andy Lutomirski <luto@kernel.org>, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org |
| X-Original-Date | Fri, 10 Jun 2016 23:08:07 +0200 |
| X-Original-Message-ID | <20160610210807.GF11948@wotan.suse.de> |
| X-Original-References | <1465553521-27303-1-git-send-email-k.kozlowski@samsung.com> <1465553521-27303-2-git-send-email-k.kozlowski@samsung.com> <20160610144947.GD11948@wotan.suse.de> <20160610201600.GB2235@kozik-lap> <20160610202347.GE11948@wotan.suse.de> <20160610204419.GA4239@kozik-lap> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1419727 |
Show key headers only | View raw
On Fri, Jun 10, 2016 at 10:44:19PM +0200, Krzysztof Kozlowski wrote:
> On Fri, Jun 10, 2016 at 10:23:47PM +0200, Luis R. Rodriguez wrote:
> > On Fri, Jun 10, 2016 at 10:16:00PM +0200, Krzysztof Kozlowski wrote:
> > > The dma-attrs in current form were added around 2008 in 74bc7ceebfa1
> > > ("dma: add dma_*map*_attrs() interfaces"), I think. Since that time, for
> > > example, the dma_map_*_attrs() did not change.
> >
> > So we don't expect this to change either?
>
> I do not know, I am not aware of planned changes to that.
If this will not change then I think this change is good.
> > > > If the concern is the const data, why not require const struct dma_attr
> > > > for the APIs that we know can and should use const ?
> > >
> > > The const is one concern. Complicated (more than expected) usage of dma
> > > attributes by the caller is second.
> > >
> > > Switching it to const would also reduce the possibilities of API
> > > extension.
> >
> > My point was that const can be used for only APIs that we are sure of
> > that need it.
>
> As of now, dma_attrs should be const everywhere. That would be almost
> the same patchset as current one. If you consider extending the
> dma_attrs to something new and not yet known, then how will
> differentiate between cases when 'const' is needed for sure?
Depends on the use case, but if it known it should always be const
then great.
> I understand your concern. Sticking to current API for that reason might
> be a good defensive API programming... or might be way of keeping this
> function prototype for long...
Since this hasn't changed for years at all I think your change
is reasonable.
Luis
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v4 01/44] dma-mapping: Use unsigned long for dma_attrs Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2016-06-10 12:30 +0200
Re: [PATCH v4 01/44] dma-mapping: Use unsigned long for dma_attrs "Luis R. Rodriguez" <mcgrof@kernel.org> - 2016-06-10 16:50 +0200
Re: [PATCH v4 01/44] dma-mapping: Use unsigned long for dma_attrs Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2016-06-10 22:20 +0200
Re: [PATCH v4 01/44] dma-mapping: Use unsigned long for dma_attrs "Luis R. Rodriguez" <mcgrof@kernel.org> - 2016-06-10 22:30 +0200
Re: [PATCH v4 01/44] dma-mapping: Use unsigned long for dma_attrs Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2016-06-10 22:50 +0200
Re: [PATCH v4 01/44] dma-mapping: Use unsigned long for dma_attrs "Luis R. Rodriguez" <mcgrof@kernel.org> - 2016-06-10 23:10 +0200
Re: [PATCH v4 01/44] dma-mapping: Use unsigned long for dma_attrs Christoph Hellwig <hch@infradead.org> - 2016-06-13 18:10 +0200
Re: [PATCH v4 01/44] dma-mapping: Use unsigned long for dma_attrs "Luis R. Rodriguez" <mcgrof@kernel.org> - 2016-06-13 19:50 +0200
csiph-web