History

sunrpc: remove __KERNEL__ ifdefs

Remove the __KERNEL__ ifdefs from the non-UAPI sunrpc headers, as those can't be included from user space programs.

Christoph Hellwig committed 7 years ago

Commit d05a0201 parent 581ae6812 files · +0 −36Browse files

Showing the changes to include/linux (12 of 12 files). Show all

Unified · Split

12 files
  1. include/linux/sunrpc/auth.h +0 −3
  2. include/linux/sunrpc/auth_gss.h +0 −2
  3. include/linux/sunrpc/clnt.h +0 −3
  4. include/linux/sunrpc/gss_api.h +0 −2
  5. include/linux/sunrpc/gss_err.h +0 −3
  6. include/linux/sunrpc/msg_prot.h +0 −3
  7. include/linux/sunrpc/rpc_pipe_fs.h +0 −3
  8. include/linux/sunrpc/svcauth.h +0 −4
  9. include/linux/sunrpc/svcauth_gss.h +0 −2
  10. include/linux/sunrpc/xdr.h +0 −3
  11. include/linux/sunrpc/xprt.h +0 −4
  12. include/linux/sunrpc/xprtsock.h +0 −4
include/linux/sunrpc/auth.h+0−3
@@ -10,8 +10,6 @@ · 9 unmodified lines
1010 #ifndef _LINUX_SUNRPC_AUTH_H
1111 #define _LINUX_SUNRPC_AUTH_H
1212
13−#ifdef __KERNEL__
14−
1513 #include <linux/sunrpc/sched.h>
1614 #include <linux/sunrpc/msg_prot.h>
1715 #include <linux/sunrpc/xdr.h>
@@ -194,5 +192,4 @@ struct rpc_cred *get_rpccred(struct rpc_cred *cred) · 176 unmodified lines
194192 return NULL;
195193 }
196194
197−#endif /* __KERNEL__ */
198195 #endif /* _LINUX_SUNRPC_AUTH_H */
include/linux/sunrpc/auth_gss.h+0−2
@@ -13,7 +13,6 @@ · 12 unmodified lines
1313 #ifndef _LINUX_SUNRPC_AUTH_GSS_H
1414 #define _LINUX_SUNRPC_AUTH_GSS_H
1515
16−#ifdef __KERNEL__
1716 #include <linux/refcount.h>
1817 #include <linux/sunrpc/auth.h>
1918 #include <linux/sunrpc/svc.h>
@@ -90,6 +89,5 @@ struct gss_cred { · 70 unmodified lines
9089 unsigned long gc_upcall_timestamp;
9190 };
9291
93−#endif /* __KERNEL__ */
9492 #endif /* _LINUX_SUNRPC_AUTH_GSS_H */
9593
include/linux/sunrpc/clnt.h+0−3
@@ -109,8 +109,6 @@ struct rpc_procinfo { · 108 unmodified lines
109109 const char * p_name; /* name of procedure */
110110 };
111111
112−#ifdef __KERNEL__
113−
114112 struct rpc_create_args {
115113 struct net *net;
116114 int protocol;
@@ -237,5 +235,4 @@ static inline int rpc_reply_expected(struct rpc_task *task) · 120 unmodified lines
237235 (task->tk_msg.rpc_proc->p_decode != NULL);
238236 }
239237
240−#endif /* __KERNEL__ */
241238 #endif /* _LINUX_SUNRPC_CLNT_H */
include/linux/sunrpc/gss_api.h+0−2
@@ -13,7 +13,6 @@ · 12 unmodified lines
1313 #ifndef _LINUX_SUNRPC_GSS_API_H
1414 #define _LINUX_SUNRPC_GSS_API_H
1515
16−#ifdef __KERNEL__
1716 #include <linux/sunrpc/xdr.h>
1817 #include <linux/sunrpc/msg_prot.h>
1918 #include <linux/uio.h>
@@ -160,6 +159,5 @@ struct gss_api_mech * gss_mech_get(struct gss_api_mech *); · 140 unmodified lines
160159 * corresponding call to gss_mech_put. */
161160 void gss_mech_put(struct gss_api_mech *);
162161
163−#endif /* __KERNEL__ */
164162 #endif /* _LINUX_SUNRPC_GSS_API_H */
165163
include/linux/sunrpc/gss_err.h+0−3
@@ -34,8 +34,6 @@ · 33 unmodified lines
3434 #ifndef _LINUX_SUNRPC_GSS_ERR_H
3535 #define _LINUX_SUNRPC_GSS_ERR_H
3636
37−#ifdef __KERNEL__
38−
3937 typedef unsigned int OM_uint32;
4038
4139 /*
@@ -163,5 +161,4 @@ typedef unsigned int OM_uint32; · 121 unmodified lines
163161 /* XXXX This is a necessary evil until the spec is fixed */
164162 #define GSS_S_CRED_UNAVAIL GSS_S_FAILURE
165163
166−#endif /* __KERNEL__ */
167164 #endif /* __LINUX_SUNRPC_GSS_ERR_H */
include/linux/sunrpc/msg_prot.h+0−3
@@ -8,8 +8,6 @@ · 7 unmodified lines
88 #ifndef _LINUX_SUNRPC_MSGPROT_H_
99 #define _LINUX_SUNRPC_MSGPROT_H_
1010
11−#ifdef __KERNEL__ /* user programs should get these from the rpc header files */
12−
1311 #define RPC_VERSION 2
1412
1513 /* size of an XDR encoding unit in bytes, i.e. 32bit */
@@ -217,5 +215,4 @@ typedef __be32 rpc_fraghdr; · 201 unmodified lines
217215 /* Assume INET6_ADDRSTRLEN will always be larger than INET_ADDRSTRLEN... */
218216 #define RPCBIND_MAXUADDRLEN RPCBIND_MAXUADDR6LEN
219217
220−#endif /* __KERNEL__ */
221218 #endif /* _LINUX_SUNRPC_MSGPROT_H_ */
include/linux/sunrpc/rpc_pipe_fs.h+0−3
@@ -2,8 +2,6 @@ · 1 unmodified line
22 #ifndef _LINUX_SUNRPC_RPC_PIPE_FS_H
33 #define _LINUX_SUNRPC_RPC_PIPE_FS_H
44
5−#ifdef __KERNEL__
6−
75 #include <linux/workqueue.h>
86
97 struct rpc_pipe_dir_head {
@@ -133,4 +131,3 @@ extern void unregister_rpc_pipefs(void); · 123 unmodified lines
133131 extern bool gssd_running(struct net *net);
134132
135133 #endif
136−#endif
include/linux/sunrpc/svcauth.h+0−4
@@ -10,8 +10,6 @@ · 9 unmodified lines
1010 #ifndef _LINUX_SUNRPC_SVCAUTH_H_
1111 #define _LINUX_SUNRPC_SVCAUTH_H_
1212
13−#ifdef __KERNEL__
14−
1513 #include <linux/string.h>
1614 #include <linux/sunrpc/msg_prot.h>
1715 #include <linux/sunrpc/cache.h>
@@ -185,6 +183,4 @@ static inline unsigned long hash_mem(char const *buf, int length, int bits) · 167 unmodified lines
185183 return full_name_hash(NULL, buf, length) >> (32 - bits);
186184 }
187185
188−#endif /* __KERNEL__ */
189−
190186 #endif /* _LINUX_SUNRPC_SVCAUTH_H_ */
include/linux/sunrpc/svcauth_gss.h+0−2
@@ -9,7 +9,6 @@ · 8 unmodified lines
99 #ifndef _LINUX_SUNRPC_SVCAUTH_GSS_H
1010 #define _LINUX_SUNRPC_SVCAUTH_GSS_H
1111
12−#ifdef __KERNEL__
1312 #include <linux/sched.h>
1413 #include <linux/sunrpc/types.h>
1514 #include <linux/sunrpc/xdr.h>
@@ -24,5 +23,4 @@ void gss_svc_shutdown_net(struct net *net); · 8 unmodified lines
2423 int svcauth_gss_register_pseudoflavor(u32 pseudoflavor, char * name);
2524 u32 svcauth_gss_flavor(struct auth_domain *dom);
2625
27−#endif /* __KERNEL__ */
2826 #endif /* _LINUX_SUNRPC_SVCAUTH_GSS_H */
include/linux/sunrpc/xdr.h+0−3
@@ -11,8 +11,6 @@ · 10 unmodified lines
1111 #ifndef _SUNRPC_XDR_H_
1212 #define _SUNRPC_XDR_H_
1313
14−#ifdef __KERNEL__
15−
1614 #include <linux/uio.h>
1715 #include <asm/byteorder.h>
1816 #include <asm/unaligned.h>
@@ -552,6 +550,5 @@ xdr_stream_decode_uint32_array(struct xdr_stream *xdr, · 533 unmodified lines
552550 *array = be32_to_cpup(p);
553551 return retval;
554552 }
555−#endif /* __KERNEL__ */
556553
557554 #endif /* _SUNRPC_XDR_H_ */
include/linux/sunrpc/xprt.h+0−4
@@ -19,8 +19,6 @@ · 18 unmodified lines
1919 #include <linux/sunrpc/xdr.h>
2020 #include <linux/sunrpc/msg_prot.h>
2121
22−#ifdef __KERNEL__
23−
2422 #define RPC_MIN_SLOT_TABLE (2U)
2523 #define RPC_DEF_SLOT_TABLE (16U)
2624 #define RPC_MAX_SLOT_TABLE_LIMIT (65536U)
@@ -505,6 +503,4 @@ static inline void xprt_inject_disconnect(struct rpc_xprt *xprt) · 478 unmodified lines
505503 }
506504 #endif
507505
508−#endif /* __KERNEL__*/
509−
510506 #endif /* _LINUX_SUNRPC_XPRT_H */
include/linux/sunrpc/xprtsock.h+0−4
@@ -8,8 +8,6 @@ · 7 unmodified lines
88 #ifndef _LINUX_SUNRPC_XPRTSOCK_H
99 #define _LINUX_SUNRPC_XPRTSOCK_H
1010
11−#ifdef __KERNEL__
12−
1311 int init_socket_xprt(void);
1412 void cleanup_socket_xprt(void);
1513
@@ -90,6 +88,4 @@ struct sock_xprt { · 74 unmodified lines
9088 #define XPRT_SOCK_WAKE_PENDING (6)
9189 #define XPRT_SOCK_WAKE_DISCONNECT (7)
9290
93−#endif /* __KERNEL__ */
94−
9591 #endif /* _LINUX_SUNRPC_XPRTSOCK_H */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t