Skip to content

Commit b9b11b1

Browse files
committed
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
2 parents 7639afa + 59583f7 commit b9b11b1

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

arch/sparc/kernel/ioport.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,9 @@ void *arch_dma_alloc(struct device *dev, size_t size, dma_addr_t *dma_handle,
356356
void arch_dma_free(struct device *dev, size_t size, void *cpu_addr,
357357
dma_addr_t dma_addr, unsigned long attrs)
358358
{
359-
if (!sparc_dma_free_resource(cpu_addr, PAGE_ALIGN(size)))
359+
size = PAGE_ALIGN(size);
360+
361+
if (!sparc_dma_free_resource(cpu_addr, size))
360362
return;
361363

362364
dma_make_coherent(dma_addr, size);

kernel/dma/debug.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -567,7 +567,8 @@ static void add_dma_entry(struct dma_debug_entry *entry)
567567
pr_err("cacheline tracking ENOMEM, dma-debug disabled\n");
568568
global_disable = true;
569569
} else if (rc == -EEXIST) {
570-
pr_err("cacheline tracking EEXIST, overlapping mappings aren't supported\n");
570+
err_printk(entry->dev, entry,
571+
"cacheline tracking EEXIST, overlapping mappings aren't supported\n");
571572
}
572573
}
573574

kernel/dma/mapping.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,8 @@ static int __dma_map_sg_attrs(struct device *dev, struct scatterlist *sg,
206206
/**
207207
* dma_map_sg_attrs - Map the given buffer for DMA
208208
* @dev: The device for which to perform the DMA operation
209-
* @sg: The sg_table object describing the buffer
209+
* @sg: The sg_table object describing the buffer
210+
* @nents: Number of entries to map
210211
* @dir: DMA direction
211212
* @attrs: Optional DMA attributes for the map operation
212213
*

0 commit comments

Comments
 (0)