Skip to contentSkip to conversation

uapi: remove a few asm/ioctl.h includes

PATCH New Thomas Martitz 1 participant 1 message Aug 14, 2020

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 uapi: remove a few asm/ioctl.h includes

We found the following warnings when build userspace for our MIPS-based boards:

include/asm-generic/ioctl.h:65: warning: "_IOC" redefined

It appears that asm/ioctl.h does not play well when compiling against musl libc. Since almost all other uapi headers that wrap _IOC() and friends do *not* include asm/ioctl.h itself, lets follow this route for sickios.h and atmioc.h.

The userspace is required to include <sys/ioctl.h> anyway when it wants to call ioctl() for any macro provided by the affected headers.

---
 arch/mips/include/uapi/asm/sockios.h   | 2 --
 arch/xtensa/include/uapi/asm/sockios.h | 2 --
 include/uapi/linux/atmioc.h            | 3 ---
 3 files changed, 7 deletions(-)
arch/mips/include/uapi/asm/sockios.h +0 -2
index 66f60234f290b..a96f3ea5430f5 100644
@@ -11,8 +11,6 @@
 #ifndef _ASM_SOCKIOS_H
 #define _ASM_SOCKIOS_H
 
-#include <asm/ioctl.h>
-
 /* Socket-level I/O control calls. */
 #define FIOGETOWN	_IOR('f', 123, int)
 #define FIOSETOWN	_IOW('f', 124, int)
arch/xtensa/include/uapi/asm/sockios.h +0 -2
index 1a1f58f4b75a2..71d05c88b8178 100644
@@ -15,8 +15,6 @@
 #ifndef _XTENSA_SOCKIOS_H
 #define _XTENSA_SOCKIOS_H
 
-#include <asm/ioctl.h>
-
 /* Socket-level I/O control calls. */
 
 #define FIOGETOWN	_IOR('f', 123, int)
include/uapi/linux/atmioc.h +0 -3
index cd7655e40c77a..36a51ca18ea3c 100644
@@ -13,9 +13,6 @@
 #ifndef _LINUX_ATMIOC_H
 #define _LINUX_ATMIOC_H
 
-#include <asm/ioctl.h>
-		/* everybody including atmioc.h will also need _IO{,R,W,WR} */
-
 #define ATMIOC_PHYCOM	  0x00 /* PHY device common ioctls, globally unique */
 #define ATMIOC_PHYCOM_END 0x0f
 #define ATMIOC_PHYTYP	  0x10 /* PHY dev type ioctls, unique per PHY type */
Signature · 1 line
2.25.1