aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/asm-generic/ioctl.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/asm-generic/ioctl.h b/include/asm-generic/ioctl.h
index d17295b290fa..297fb0d7cd6c 100644
--- a/include/asm-generic/ioctl.h
+++ b/include/asm-generic/ioctl.h
@@ -3,10 +3,15 @@
3 3
4#include <uapi/asm-generic/ioctl.h> 4#include <uapi/asm-generic/ioctl.h>
5 5
6#ifdef __CHECKER__
7#define _IOC_TYPECHECK(t) (sizeof(t))
8#else
6/* provoke compile error for invalid uses of size argument */ 9/* provoke compile error for invalid uses of size argument */
7extern unsigned int __invalid_size_argument_for_IOC; 10extern unsigned int __invalid_size_argument_for_IOC;
8#define _IOC_TYPECHECK(t) \ 11#define _IOC_TYPECHECK(t) \
9 ((sizeof(t) == sizeof(t[1]) && \ 12 ((sizeof(t) == sizeof(t[1]) && \
10 sizeof(t) < (1 << _IOC_SIZEBITS)) ? \ 13 sizeof(t) < (1 << _IOC_SIZEBITS)) ? \
11 sizeof(t) : __invalid_size_argument_for_IOC) 14 sizeof(t) : __invalid_size_argument_for_IOC)
15#endif
16
12#endif /* _ASM_GENERIC_IOCTL_H */ 17#endif /* _ASM_GENERIC_IOCTL_H */