The patch titled Subject: arm64: dma-mapping: constify attrs passed to internal functions has been added to the -mm tree. Its filename is arm64-dma-mapping-constify-attrs-passed-to-internal-functions.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/arm64-dma-mapping-constify-attrs-passed-to-internal-functions.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/arm64-dma-mapping-constify-attrs-passed-to-internal-functions.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Krzysztof Kozlowski <k.kozlowski@xxxxxxxxxxx> Subject: arm64: dma-mapping: constify attrs passed to internal functions Some of the non-exported functions do not modify passed dma_attrs so the pointer can point to const data. Link: http://lkml.kernel.org/r/1464071290-15948-4-git-send-email-k.kozlowski@xxxxxxxxxxx Signed-off-by: Krzysztof Kozlowski <k.kozlowski@xxxxxxxxxxx> Cc: Russell King <linux@xxxxxxxxxxxxxxx> Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx> Cc: Catalin Marinas <catalin.marinas@xxxxxxx> Cc: Will Deacon <will.deacon@xxxxxxx> Cc: Joerg Roedel <joro@xxxxxxxxxx> Cc: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx> Cc: Marek Szyprowski <m.szyprowski@xxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- arch/arm64/mm/dma-mapping.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff -puN arch/arm64/mm/dma-mapping.c~arm64-dma-mapping-constify-attrs-passed-to-internal-functions arch/arm64/mm/dma-mapping.c --- a/arch/arm64/mm/dma-mapping.c~arm64-dma-mapping-constify-attrs-passed-to-internal-functions +++ a/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, 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 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); _ Patches currently in -mm which might be from k.kozlowski@xxxxxxxxxxx are dma-mapping-constify-attrs-passed-to-dma_get_attr.patch arm-dma-mapping-constify-attrs-passed-to-internal-functions.patch arm64-dma-mapping-constify-attrs-passed-to-internal-functions.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html