Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1405871
| From | Krzysztof Kozlowski <k.kozlowski@samsung.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 3/4] arm64: dma-mapping: Constify attrs passed to internal functions |
| Date | 2016-05-24 08:30 +0200 |
| Message-ID | <rCe0N-89R-17@gated-at.bofh.it> (permalink) |
| References | <rCe0N-89R-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Some of the non-exported functions do not modify passed dma_attrs so the
pointer can point to const data.
Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
---
arch/arm64/mm/dma-mapping.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/arm64/mm/dma-mapping.c b/arch/arm64/mm/dma-mapping.c
index c566ec83719f..0ef620a34c4e 100644
--- a/arch/arm64/mm/dma-mapping.c
+++ b/arch/arm64/mm/dma-mapping.c
@@ -29,7 +29,7 @@
#include <asm/cacheflush.h>
-static pgprot_t __get_dma_pgprot(struct dma_attrs *attrs, pgprot_t prot,
+static pgprot_t __get_dma_pgprot(const struct dma_attrs *attrs, pgprot_t prot,
bool coherent)
{
if (!coherent || dma_get_attr(DMA_ATTR_WRITE_COMBINE, attrs))
@@ -88,7 +88,7 @@ static int __free_from_pool(void *start, size_t size)
static void *__dma_alloc_coherent(struct device *dev, size_t size,
dma_addr_t *dma_handle, gfp_t flags,
- struct dma_attrs *attrs)
+ const struct dma_attrs *attrs)
{
if (dev == NULL) {
WARN_ONCE(1, "Use an actual device structure for DMA allocation\n");
@@ -118,7 +118,7 @@ static void *__dma_alloc_coherent(struct device *dev, size_t size,
static void __dma_free_coherent(struct device *dev, size_t size,
void *vaddr, dma_addr_t dma_handle,
- struct dma_attrs *attrs)
+ const struct dma_attrs *attrs)
{
bool freed;
phys_addr_t paddr = dma_to_phys(dev, dma_handle);
--
1.9.1
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/4] dma-mapping: Constify dma_attrs Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2016-05-24 08:30 +0200
[PATCH 3/4] arm64: dma-mapping: Constify attrs passed to internal functions Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2016-05-24 08:30 +0200
[PATCH 2/4] ARM: dma-mapping: Constify attrs passed to internal functions Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2016-05-24 08:30 +0200
Re: [PATCH 2/4] ARM: dma-mapping: Constify attrs passed to internal functions Russell King - ARM Linux <linux@armlinux.org.uk> - 2016-05-24 10:40 +0200
[PATCH 1/4] dma-mapping: Constify attrs passed to dma_get_attr Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2016-05-24 08:30 +0200
[RFC 4/4] dma-mapping: Constify dma_attrs Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2016-05-24 08:30 +0200
Re: [PATCH 0/4] dma-mapping: Constify dma_attrs Christoph Hellwig <hch@infradead.org> - 2016-05-24 11:20 +0200
Re: [PATCH 0/4] dma-mapping: Constify dma_attrs Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2016-05-25 14:40 +0200
csiph-web