Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 #ifndef _ASM_GENERIC_IOCTL_H
0003 #define _ASM_GENERIC_IOCTL_H
0004 
0005 #include <uapi/asm-generic/ioctl.h>
0006 
0007 #ifdef __CHECKER__
0008 #define _IOC_TYPECHECK(t) (sizeof(t))
0009 #else
0010 /* provoke compile error for invalid uses of size argument */
0011 extern unsigned int __invalid_size_argument_for_IOC;
0012 #define _IOC_TYPECHECK(t) \
0013     ((sizeof(t) == sizeof(t[1]) && \
0014       sizeof(t) < (1 << _IOC_SIZEBITS)) ? \
0015       sizeof(t) : __invalid_size_argument_for_IOC)
0016 #endif
0017 
0018 #endif /* _ASM_GENERIC_IOCTL_H */