uapi headers: simplify the <linux/compiler.h> stuff.
We don't really need <linux/compiler.h> and <linux/compiler_types.h>. We
already have a mechanism to remove unused macros, so let's do that. We
don't currently have a way to remove unused #includes, so we still need
<linux/compiler.h> and <linux/compiler_types.h> files (but I've clarified
the comments in them).
I've kept the empty definitions of `__user` and `__force` for source
compatibility. (We had one security test at least that was assuming
a kernel struct definition will "just work".)
Bug: http://b/262917450
Test: treehugger
Change-Id: Iacbbbc1aeef9a4fac52dabd7811ab875cc267d4f
diff --git a/libc/kernel/uapi/linux/if.h b/libc/kernel/uapi/linux/if.h
index 63c77eb..fc6d20d 100644
--- a/libc/kernel/uapi/linux/if.h
+++ b/libc/kernel/uapi/linux/if.h
@@ -130,14 +130,14 @@
unsigned int type;
unsigned int size;
union {
- raw_hdlc_proto __user * raw_hdlc;
- cisco_proto __user * cisco;
- fr_proto __user * fr;
- fr_proto_pvc __user * fr_pvc;
- fr_proto_pvc_info __user * fr_pvc_info;
- x25_hdlc_proto __user * x25;
- sync_serial_settings __user * sync;
- te1_settings __user * te1;
+ raw_hdlc_proto * raw_hdlc;
+ cisco_proto * cisco;
+ fr_proto * fr;
+ fr_proto_pvc * fr_pvc;
+ fr_proto_pvc_info * fr_pvc_info;
+ x25_hdlc_proto * x25;
+ sync_serial_settings * sync;
+ te1_settings * te1;
} ifs_ifsu;
};
#if __UAPI_DEF_IF_IFREQ
@@ -158,7 +158,7 @@
struct ifmap ifru_map;
char ifru_slave[IFNAMSIZ];
char ifru_newname[IFNAMSIZ];
- void __user * ifru_data;
+ void * ifru_data;
struct if_settings ifru_settings;
} ifr_ifru;
};
@@ -184,8 +184,8 @@
struct ifconf {
int ifc_len;
union {
- char __user * ifcu_buf;
- struct ifreq __user * ifcu_req;
+ char * ifcu_buf;
+ struct ifreq * ifcu_req;
} ifc_ifcu;
};
#endif