Compiling with armhf GCC 6.2 from Debian testing reports type mismatch
errors stemming from a function call where pointers to members of
struct sunxi_cedrus_dev, are provided as parameters to
dma_alloc_coherent(). An example error report is given below. To fix
this, we modify the types of the offending structure members to match
the type of function parameter.
drivers/media/platform/sunxi-cedrus/sunxi_cedrus_dec.c: In function
‘vidioc_s_fmt’:
drivers/media/platform/sunxi-cedrus/sunxi_cedrus_dec.c:338:30: error: passing
argument 3 of ‘dma_alloc_coherent’ from incompatible pointer type
[-Werror=incompatible-pointer-types]
dev->mbh_buf_size, &dev->mbh_buf, GFP_KERNEL);
^
In file included from ./include/linux/dma-buf.h:31:0,
from ./include/media/videobuf2-core.h:18,
from ./include/media/videobuf2-v4l2.h:16,
from ./include/media/v4l2-mem2mem.h:20,
from drivers/media/platform/sunxi-cedrus/sunxi_cedrus_dec.c:25:
./include/linux/dma-mapping.h:491:21: note: expected ‘dma_addr_t * {aka long
long unsigned int *}’ but argument is of type ‘unsigned int *’
static inline void *dma_alloc_coherent(struct device *dev, size_t size,
^~~~~~~~~~~~~~~~~~
Signed-off-by: Bob Ham <[email protected]>
---
drivers/media/platform/sunxi-cedrus/sunxi_cedrus_common.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/media/platform/sunxi-cedrus/sunxi_cedrus_common.h
b/drivers/media/platform/sunxi-cedrus/sunxi_cedrus_common.h
index 8ef78564d6a6..6de79eccaca0 100644
--- a/drivers/media/platform/sunxi-cedrus/sunxi_cedrus_common.h
+++ b/drivers/media/platform/sunxi-cedrus/sunxi_cedrus_common.h
@@ -53,9 +53,9 @@ struct sunxi_cedrus_dev {
char *base;
- unsigned int mbh_buf;
- unsigned int dcac_buf;
- unsigned int ncf_buf;
+ dma_addr_t mbh_buf;
+ dma_addr_t dcac_buf;
+ dma_addr_t ncf_buf;
void *mbh_buf_virt;
void *dcac_buf_virt;
--
2.11.0
--
You received this message because you are subscribed to the Google Groups
"linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.