Skip to content

Commit 228969b

Browse files
arndbgregkh
authored andcommitted
fix xen_swiotlb_dma_mmap prototype
xen_swiotlb_dma_mmap was backported from v4.10, but older kernels before commit 00085f1efa38 ("dma-mapping: use unsigned long for dma_attrs") use a different signature: arm/xen/mm.c:202:10: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types] .mmap = xen_swiotlb_dma_mmap, ^~~~~~~~~~~~~~~~~~~~ arm/xen/mm.c:202:10: note: (near initialization for 'xen_swiotlb_dma_ops.mmap') This adapts the patch to the old calling conventions. Fixes: "swiotlb-xen: implement xen_swiotlb_dma_mmap callback" Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 079c03f commit 228969b

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

drivers/xen/swiotlb-xen.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -689,7 +689,7 @@ EXPORT_SYMBOL_GPL(xen_swiotlb_set_dma_mask);
689689
int
690690
xen_swiotlb_dma_mmap(struct device *dev, struct vm_area_struct *vma,
691691
void *cpu_addr, dma_addr_t dma_addr, size_t size,
692-
unsigned long attrs)
692+
struct dma_attrs *attrs)
693693
{
694694
#if defined(CONFIG_ARM) || defined(CONFIG_ARM64)
695695
if (__generic_dma_ops(dev)->mmap)

include/xen/swiotlb-xen.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,5 +62,5 @@ xen_swiotlb_set_dma_mask(struct device *dev, u64 dma_mask);
6262
extern int
6363
xen_swiotlb_dma_mmap(struct device *dev, struct vm_area_struct *vma,
6464
void *cpu_addr, dma_addr_t dma_addr, size_t size,
65-
unsigned long attrs);
65+
struct dma_attrs *attrs);
6666
#endif /* __LINUX_SWIOTLB_XEN_H */

0 commit comments

Comments
 (0)