* [PATCH] dma-buf: fix compilation of the userspace header
@ 2020-10-01 8:21 Jerome Pouiller
0 siblings, 0 replies; only message in thread
From: Jerome Pouiller @ 2020-10-01 8:21 UTC (permalink / raw)
To: linux-media
Cc: linaro-mm-sig, Daniel Vetter, Martin Liu, Sumit Semwal,
Jérôme Pouiller
From: Jérôme Pouiller <jerome.pouiller@silabs.com>
The typedefs u{8,16,32,64} do not exist in userspace. However, the
ioctls DMA_BUF_SET_NAME_A and DMA_BUF_SET_NAME_B use them. So,
currently, these ioctl cannot be directly called from userspace code:
ioctls_list.c:436:29: error: ‘u32’ undeclared here (not in a function)
436 | { DMA_BUF_SET_NAME_A, -1, -1 }, // linux/dma-buf.h
| ^~~~~~~~~~~~~~~~~~
ioctls_list.c:437:29: error: ‘u64’ undeclared here (not in a function)
437 | { DMA_BUF_SET_NAME_B, -1, -1 }, // linux/dma-buf.h
| ^~~~~~~~~~~~~~~~~~
Replacing u32/u64 by __u32/__u64 is sufficient to solve the problem.
Fixes: c11e391da2a8 ("dma-buf: Add ioctls to allow userspace to flush")
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
---
include/uapi/linux/dma-buf.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/uapi/linux/dma-buf.h b/include/uapi/linux/dma-buf.h
index 7f30393b92c3..f76d11725c6c 100644
--- a/include/uapi/linux/dma-buf.h
+++ b/include/uapi/linux/dma-buf.h
@@ -44,7 +44,7 @@ struct dma_buf_sync {
* between them in actual uapi, they're just different numbers.
*/
#define DMA_BUF_SET_NAME _IOW(DMA_BUF_BASE, 1, const char *)
-#define DMA_BUF_SET_NAME_A _IOW(DMA_BUF_BASE, 1, u32)
-#define DMA_BUF_SET_NAME_B _IOW(DMA_BUF_BASE, 1, u64)
+#define DMA_BUF_SET_NAME_A _IOW(DMA_BUF_BASE, 1, __u32)
+#define DMA_BUF_SET_NAME_B _IOW(DMA_BUF_BASE, 1, __u64)
#endif
--
2.28.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2020-10-01 8:21 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-01 8:21 [PATCH] dma-buf: fix compilation of the userspace header Jerome Pouiller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).