summaryrefslogtreecommitdiff
path: root/include/arch/x86_64/asm-generic/ioctl.h
diff options
context:
space:
mode:
authorKacper <kacper@mail.openlinux.dev>2025-12-25 19:24:38 +0100
committerKacper <kacper@mail.openlinux.dev>2025-12-25 20:35:03 +0100
commita984eb367c032dbe2577f01238c3d1268526be70 (patch)
tree437fef40379b2758b129ccea39df3570fa2d145e /include/arch/x86_64/asm-generic/ioctl.h
parent8834571b202cf4dc9c649cfb096c213b6ecf1566 (diff)
Clang-tidy fixes
Diffstat (limited to 'include/arch/x86_64/asm-generic/ioctl.h')
-rw-r--r--include/arch/x86_64/asm-generic/ioctl.h25
1 files changed, 9 insertions, 16 deletions
diff --git a/include/arch/x86_64/asm-generic/ioctl.h b/include/arch/x86_64/asm-generic/ioctl.h
index a512641b..252a73bc 100644
--- a/include/arch/x86_64/asm-generic/ioctl.h
+++ b/include/arch/x86_64/asm-generic/ioctl.h
@@ -66,9 +66,8 @@
#define _IOC_READ 2U
#endif
-#define _IOC(dir, type, nr, size) \
- (((dir) << _IOC_DIRSHIFT) | ((type) << _IOC_TYPESHIFT) | \
- ((nr) << _IOC_NRSHIFT) | ((size) << _IOC_SIZESHIFT))
+#define _IOC(dir, type, nr, size) \
+ (((dir) << _IOC_DIRSHIFT) | ((type) << _IOC_TYPESHIFT) | ((nr) << _IOC_NRSHIFT) | ((size) << _IOC_SIZESHIFT))
#define _IOC_TYPECHECK(t) (sizeof(t))
@@ -78,19 +77,13 @@
* NOTE: _IOW means userland is writing and kernel is reading. _IOR
* means userland is reading and kernel is writing.
*/
-#define _IO(type, nr) _IOC(_IOC_NONE, (type), (nr), 0)
-#define _IOR(type, nr, argtype) \
- _IOC(_IOC_READ, (type), (nr), (_IOC_TYPECHECK(argtype)))
-#define _IOW(type, nr, argtype) \
- _IOC(_IOC_WRITE, (type), (nr), (_IOC_TYPECHECK(argtype)))
-#define _IOWR(type, nr, argtype) \
- _IOC(_IOC_READ | _IOC_WRITE, (type), (nr), (_IOC_TYPECHECK(argtype)))
-#define _IOR_BAD(type, nr, argtype) \
- _IOC(_IOC_READ, (type), (nr), sizeof(argtype))
-#define _IOW_BAD(type, nr, argtype) \
- _IOC(_IOC_WRITE, (type), (nr), sizeof(argtype))
-#define _IOWR_BAD(type, nr, argtype) \
- _IOC(_IOC_READ | _IOC_WRITE, (type), (nr), sizeof(argtype))
+#define _IO(type, nr) _IOC(_IOC_NONE, (type), (nr), 0)
+#define _IOR(type, nr, argtype) _IOC(_IOC_READ, (type), (nr), (_IOC_TYPECHECK(argtype)))
+#define _IOW(type, nr, argtype) _IOC(_IOC_WRITE, (type), (nr), (_IOC_TYPECHECK(argtype)))
+#define _IOWR(type, nr, argtype) _IOC(_IOC_READ | _IOC_WRITE, (type), (nr), (_IOC_TYPECHECK(argtype)))
+#define _IOR_BAD(type, nr, argtype) _IOC(_IOC_READ, (type), (nr), sizeof(argtype))
+#define _IOW_BAD(type, nr, argtype) _IOC(_IOC_WRITE, (type), (nr), sizeof(argtype))
+#define _IOWR_BAD(type, nr, argtype) _IOC(_IOC_READ | _IOC_WRITE, (type), (nr), sizeof(argtype))
/* used to decode ioctl numbers.. */
#define _IOC_DIR(nr) (((nr) >> _IOC_DIRSHIFT) & _IOC_DIRMASK)