blob: 297fb0d7cd6c63ebcc25e17a111de4b1a64e9198 [file] [log] [blame]
Brian Gerstaf4cd3f2006-01-09 20:52:18 -08001#ifndef _ASM_GENERIC_IOCTL_H
2#define _ASM_GENERIC_IOCTL_H
3
David Howells8a1ab312012-10-04 18:20:15 +01004#include <uapi/asm-generic/ioctl.h>
Brian Gerstaf4cd3f2006-01-09 20:52:18 -08005
Hans Verkuild55875f2014-06-06 14:37:22 -07006#ifdef __CHECKER__
7#define _IOC_TYPECHECK(t) (sizeof(t))
8#else
Brian Gerstaf4cd3f2006-01-09 20:52:18 -08009/* provoke compile error for invalid uses of size argument */
10extern unsigned int __invalid_size_argument_for_IOC;
11#define _IOC_TYPECHECK(t) \
12 ((sizeof(t) == sizeof(t[1]) && \
13 sizeof(t) < (1 << _IOC_SIZEBITS)) ? \
14 sizeof(t) : __invalid_size_argument_for_IOC)
Hans Verkuild55875f2014-06-06 14:37:22 -070015#endif
16
Brian Gerstaf4cd3f2006-01-09 20:52:18 -080017#endif /* _ASM_GENERIC_IOCTL_H */