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

dma-debug: make dma_debug_add_bus take a const pointer

The driver core now can handle a const struct bus_type pointer, and the
dma_debug_add_bus() call just passes on the pointer give to it to the
driver core, so make this pointer const as well to allow everyone to use
read-only struct bus_type pointers going forward.

Cc: Christoph Hellwig <hch@lst.de>
Cc: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: Robin Murphy <robin.murphy@arm.com>
Cc: <iommu@lists.linux.dev>
Reviewed-by: Robin Murphy <robin.murphy@arm.com>
Link: https://lore.kernel.org/r/2023121941-dejected-nugget-681e@gregkh
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

+3 -3
+2 -2
include/linux/dma-map-ops.h
··· 443 443 #endif /* CONFIG_ARCH_HAS_TEARDOWN_DMA_OPS */ 444 444 445 445 #ifdef CONFIG_DMA_API_DEBUG 446 - void dma_debug_add_bus(struct bus_type *bus); 446 + void dma_debug_add_bus(const struct bus_type *bus); 447 447 void debug_dma_dump_mappings(struct device *dev); 448 448 #else 449 - static inline void dma_debug_add_bus(struct bus_type *bus) 449 + static inline void dma_debug_add_bus(const struct bus_type *bus) 450 450 { 451 451 } 452 452 static inline void debug_dma_dump_mappings(struct device *dev)
+1 -1
kernel/dma/debug.c
··· 876 876 return 0; 877 877 } 878 878 879 - void dma_debug_add_bus(struct bus_type *bus) 879 + void dma_debug_add_bus(const struct bus_type *bus) 880 880 { 881 881 struct notifier_block *nb; 882 882