Skip to content

Commit 3a55314

Browse files
Jaswinder Singh Rajputralfbaechle
authored andcommitted
MIPS: ioctl.h: Fix headers_check warnings
Make ioctl.h compatible with asm-generic/ioctl.h and userspace fix the following 'make headers_check' warning: usr/include/asm-mips/ioctl.h:64: extern's make no sense in userspace Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
1 parent e25bfc9 commit 3a55314

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎arch/mips/include/asm/ioctl.h‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,16 @@
6060
((nr) << _IOC_NRSHIFT) | \
6161
((size) << _IOC_SIZESHIFT))
6262

63+
#ifdef __KERNEL__
6364
/* provoke compile error for invalid uses of size argument */
6465
extern unsigned int __invalid_size_argument_for_IOC;
6566
#define _IOC_TYPECHECK(t) \
6667
((sizeof(t) == sizeof(t[1]) && \
6768
sizeof(t) < (1 << _IOC_SIZEBITS)) ? \
6869
sizeof(t) : __invalid_size_argument_for_IOC)
70+
#else
71+
#define _IOC_TYPECHECK(t) (sizeof(t))
72+
#endif
6973

7074
/* used to create numbers */
7175
#define _IO(type, nr) _IOC(_IOC_NONE, (type), (nr), 0)

0 commit comments

Comments
 (0)