dma-mapping: no need to pass a bus_type into get_arch_dma_ops()
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 14 Feb 2023 14:01:21 +0000 (15:01 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 15 Feb 2023 11:35:20 +0000 (12:35 +0100)
The get_arch_dma_ops() arch-specific function never does anything with
the struct bus_type that is passed into it, so remove it entirely as it
is not needed.

Cc: Richard Henderson <richard.henderson@linaro.org>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: Matt Turner <mattst88@gmail.com>
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>
Cc: Helge Deller <deller@gmx.de>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: x86@kernel.org
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: Robin Murphy <robin.murphy@arm.com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: linux-alpha@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: linux-ia64@vger.kernel.org
Cc: linux-mips@vger.kernel.org
Cc: linux-parisc@vger.kernel.org
Cc: sparclinux@vger.kernel.org
Cc: iommu@lists.linux.dev
Cc: linux-arch@vger.kernel.org
Acked-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20230214140121.131859-1-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/alpha/include/asm/dma-mapping.h
arch/ia64/include/asm/dma-mapping.h
arch/mips/include/asm/dma-mapping.h
arch/parisc/include/asm/dma-mapping.h
arch/sparc/include/asm/dma-mapping.h
arch/x86/include/asm/dma-mapping.h
include/asm-generic/dma-mapping.h
include/linux/dma-map-ops.h

index 0ee6a5c99b16b555a85eafd156d9e252374b4117..6ce7e2041685b3232bae8962215f13f72418785d 100644 (file)
@@ -4,7 +4,7 @@
 
 extern const struct dma_map_ops alpha_pci_ops;
 
-static inline const struct dma_map_ops *get_arch_dma_ops(struct bus_type *bus)
+static inline const struct dma_map_ops *get_arch_dma_ops(void)
 {
 #ifdef CONFIG_ALPHA_JENSEN
        return NULL;
index a5d9d788eede1f1d85181704ac4578ed1ad0caa2..af6fa8e1597c6e144684b235426b96fc28c7309d 100644 (file)
@@ -8,7 +8,7 @@
  */
 extern const struct dma_map_ops *dma_ops;
 
-static inline const struct dma_map_ops *get_arch_dma_ops(struct bus_type *bus)
+static inline const struct dma_map_ops *get_arch_dma_ops(void)
 {
        return dma_ops;
 }
index 34de7b17b41b7215622930cfe06532921fa181f1..0fee561ac7966a0a1e3e6f7bf38f05a8c50ebfda 100644 (file)
@@ -6,7 +6,7 @@
 
 extern const struct dma_map_ops jazz_dma_ops;
 
-static inline const struct dma_map_ops *get_arch_dma_ops(struct bus_type *bus)
+static inline const struct dma_map_ops *get_arch_dma_ops(void)
 {
 #if defined(CONFIG_MACH_JAZZ)
        return &jazz_dma_ops;
index d5bd94247371e062748d3bf6ff5009e12f5b7306..635665004fe66dd29e8b4da4d1070e4d878fc6c1 100644 (file)
@@ -21,7 +21,7 @@
 
 extern const struct dma_map_ops *hppa_dma_ops;
 
-static inline const struct dma_map_ops *get_arch_dma_ops(struct bus_type *bus)
+static inline const struct dma_map_ops *get_arch_dma_ops(void)
 {
        return hppa_dma_ops;
 }
index 2f051343612e8a6c30463195b753a3860790bed1..55c12fc2ba63b532debaed527de4779876fc85a0 100644 (file)
@@ -4,7 +4,7 @@
 
 extern const struct dma_map_ops *dma_ops;
 
-static inline const struct dma_map_ops *get_arch_dma_ops(struct bus_type *bus)
+static inline const struct dma_map_ops *get_arch_dma_ops(void)
 {
        /* sparc32 uses per-device dma_ops */
        return IS_ENABLED(CONFIG_SPARC64) ? dma_ops : NULL;
index 1c66708e3062355bc0b9ca5036f087a495c9aba6..d1dac96ee30b6c85dba641c764a4cabd5330e023 100644 (file)
@@ -4,7 +4,7 @@
 
 extern const struct dma_map_ops *dma_ops;
 
-static inline const struct dma_map_ops *get_arch_dma_ops(struct bus_type *bus)
+static inline const struct dma_map_ops *get_arch_dma_ops(void)
 {
        return dma_ops;
 }
index c13f46109e888393124618937ae105a884d3bbbd..46a0016efd8148552034974e801594580fa0189d 100644 (file)
@@ -2,7 +2,7 @@
 #ifndef _ASM_GENERIC_DMA_MAPPING_H
 #define _ASM_GENERIC_DMA_MAPPING_H
 
-static inline const struct dma_map_ops *get_arch_dma_ops(struct bus_type *bus)
+static inline const struct dma_map_ops *get_arch_dma_ops(void)
 {
        return NULL;
 }
index d678afeb8a13a3a54380a959d14f79bca9c23d8e..41bf4bdb117accace1d0d63b5680dd0c95dde61f 100644 (file)
@@ -90,7 +90,7 @@ static inline const struct dma_map_ops *get_dma_ops(struct device *dev)
 {
        if (dev->dma_ops)
                return dev->dma_ops;
-       return get_arch_dma_ops(dev->bus);
+       return get_arch_dma_ops();
 }
 
 static inline void set_dma_ops(struct device *dev,