From: Greg Kroah-Hartman Date: Mon, 13 Mar 2023 18:29:15 +0000 (+0100) Subject: ARM/dma-mapping: const a pointer to bus_type in arm_iommu_create_mapping() X-Git-Tag: v6.6.17~5001^2~59 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a3ea9fbc822f9ae9402ffc0954751d7a11f672ea;p=platform%2Fkernel%2Flinux-rpi.git ARM/dma-mapping: const a pointer to bus_type in arm_iommu_create_mapping() Change the function arm_iommu_create_mapping() to take a pointer to a const bus_type as the function does not modify the variable the pointer points to at all, and the driver core bus functions it calls all expect a const * type. Cc: Russell King Cc: Greg Kroah-Hartman Cc: "Russell King (Oracle)" Cc: Arnd Bergmann Cc: Robin Murphy Cc: Kees Cook Cc: Lukas Bulwahn Cc: Ben Dooks Cc: Linus Walleij Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20230313182918.1312597-33-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman --- diff --git a/arch/arm/include/asm/dma-iommu.h b/arch/arm/include/asm/dma-iommu.h index fe9ef6f..82ec1cc 100644 --- a/arch/arm/include/asm/dma-iommu.h +++ b/arch/arm/include/asm/dma-iommu.h @@ -24,7 +24,7 @@ struct dma_iommu_mapping { }; struct dma_iommu_mapping * -arm_iommu_create_mapping(struct bus_type *bus, dma_addr_t base, u64 size); +arm_iommu_create_mapping(const struct bus_type *bus, dma_addr_t base, u64 size); void arm_iommu_release_mapping(struct dma_iommu_mapping *mapping); diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c index 8bc0107..b4a3335 100644 --- a/arch/arm/mm/dma-mapping.c +++ b/arch/arm/mm/dma-mapping.c @@ -1543,7 +1543,7 @@ static const struct dma_map_ops iommu_ops = { * arm_iommu_attach_device function. */ struct dma_iommu_mapping * -arm_iommu_create_mapping(struct bus_type *bus, dma_addr_t base, u64 size) +arm_iommu_create_mapping(const struct bus_type *bus, dma_addr_t base, u64 size) { unsigned int bits = size >> PAGE_SHIFT; unsigned int bitmap_size = BITS_TO_LONGS(bits) * sizeof(long);