summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2021-09-17 11:54:48 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2021-09-17 11:54:48 -0700
commitb9b11b133b4a0b4f8dc36ec04d81d630f763eaa6 (patch)
tree25551d4dcee70f34ada11745efbc2bff21de3840 /arch
parent7639afad8b8d6671a645fb3d6e6fd1432dcdf6ac (diff)
parent59583f747664046aaae5588d56d5954fab66cce8 (diff)
downloadlinux-b9b11b133b4a0b4f8dc36ec04d81d630f763eaa6.tar.bz2
Merge tag 'dma-mapping-5.15-1' of git://git.infradead.org/users/hch/dma-mapping
Pull dma-mapping fixes from Christoph Hellwig: - page align size in sparc32 arch_dma_alloc (Andreas Larsson) - tone down a new dma-debug message (Hamza Mahfooz) - fix the kerneldoc for dma_map_sg_attrs (me) * tag 'dma-mapping-5.15-1' of git://git.infradead.org/users/hch/dma-mapping: sparc32: page align size in arch_dma_alloc dma-debug: prevent an error message from causing runtime problems dma-mapping: fix the kerneldoc for dma_map_sg_attrs
Diffstat (limited to 'arch')
-rw-r--r--arch/sparc/kernel/ioport.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/sparc/kernel/ioport.c b/arch/sparc/kernel/ioport.c
index 8e1d72a16759..7ceae24b0ca9 100644
--- a/arch/sparc/kernel/ioport.c
+++ b/arch/sparc/kernel/ioport.c
@@ -356,7 +356,9 @@ err_nomem:
void arch_dma_free(struct device *dev, size_t size, void *cpu_addr,
dma_addr_t dma_addr, unsigned long attrs)
{
- if (!sparc_dma_free_resource(cpu_addr, PAGE_ALIGN(size)))
+ size = PAGE_ALIGN(size);
+
+ if (!sparc_dma_free_resource(cpu_addr, size))
return;
dma_make_coherent(dma_addr, size);