Skip to content

Commit d05a020

Browse files
Christoph HellwigJ. Bruce Fields
authored andcommitted
sunrpc: remove __KERNEL__ ifdefs
Remove the __KERNEL__ ifdefs from the non-UAPI sunrpc headers, as those can't be included from user space programs. Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: J. Bruce Fields <[email protected]>
1 parent 581ae68 commit d05a020

File tree

12 files changed

+0
-36
lines changed

12 files changed

+0
-36
lines changed

include/linux/sunrpc/auth.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@
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)
194192
return NULL;
195193
}
196194

197-
#endif /* __KERNEL__ */
198195
#endif /* _LINUX_SUNRPC_AUTH_H */

include/linux/sunrpc/auth_gss.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
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 {
9089
unsigned long gc_upcall_timestamp;
9190
};
9291

93-
#endif /* __KERNEL__ */
9492
#endif /* _LINUX_SUNRPC_AUTH_GSS_H */
9593

include/linux/sunrpc/clnt.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,6 @@ struct rpc_procinfo {
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)
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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
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 *);
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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,6 @@
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;
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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
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;
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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
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);
133131
extern bool gssd_running(struct net *net);
134132

135133
#endif
136-
#endif

include/linux/sunrpc/svcauth.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@
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)
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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
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);
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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
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,
552550
*array = be32_to_cpup(p);
553551
return retval;
554552
}
555-
#endif /* __KERNEL__ */
556553

557554
#endif /* _SUNRPC_XDR_H_ */

0 commit comments

Comments
 (0)