projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e25bfc9
)
MIPS: ioctl.h: Fix headers_check warnings
author
Jaswinder Singh Rajput
<jaswinder@kernel.org>
Thu, 4 Jun 2009 12:35:49 +0000
(18:05 +0530)
committer
Ralf Baechle
<ralf@linux-mips.org>
Mon, 8 Jun 2009 15:57:51 +0000
(16:57 +0100)
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>
arch/mips/include/asm/ioctl.h
patch
|
blob
|
history
diff --git
a/arch/mips/include/asm/ioctl.h
b/arch/mips/include/asm/ioctl.h
index 85067e248a839e544d6c386a309a9bbe9273abfb..916163401b2cfd4b55c26fa4b8adef1beef0c290 100644
(file)
--- a/
arch/mips/include/asm/ioctl.h
+++ b/
arch/mips/include/asm/ioctl.h
@@
-60,12
+60,16
@@
((nr) << _IOC_NRSHIFT) | \
((size) << _IOC_SIZESHIFT))
+#ifdef __KERNEL__
/* provoke compile error for invalid uses of size argument */
extern unsigned int __invalid_size_argument_for_IOC;
#define _IOC_TYPECHECK(t) \
((sizeof(t) == sizeof(t[1]) && \
sizeof(t) < (1 << _IOC_SIZEBITS)) ? \
sizeof(t) : __invalid_size_argument_for_IOC)
+#else
+#define _IOC_TYPECHECK(t) (sizeof(t))
+#endif
/* used to create numbers */
#define _IO(type, nr) _IOC(_IOC_NONE, (type), (nr), 0)