diff options
author | Geert Uytterhoeven <geert@linux-m68k.org> | 2023-09-13 16:08:28 +0200 |
---|---|---|
committer | Geert Uytterhoeven <geert@linux-m68k.org> | 2023-10-06 10:03:03 +0200 |
commit | 4ebe8459cd09c1cd826398e054d055254a50e106 (patch) | |
tree | 1ca408c0bb194c6850d9012f0806eee1bbfb362e /arch/m68k/sun3 | |
parent | 2926da2bea4400932bf7ec13e67b0f92c4e5215e (diff) | |
download | lwn-4ebe8459cd09c1cd826398e054d055254a50e106.tar.gz lwn-4ebe8459cd09c1cd826398e054d055254a50e106.zip |
m68k: sun3: Improve Sun3/3x DVMA abstraction in <asm/dvma.h>
When building with W=1:
arch/m68k/sun3/dvma.c:65:13: warning: no previous prototype for ‘sun3_dvma_init’ [-Wmissing-prototypes]
65 | void __init sun3_dvma_init(void)
| ^~~~~~~~~~~~~~
arch/m68k/sun3x/dvma.c:178:6: warning: no previous prototype for ‘dvma_unmap_iommu’ [-Wmissing-prototypes]
179 | void dvma_unmap_iommu(unsigned long baddr, int len)
| ^~~~~~~~~~~~~~~~
Fix this by moving the declarations for sun3_dvma_init() and
dvma_unmap_iommu() to <asm/dvma.h>. Avoid #ifdefs in callers by
providing dummy static inline functions.
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/ec93ed1b28b75674ae9a0b42de083a9bb140f0b3.1694613528.git.geert@linux-m68k.org
Diffstat (limited to 'arch/m68k/sun3')
-rw-r--r-- | arch/m68k/sun3/sun3dvma.c | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/arch/m68k/sun3/sun3dvma.c b/arch/m68k/sun3/sun3dvma.c index 4b560f4d3960..f66b24132090 100644 --- a/arch/m68k/sun3/sun3dvma.c +++ b/arch/m68k/sun3/sun3dvma.c @@ -20,18 +20,6 @@ #undef DVMA_DEBUG -#ifdef CONFIG_SUN3X -extern void dvma_unmap_iommu(unsigned long baddr, int len); -#else -static inline void dvma_unmap_iommu(unsigned long a, int b) -{ -} -#endif - -#ifdef CONFIG_SUN3 -extern void sun3_dvma_init(void); -#endif - static unsigned long *iommu_use; #define dvma_index(baddr) ((baddr - DVMA_START) >> DVMA_PAGE_SHIFT) @@ -274,10 +262,7 @@ void __init dvma_init(void) dvma_unmap_iommu(DVMA_START, DVMA_SIZE); -#ifdef CONFIG_SUN3 sun3_dvma_init(); -#endif - } unsigned long dvma_map_align(unsigned long kaddr, int len, int align) |