dma-mapping: cosolidate dma_mapping_error
Currently there are three valid implementations of dma_mapping_error: (1) call ->mapping_error (2) check for a hardcoded error code (3) always return 0 This patch provides a common implementation that calls ->mapping_error if present, then checks for DMA_ERROR_CODE if defined or otherwise returns 0. [jcmvbkbc@gmail.com: fix xtensa] Signed-off-by:Christoph Hellwig <hch@lst.de> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Russell King <linux@arm.linux.org.uk> Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: Will Deacon <will.deacon@arm.com> Cc: Yoshinori Sato <ysato@users.sourceforge.jp> Cc: Michal Simek <monstr@monstr.eu> Cc: Jonas Bonn <jonas@southpole.se> Cc: Chris Metcalf <cmetcalf@ezchip.com> Cc: Guan Xuetao <gxt@mprc.pku.edu.cn> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Ingo Molnar <mingo@elte.hu> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by:
Max Filippov <jcmvbkbc@gmail.com> Signed-off-by:
Andrew Morton <akpm@linux-foundation.org> Signed-off-by:
Linus Torvalds <torvalds@linux-foundation.org>
Showing
- arch/alpha/include/asm/dma-mapping.h 0 additions, 5 deletionsarch/alpha/include/asm/dma-mapping.h
- arch/arm/include/asm/dma-mapping.h 0 additions, 9 deletionsarch/arm/include/asm/dma-mapping.h
- arch/arm64/include/asm/dma-mapping.h 0 additions, 7 deletionsarch/arm64/include/asm/dma-mapping.h
- arch/h8300/include/asm/dma-mapping.h 0 additions, 5 deletionsarch/h8300/include/asm/dma-mapping.h
- arch/hexagon/include/asm/dma-mapping.h 1 addition, 10 deletionsarch/hexagon/include/asm/dma-mapping.h
- arch/ia64/include/asm/dma-mapping.h 0 additions, 7 deletionsarch/ia64/include/asm/dma-mapping.h
- arch/microblaze/include/asm/dma-mapping.h 0 additions, 11 deletionsarch/microblaze/include/asm/dma-mapping.h
- arch/mips/include/asm/dma-mapping.h 0 additions, 8 deletionsarch/mips/include/asm/dma-mapping.h
- arch/openrisc/include/asm/dma-mapping.h 0 additions, 5 deletionsarch/openrisc/include/asm/dma-mapping.h
- arch/powerpc/include/asm/dma-mapping.h 2 additions, 15 deletionsarch/powerpc/include/asm/dma-mapping.h
- arch/s390/include/asm/dma-mapping.h 0 additions, 10 deletionsarch/s390/include/asm/dma-mapping.h
- arch/sh/include/asm/dma-mapping.h 2 additions, 11 deletionsarch/sh/include/asm/dma-mapping.h
- arch/sparc/include/asm/dma-mapping.h 0 additions, 6 deletionsarch/sparc/include/asm/dma-mapping.h
- arch/tile/include/asm/dma-mapping.h 0 additions, 7 deletionsarch/tile/include/asm/dma-mapping.h
- arch/unicore32/include/asm/dma-mapping.h 0 additions, 10 deletionsarch/unicore32/include/asm/dma-mapping.h
- arch/x86/include/asm/dma-mapping.h 0 additions, 11 deletionsarch/x86/include/asm/dma-mapping.h
- arch/xtensa/include/asm/dma-mapping.h 0 additions, 9 deletionsarch/xtensa/include/asm/dma-mapping.h
- include/asm-generic/dma-mapping-common.h 14 additions, 0 deletionsinclude/asm-generic/dma-mapping-common.h
Loading
Please register or sign in to comment