Linux Audio

Check our new training course

Loading...
v6.13.7
 1/* SPDX-License-Identifier: GPL-2.0 */
 2#ifndef _ASM_GENERIC_IOCTL_H
 3#define _ASM_GENERIC_IOCTL_H
 4
 5#include <uapi/asm-generic/ioctl.h>
 6
 7#ifdef __CHECKER__
 8#define _IOC_TYPECHECK(t) (sizeof(t))
 9#else
10/* provoke compile error for invalid uses of size argument */
11extern unsigned int __invalid_size_argument_for_IOC;
12#define _IOC_TYPECHECK(t) \
13	((sizeof(t) == sizeof(t[1]) && \
14	  sizeof(t) < (1 << _IOC_SIZEBITS)) ? \
15	  sizeof(t) : __invalid_size_argument_for_IOC)
16#endif
17
18#endif /* _ASM_GENERIC_IOCTL_H */
v3.15
 
 1#ifndef _ASM_GENERIC_IOCTL_H
 2#define _ASM_GENERIC_IOCTL_H
 3
 4#include <uapi/asm-generic/ioctl.h>
 5
 
 
 
 6/* provoke compile error for invalid uses of size argument */
 7extern unsigned int __invalid_size_argument_for_IOC;
 8#define _IOC_TYPECHECK(t) \
 9	((sizeof(t) == sizeof(t[1]) && \
10	  sizeof(t) < (1 << _IOC_SIZEBITS)) ? \
11	  sizeof(t) : __invalid_size_argument_for_IOC)
 
 
12#endif /* _ASM_GENERIC_IOCTL_H */