dma-debug: make dma_debug_add_bus take a const pointer

JIRA: https://issues.redhat.com/browse/RHEL-28780
Upstream Status: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git

commit 86438841e48f6361f0a6a04805b7d7813738761f
Author: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Date:   Tue Dec 19 14:41:42 2023 +0100

    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>

(cherry picked from commit 86438841e48f6361f0a6a04805b7d7813738761f)
Signed-off-by: Jerry Snitselaar <jsnitsel@redhat.com>
This commit is contained in:
Jerry Snitselaar 2023-12-19 14:41:42 +01:00
parent 9b56f95b9d
commit 3ea76cb5c7
2 changed files with 3 additions and 3 deletions

View File

@ -443,10 +443,10 @@ static inline void arch_teardown_dma_ops(struct device *dev)
#endif /* CONFIG_ARCH_HAS_TEARDOWN_DMA_OPS */
#ifdef CONFIG_DMA_API_DEBUG
void dma_debug_add_bus(struct bus_type *bus);
void dma_debug_add_bus(const struct bus_type *bus);
void debug_dma_dump_mappings(struct device *dev);
#else
static inline void dma_debug_add_bus(struct bus_type *bus)
static inline void dma_debug_add_bus(const struct bus_type *bus)
{
}
static inline void debug_dma_dump_mappings(struct device *dev)

View File

@ -876,7 +876,7 @@ static int dma_debug_device_change(struct notifier_block *nb, unsigned long acti
return 0;
}
void dma_debug_add_bus(struct bus_type *bus)
void dma_debug_add_bus(const struct bus_type *bus)
{
struct notifier_block *nb;