Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <linux@armlinux.org.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: "Russell King (Oracle)" <rmk+kernel@armlinux.org.uk>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Robin Murphy <robin.murphy@arm.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Lukas Bulwahn <lukas.bulwahn@gmail.com>
Cc: Ben Dooks <ben-linux@fluff.org>
Cc: Linus Walleij <linus.walleij@linaro.org>
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 <gregkh@linuxfoundation.org>

+2 -2
+1 -1
arch/arm/include/asm/dma-iommu.h
··· 24 24 }; 25 25 26 26 struct dma_iommu_mapping * 27 - arm_iommu_create_mapping(struct bus_type *bus, dma_addr_t base, u64 size); 27 + arm_iommu_create_mapping(const struct bus_type *bus, dma_addr_t base, u64 size); 28 28 29 29 void arm_iommu_release_mapping(struct dma_iommu_mapping *mapping); 30 30
+1 -1
arch/arm/mm/dma-mapping.c
··· 1543 1543 * arm_iommu_attach_device function. 1544 1544 */ 1545 1545 struct dma_iommu_mapping * 1546 - arm_iommu_create_mapping(struct bus_type *bus, dma_addr_t base, u64 size) 1546 + arm_iommu_create_mapping(const struct bus_type *bus, dma_addr_t base, u64 size) 1547 1547 { 1548 1548 unsigned int bits = size >> PAGE_SHIFT; 1549 1549 unsigned int bitmap_size = BITS_TO_LONGS(bits) * sizeof(long);