From 5714d24869a65b639f8192eb15bc14193da86e36 Mon Sep 17 00:00:00 2001 From: Lee Jones Date: Tue, 13 Aug 2024 17:25:26 +0100 Subject: [PATCH] ANDROID: dma-buf: Follow function parameter type change Commit b9578c494563 ("dma-buf/heaps: Correct the types of fd_flags and heap_flags") changed the expected types of a bunch of 'allocate' related function calls. In order to avoid build failures, we need to follow them. Fixes the following build errors: ...unsigned long, unsigned int, unsigned long long)') with an expression of type 'struct dma_buf *(struct dma_heap *, unsigned long, unsigned long, unsigned long)' [-Wincompatible-function-pointer-types] 520 | .allocate = system_uncached_heap_not_initialized, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ...*)(struct dma_heap *, unsigned long, unsigned int, unsigned long long)') from 'struct dma_buf *(struct dma_heap *, unsigned long, unsigned long, unsigned long)' [-Wincompatible-function-pointer-types] 545 | system_uncached_heap_ops.allocate = system_uncached_heap_allocate; Fixes: b9578c494563 ("dma-buf/heaps: Correct the types of fd_flags and heap_flags") Change-Id: Ic349064cc67e20dcd97a58995cdee010508e8f0e Signed-off-by: Lee Jones --- drivers/dma-buf/heaps/system_heap.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/dma-buf/heaps/system_heap.c b/drivers/dma-buf/heaps/system_heap.c index 2b4af3143ab2..af03ea581596 100644 --- a/drivers/dma-buf/heaps/system_heap.c +++ b/drivers/dma-buf/heaps/system_heap.c @@ -500,8 +500,8 @@ static const struct dma_heap_ops system_heap_ops = { static struct dma_buf *system_uncached_heap_allocate(struct dma_heap *heap, unsigned long len, - unsigned long fd_flags, - unsigned long heap_flags) + u32 fd_flags, + u64 heap_flags) { return system_heap_do_allocate(heap, len, fd_flags, heap_flags, true); } @@ -509,8 +509,8 @@ static struct dma_buf *system_uncached_heap_allocate(struct dma_heap *heap, /* Dummy function to be used until we can call coerce_mask_and_coherent */ static struct dma_buf *system_uncached_heap_not_initialized(struct dma_heap *heap, unsigned long len, - unsigned long fd_flags, - unsigned long heap_flags) + u32 fd_flags, + u64 heap_flags) { return ERR_PTR(-EBUSY); }