diff options
author | Alexey Dobriyan <adobriyan@gmail.com> | 2006-09-27 01:29:38 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-09-28 21:01:21 -0400 |
commit | d8ed029d6000ba2e2908d9286409e4833c091b4c (patch) | |
tree | 732feaa2e3751df5c81032a30ff4761427492ac4 | |
parent | 7699431301b189fca7ccbb64fe54e5a5170f8497 (diff) |
[SUNRPC]: trivial endianness annotations
pure s/u32/__be32/
[AV: large part based on Alexey's patches]
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | include/linux/sunrpc/auth.h | 16 | ||||
-rw-r--r-- | include/linux/sunrpc/msg_prot.h | 2 | ||||
-rw-r--r-- | include/linux/sunrpc/svc.h | 14 | ||||
-rw-r--r-- | include/linux/sunrpc/svcauth.h | 4 | ||||
-rw-r--r-- | include/linux/sunrpc/xdr.h | 38 | ||||
-rw-r--r-- | include/linux/sunrpc/xprt.h | 12 | ||||
-rw-r--r-- | net/sunrpc/auth.c | 12 | ||||
-rw-r--r-- | net/sunrpc/auth_gss/auth_gss.c | 33 | ||||
-rw-r--r-- | net/sunrpc/auth_gss/gss_krb5_seal.c | 2 | ||||
-rw-r--r-- | net/sunrpc/auth_gss/gss_krb5_wrap.c | 4 | ||||
-rw-r--r-- | net/sunrpc/auth_gss/svcauth_gss.c | 24 | ||||
-rw-r--r-- | net/sunrpc/auth_null.c | 8 | ||||
-rw-r--r-- | net/sunrpc/auth_unix.c | 10 | ||||
-rw-r--r-- | net/sunrpc/clnt.c | 23 | ||||
-rw-r--r-- | net/sunrpc/pmap_clnt.c | 6 | ||||
-rw-r--r-- | net/sunrpc/svc.c | 8 | ||||
-rw-r--r-- | net/sunrpc/svcauth.c | 2 | ||||
-rw-r--r-- | net/sunrpc/svcauth_unix.c | 8 | ||||
-rw-r--r-- | net/sunrpc/svcsock.c | 2 | ||||
-rw-r--r-- | net/sunrpc/xdr.c | 54 | ||||
-rw-r--r-- | net/sunrpc/xprt.c | 4 | ||||
-rw-r--r-- | net/sunrpc/xprtsock.c | 3 |
22 files changed, 146 insertions, 143 deletions
diff --git a/include/linux/sunrpc/auth.h b/include/linux/sunrpc/auth.h index a6de332e57d4..862c0d8c8381 100644 --- a/include/linux/sunrpc/auth.h +++ b/include/linux/sunrpc/auth.h | |||
@@ -109,13 +109,13 @@ struct rpc_credops { | |||
109 | void (*crdestroy)(struct rpc_cred *); | 109 | void (*crdestroy)(struct rpc_cred *); |
110 | 110 | ||
111 | int (*crmatch)(struct auth_cred *, struct rpc_cred *, int); | 111 | int (*crmatch)(struct auth_cred *, struct rpc_cred *, int); |
112 | u32 * (*crmarshal)(struct rpc_task *, u32 *); | 112 | __be32 * (*crmarshal)(struct rpc_task *, __be32 *); |
113 | int (*crrefresh)(struct rpc_task *); | 113 | int (*crrefresh)(struct rpc_task *); |
114 | u32 * (*crvalidate)(struct rpc_task *, u32 *); | 114 | __be32 * (*crvalidate)(struct rpc_task *, __be32 *); |
115 | int (*crwrap_req)(struct rpc_task *, kxdrproc_t, | 115 | int (*crwrap_req)(struct rpc_task *, kxdrproc_t, |
116 | void *, u32 *, void *); | 116 | void *, __be32 *, void *); |
117 | int (*crunwrap_resp)(struct rpc_task *, kxdrproc_t, | 117 | int (*crunwrap_resp)(struct rpc_task *, kxdrproc_t, |
118 | void *, u32 *, void *); | 118 | void *, __be32 *, void *); |
119 | }; | 119 | }; |
120 | 120 | ||
121 | extern struct rpc_authops authunix_ops; | 121 | extern struct rpc_authops authunix_ops; |
@@ -134,10 +134,10 @@ struct rpc_cred * rpcauth_bindcred(struct rpc_task *); | |||
134 | void rpcauth_holdcred(struct rpc_task *); | 134 | void rpcauth_holdcred(struct rpc_task *); |
135 | void put_rpccred(struct rpc_cred *); | 135 | void put_rpccred(struct rpc_cred *); |
136 | void rpcauth_unbindcred(struct rpc_task *); | 136 | void rpcauth_unbindcred(struct rpc_task *); |
137 | u32 * rpcauth_marshcred(struct rpc_task *, u32 *); | 137 | __be32 * rpcauth_marshcred(struct rpc_task *, __be32 *); |
138 | u32 * rpcauth_checkverf(struct rpc_task *, u32 *); | 138 | __be32 * rpcauth_checkverf(struct rpc_task *, __be32 *); |
139 | int rpcauth_wrap_req(struct rpc_task *task, kxdrproc_t encode, void *rqstp, u32 *data, void *obj); | 139 | int rpcauth_wrap_req(struct rpc_task *task, kxdrproc_t encode, void *rqstp, __be32 *data, void *obj); |
140 | int rpcauth_unwrap_resp(struct rpc_task *task, kxdrproc_t decode, void *rqstp, u32 *data, void *obj); | 140 | int rpcauth_unwrap_resp(struct rpc_task *task, kxdrproc_t decode, void *rqstp, __be32 *data, void *obj); |
141 | int rpcauth_refreshcred(struct rpc_task *); | 141 | int rpcauth_refreshcred(struct rpc_task *); |
142 | void rpcauth_invalcred(struct rpc_task *); | 142 | void rpcauth_invalcred(struct rpc_task *); |
143 | int rpcauth_uptodatecred(struct rpc_task *); | 143 | int rpcauth_uptodatecred(struct rpc_task *); |
diff --git a/include/linux/sunrpc/msg_prot.h b/include/linux/sunrpc/msg_prot.h index f43f237360ae..d9f5934ac9fe 100644 --- a/include/linux/sunrpc/msg_prot.h +++ b/include/linux/sunrpc/msg_prot.h | |||
@@ -95,7 +95,7 @@ enum rpc_auth_stat { | |||
95 | * 2GB. | 95 | * 2GB. |
96 | */ | 96 | */ |
97 | 97 | ||
98 | typedef u32 rpc_fraghdr; | 98 | typedef __be32 rpc_fraghdr; |
99 | 99 | ||
100 | #define RPC_LAST_STREAM_FRAGMENT (1U << 31) | 100 | #define RPC_LAST_STREAM_FRAGMENT (1U << 31) |
101 | #define RPC_FRAGMENT_SIZE_MASK (~RPC_LAST_STREAM_FRAGMENT) | 101 | #define RPC_FRAGMENT_SIZE_MASK (~RPC_LAST_STREAM_FRAGMENT) |
diff --git a/include/linux/sunrpc/svc.h b/include/linux/sunrpc/svc.h index 5df1d319f5d5..73140ee5c638 100644 --- a/include/linux/sunrpc/svc.h +++ b/include/linux/sunrpc/svc.h | |||
@@ -147,7 +147,7 @@ struct svc_rqst { | |||
147 | short rq_arghi; /* pages available in argument page list */ | 147 | short rq_arghi; /* pages available in argument page list */ |
148 | short rq_resused; /* pages used for result */ | 148 | short rq_resused; /* pages used for result */ |
149 | 149 | ||
150 | u32 rq_xid; /* transmission id */ | 150 | __be32 rq_xid; /* transmission id */ |
151 | u32 rq_prog; /* program number */ | 151 | u32 rq_prog; /* program number */ |
152 | u32 rq_vers; /* program version */ | 152 | u32 rq_vers; /* program version */ |
153 | u32 rq_proc; /* procedure number */ | 153 | u32 rq_proc; /* procedure number */ |
@@ -156,7 +156,7 @@ struct svc_rqst { | |||
156 | rq_secure : 1; /* secure port */ | 156 | rq_secure : 1; /* secure port */ |
157 | 157 | ||
158 | 158 | ||
159 | __u32 rq_daddr; /* dest addr of request - reply from here */ | 159 | __be32 rq_daddr; /* dest addr of request - reply from here */ |
160 | 160 | ||
161 | void * rq_argp; /* decoded arguments */ | 161 | void * rq_argp; /* decoded arguments */ |
162 | void * rq_resp; /* xdr'd results */ | 162 | void * rq_resp; /* xdr'd results */ |
@@ -186,7 +186,7 @@ struct svc_rqst { | |||
186 | * Check buffer bounds after decoding arguments | 186 | * Check buffer bounds after decoding arguments |
187 | */ | 187 | */ |
188 | static inline int | 188 | static inline int |
189 | xdr_argsize_check(struct svc_rqst *rqstp, u32 *p) | 189 | xdr_argsize_check(struct svc_rqst *rqstp, __be32 *p) |
190 | { | 190 | { |
191 | char *cp = (char *)p; | 191 | char *cp = (char *)p; |
192 | struct kvec *vec = &rqstp->rq_arg.head[0]; | 192 | struct kvec *vec = &rqstp->rq_arg.head[0]; |
@@ -195,7 +195,7 @@ xdr_argsize_check(struct svc_rqst *rqstp, u32 *p) | |||
195 | } | 195 | } |
196 | 196 | ||
197 | static inline int | 197 | static inline int |
198 | xdr_ressize_check(struct svc_rqst *rqstp, u32 *p) | 198 | xdr_ressize_check(struct svc_rqst *rqstp, __be32 *p) |
199 | { | 199 | { |
200 | struct kvec *vec = &rqstp->rq_res.head[0]; | 200 | struct kvec *vec = &rqstp->rq_res.head[0]; |
201 | char *cp = (char*)p; | 201 | char *cp = (char*)p; |
@@ -266,10 +266,10 @@ struct svc_deferred_req { | |||
266 | u32 prot; /* protocol (UDP or TCP) */ | 266 | u32 prot; /* protocol (UDP or TCP) */ |
267 | struct sockaddr_in addr; | 267 | struct sockaddr_in addr; |
268 | struct svc_sock *svsk; /* where reply must go */ | 268 | struct svc_sock *svsk; /* where reply must go */ |
269 | u32 daddr; /* where reply must come from */ | 269 | __be32 daddr; /* where reply must come from */ |
270 | struct cache_deferred_req handle; | 270 | struct cache_deferred_req handle; |
271 | int argslen; | 271 | int argslen; |
272 | u32 args[0]; | 272 | __be32 args[0]; |
273 | }; | 273 | }; |
274 | 274 | ||
275 | /* | 275 | /* |
@@ -301,7 +301,7 @@ struct svc_version { | |||
301 | * A return value of 0 means drop the request. | 301 | * A return value of 0 means drop the request. |
302 | * vs_dispatch == NULL means use default dispatcher. | 302 | * vs_dispatch == NULL means use default dispatcher. |
303 | */ | 303 | */ |
304 | int (*vs_dispatch)(struct svc_rqst *, u32 *); | 304 | int (*vs_dispatch)(struct svc_rqst *, __be32 *); |
305 | }; | 305 | }; |
306 | 306 | ||
307 | /* | 307 | /* |
diff --git a/include/linux/sunrpc/svcauth.h b/include/linux/sunrpc/svcauth.h index 2fe2087edd66..a6601650deeb 100644 --- a/include/linux/sunrpc/svcauth.h +++ b/include/linux/sunrpc/svcauth.h | |||
@@ -95,7 +95,7 @@ struct auth_ops { | |||
95 | char * name; | 95 | char * name; |
96 | struct module *owner; | 96 | struct module *owner; |
97 | int flavour; | 97 | int flavour; |
98 | int (*accept)(struct svc_rqst *rq, u32 *authp); | 98 | int (*accept)(struct svc_rqst *rq, __be32 *authp); |
99 | int (*release)(struct svc_rqst *rq); | 99 | int (*release)(struct svc_rqst *rq); |
100 | void (*domain_release)(struct auth_domain *); | 100 | void (*domain_release)(struct auth_domain *); |
101 | int (*set_client)(struct svc_rqst *rq); | 101 | int (*set_client)(struct svc_rqst *rq); |
@@ -112,7 +112,7 @@ struct auth_ops { | |||
112 | #define SVC_COMPLETE 9 | 112 | #define SVC_COMPLETE 9 |
113 | 113 | ||
114 | 114 | ||
115 | extern int svc_authenticate(struct svc_rqst *rqstp, u32 *authp); | 115 | extern int svc_authenticate(struct svc_rqst *rqstp, __be32 *authp); |
116 | extern int svc_authorise(struct svc_rqst *rqstp); | 116 | extern int svc_authorise(struct svc_rqst *rqstp); |
117 | extern int svc_set_client(struct svc_rqst *rqstp); | 117 | extern int svc_set_client(struct svc_rqst *rqstp); |
118 | extern int svc_auth_register(rpc_authflavor_t flavor, struct auth_ops *aops); | 118 | extern int svc_auth_register(rpc_authflavor_t flavor, struct auth_ops *aops); |
diff --git a/include/linux/sunrpc/xdr.h b/include/linux/sunrpc/xdr.h index e6d3d349506c..953723b09bc6 100644 --- a/include/linux/sunrpc/xdr.h +++ b/include/linux/sunrpc/xdr.h | |||
@@ -32,7 +32,7 @@ struct xdr_netobj { | |||
32 | * side) or svc_rqst pointer (server side). | 32 | * side) or svc_rqst pointer (server side). |
33 | * Encode functions always assume there's enough room in the buffer. | 33 | * Encode functions always assume there's enough room in the buffer. |
34 | */ | 34 | */ |
35 | typedef int (*kxdrproc_t)(void *rqstp, u32 *data, void *obj); | 35 | typedef int (*kxdrproc_t)(void *rqstp, __be32 *data, void *obj); |
36 | 36 | ||
37 | /* | 37 | /* |
38 | * Basic structure for transmission/reception of a client XDR message. | 38 | * Basic structure for transmission/reception of a client XDR message. |
@@ -88,19 +88,19 @@ struct xdr_buf { | |||
88 | /* | 88 | /* |
89 | * Miscellaneous XDR helper functions | 89 | * Miscellaneous XDR helper functions |
90 | */ | 90 | */ |
91 | u32 * xdr_encode_opaque_fixed(u32 *p, const void *ptr, unsigned int len); | 91 | __be32 *xdr_encode_opaque_fixed(__be32 *p, const void *ptr, unsigned int len); |
92 | u32 * xdr_encode_opaque(u32 *p, const void *ptr, unsigned int len); | 92 | __be32 *xdr_encode_opaque(__be32 *p, const void *ptr, unsigned int len); |
93 | u32 * xdr_encode_string(u32 *p, const char *s); | 93 | __be32 *xdr_encode_string(__be32 *p, const char *s); |
94 | u32 * xdr_decode_string_inplace(u32 *p, char **sp, int *lenp, int maxlen); | 94 | __be32 *xdr_decode_string_inplace(__be32 *p, char **sp, int *lenp, int maxlen); |
95 | u32 * xdr_encode_netobj(u32 *p, const struct xdr_netobj *); | 95 | __be32 *xdr_encode_netobj(__be32 *p, const struct xdr_netobj *); |
96 | u32 * xdr_decode_netobj(u32 *p, struct xdr_netobj *); | 96 | __be32 *xdr_decode_netobj(__be32 *p, struct xdr_netobj *); |
97 | 97 | ||
98 | void xdr_encode_pages(struct xdr_buf *, struct page **, unsigned int, | 98 | void xdr_encode_pages(struct xdr_buf *, struct page **, unsigned int, |
99 | unsigned int); | 99 | unsigned int); |
100 | void xdr_inline_pages(struct xdr_buf *, unsigned int, | 100 | void xdr_inline_pages(struct xdr_buf *, unsigned int, |
101 | struct page **, unsigned int, unsigned int); | 101 | struct page **, unsigned int, unsigned int); |
102 | 102 | ||
103 | static inline u32 *xdr_encode_array(u32 *p, const void *s, unsigned int len) | 103 | static inline __be32 *xdr_encode_array(__be32 *p, const void *s, unsigned int len) |
104 | { | 104 | { |
105 | return xdr_encode_opaque(p, s, len); | 105 | return xdr_encode_opaque(p, s, len); |
106 | } | 106 | } |
@@ -108,16 +108,16 @@ static inline u32 *xdr_encode_array(u32 *p, const void *s, unsigned int len) | |||
108 | /* | 108 | /* |
109 | * Decode 64bit quantities (NFSv3 support) | 109 | * Decode 64bit quantities (NFSv3 support) |
110 | */ | 110 | */ |
111 | static inline u32 * | 111 | static inline __be32 * |
112 | xdr_encode_hyper(u32 *p, __u64 val) | 112 | xdr_encode_hyper(__be32 *p, __u64 val) |
113 | { | 113 | { |
114 | *p++ = htonl(val >> 32); | 114 | *p++ = htonl(val >> 32); |
115 | *p++ = htonl(val & 0xFFFFFFFF); | 115 | *p++ = htonl(val & 0xFFFFFFFF); |
116 | return p; | 116 | return p; |
117 | } | 117 | } |
118 | 118 | ||
119 | static inline u32 * | 119 | static inline __be32 * |
120 | xdr_decode_hyper(u32 *p, __u64 *valp) | 120 | xdr_decode_hyper(__be32 *p, __u64 *valp) |
121 | { | 121 | { |
122 | *valp = ((__u64) ntohl(*p++)) << 32; | 122 | *valp = ((__u64) ntohl(*p++)) << 32; |
123 | *valp |= ntohl(*p++); | 123 | *valp |= ntohl(*p++); |
@@ -128,7 +128,7 @@ xdr_decode_hyper(u32 *p, __u64 *valp) | |||
128 | * Adjust kvec to reflect end of xdr'ed data (RPC client XDR) | 128 | * Adjust kvec to reflect end of xdr'ed data (RPC client XDR) |
129 | */ | 129 | */ |
130 | static inline int | 130 | static inline int |
131 | xdr_adjust_iovec(struct kvec *iov, u32 *p) | 131 | xdr_adjust_iovec(struct kvec *iov, __be32 *p) |
132 | { | 132 | { |
133 | return iov->iov_len = ((u8 *) p - (u8 *) iov->iov_base); | 133 | return iov->iov_len = ((u8 *) p - (u8 *) iov->iov_base); |
134 | } | 134 | } |
@@ -180,19 +180,19 @@ extern int xdr_encode_array2(struct xdr_buf *buf, unsigned int base, | |||
180 | * Provide some simple tools for XDR buffer overflow-checking etc. | 180 | * Provide some simple tools for XDR buffer overflow-checking etc. |
181 | */ | 181 | */ |
182 | struct xdr_stream { | 182 | struct xdr_stream { |
183 | uint32_t *p; /* start of available buffer */ | 183 | __be32 *p; /* start of available buffer */ |
184 | struct xdr_buf *buf; /* XDR buffer to read/write */ | 184 | struct xdr_buf *buf; /* XDR buffer to read/write */ |
185 | 185 | ||
186 | uint32_t *end; /* end of available buffer space */ | 186 | __be32 *end; /* end of available buffer space */ |
187 | struct kvec *iov; /* pointer to the current kvec */ | 187 | struct kvec *iov; /* pointer to the current kvec */ |
188 | }; | 188 | }; |
189 | 189 | ||
190 | extern void xdr_init_encode(struct xdr_stream *xdr, struct xdr_buf *buf, uint32_t *p); | 190 | extern void xdr_init_encode(struct xdr_stream *xdr, struct xdr_buf *buf, __be32 *p); |
191 | extern uint32_t *xdr_reserve_space(struct xdr_stream *xdr, size_t nbytes); | 191 | extern __be32 *xdr_reserve_space(struct xdr_stream *xdr, size_t nbytes); |
192 | extern void xdr_write_pages(struct xdr_stream *xdr, struct page **pages, | 192 | extern void xdr_write_pages(struct xdr_stream *xdr, struct page **pages, |
193 | unsigned int base, unsigned int len); | 193 | unsigned int base, unsigned int len); |
194 | extern void xdr_init_decode(struct xdr_stream *xdr, struct xdr_buf *buf, uint32_t *p); | 194 | extern void xdr_init_decode(struct xdr_stream *xdr, struct xdr_buf *buf, __be32 *p); |
195 | extern uint32_t *xdr_inline_decode(struct xdr_stream *xdr, size_t nbytes); | 195 | extern __be32 *xdr_inline_decode(struct xdr_stream *xdr, size_t nbytes); |
196 | extern void xdr_read_pages(struct xdr_stream *xdr, unsigned int len); | 196 | extern void xdr_read_pages(struct xdr_stream *xdr, unsigned int len); |
197 | extern void xdr_enter_page(struct xdr_stream *xdr, unsigned int len); | 197 | extern void xdr_enter_page(struct xdr_stream *xdr, unsigned int len); |
198 | 198 | ||
diff --git a/include/linux/sunrpc/xprt.h b/include/linux/sunrpc/xprt.h index bdeba8538c71..6cf626580752 100644 --- a/include/linux/sunrpc/xprt.h +++ b/include/linux/sunrpc/xprt.h | |||
@@ -79,7 +79,7 @@ struct rpc_rqst { | |||
79 | * This is the private part | 79 | * This is the private part |
80 | */ | 80 | */ |
81 | struct rpc_task * rq_task; /* RPC task data */ | 81 | struct rpc_task * rq_task; /* RPC task data */ |
82 | __u32 rq_xid; /* request XID */ | 82 | __be32 rq_xid; /* request XID */ |
83 | int rq_cong; /* has incremented xprt->cong */ | 83 | int rq_cong; /* has incremented xprt->cong */ |
84 | int rq_received; /* receive completed */ | 84 | int rq_received; /* receive completed */ |
85 | u32 rq_seqno; /* gss seq no. used on req. */ | 85 | u32 rq_seqno; /* gss seq no. used on req. */ |
@@ -171,9 +171,9 @@ struct rpc_xprt { | |||
171 | /* | 171 | /* |
172 | * State of TCP reply receive stuff | 172 | * State of TCP reply receive stuff |
173 | */ | 173 | */ |
174 | u32 tcp_recm, /* Fragment header */ | 174 | __be32 tcp_recm, /* Fragment header */ |
175 | tcp_xid, /* Current XID */ | 175 | tcp_xid; /* Current XID */ |
176 | tcp_reclen, /* fragment length */ | 176 | u32 tcp_reclen, /* fragment length */ |
177 | tcp_offset; /* fragment offset */ | 177 | tcp_offset; /* fragment offset */ |
178 | unsigned long tcp_copied, /* copied to request */ | 178 | unsigned long tcp_copied, /* copied to request */ |
179 | tcp_flags; | 179 | tcp_flags; |
@@ -253,7 +253,7 @@ void xprt_release(struct rpc_task *task); | |||
253 | struct rpc_xprt * xprt_get(struct rpc_xprt *xprt); | 253 | struct rpc_xprt * xprt_get(struct rpc_xprt *xprt); |
254 | void xprt_put(struct rpc_xprt *xprt); | 254 | void xprt_put(struct rpc_xprt *xprt); |
255 | 255 | ||
256 | static inline u32 *xprt_skip_transport_header(struct rpc_xprt *xprt, u32 *p) | 256 | static inline __be32 *xprt_skip_transport_header(struct rpc_xprt *xprt, __be32 *p) |
257 | { | 257 | { |
258 | return p + xprt->tsh_size; | 258 | return p + xprt->tsh_size; |
259 | } | 259 | } |
@@ -268,7 +268,7 @@ void xprt_wait_for_buffer_space(struct rpc_task *task); | |||
268 | void xprt_write_space(struct rpc_xprt *xprt); | 268 | void xprt_write_space(struct rpc_xprt *xprt); |
269 | void xprt_update_rtt(struct rpc_task *task); | 269 | void xprt_update_rtt(struct rpc_task *task); |
270 | void xprt_adjust_cwnd(struct rpc_task *task, int result); | 270 | void xprt_adjust_cwnd(struct rpc_task *task, int result); |
271 | struct rpc_rqst * xprt_lookup_rqst(struct rpc_xprt *xprt, u32 xid); | 271 | struct rpc_rqst * xprt_lookup_rqst(struct rpc_xprt *xprt, __be32 xid); |
272 | void xprt_complete_rqst(struct rpc_task *task, int copied); | 272 | void xprt_complete_rqst(struct rpc_task *task, int copied); |
273 | void xprt_release_rqst_cong(struct rpc_task *task); | 273 | void xprt_release_rqst_cong(struct rpc_task *task); |
274 | void xprt_disconnect(struct rpc_xprt *xprt); | 274 | void xprt_disconnect(struct rpc_xprt *xprt); |
diff --git a/net/sunrpc/auth.c b/net/sunrpc/auth.c index 55163af3dcaf..993ff1a5d945 100644 --- a/net/sunrpc/auth.c +++ b/net/sunrpc/auth.c | |||
@@ -331,8 +331,8 @@ rpcauth_unbindcred(struct rpc_task *task) | |||
331 | task->tk_msg.rpc_cred = NULL; | 331 | task->tk_msg.rpc_cred = NULL; |
332 | } | 332 | } |
333 | 333 | ||
334 | u32 * | 334 | __be32 * |
335 | rpcauth_marshcred(struct rpc_task *task, u32 *p) | 335 | rpcauth_marshcred(struct rpc_task *task, __be32 *p) |
336 | { | 336 | { |
337 | struct rpc_cred *cred = task->tk_msg.rpc_cred; | 337 | struct rpc_cred *cred = task->tk_msg.rpc_cred; |
338 | 338 | ||
@@ -342,8 +342,8 @@ rpcauth_marshcred(struct rpc_task *task, u32 *p) | |||
342 | return cred->cr_ops->crmarshal(task, p); | 342 | return cred->cr_ops->crmarshal(task, p); |
343 | } | 343 | } |
344 | 344 | ||
345 | u32 * | 345 | __be32 * |
346 | rpcauth_checkverf(struct rpc_task *task, u32 *p) | 346 | rpcauth_checkverf(struct rpc_task *task, __be32 *p) |
347 | { | 347 | { |
348 | struct rpc_cred *cred = task->tk_msg.rpc_cred; | 348 | struct rpc_cred *cred = task->tk_msg.rpc_cred; |
349 | 349 | ||
@@ -355,7 +355,7 @@ rpcauth_checkverf(struct rpc_task *task, u32 *p) | |||
355 | 355 | ||
356 | int | 356 | int |
357 | rpcauth_wrap_req(struct rpc_task *task, kxdrproc_t encode, void *rqstp, | 357 | rpcauth_wrap_req(struct rpc_task *task, kxdrproc_t encode, void *rqstp, |
358 | u32 *data, void *obj) | 358 | __be32 *data, void *obj) |
359 | { | 359 | { |
360 | struct rpc_cred *cred = task->tk_msg.rpc_cred; | 360 | struct rpc_cred *cred = task->tk_msg.rpc_cred; |
361 | 361 | ||
@@ -369,7 +369,7 @@ rpcauth_wrap_req(struct rpc_task *task, kxdrproc_t encode, void *rqstp, | |||
369 | 369 | ||
370 | int | 370 | int |
371 | rpcauth_unwrap_resp(struct rpc_task *task, kxdrproc_t decode, void *rqstp, | 371 | rpcauth_unwrap_resp(struct rpc_task *task, kxdrproc_t decode, void *rqstp, |
372 | u32 *data, void *obj) | 372 | __be32 *data, void *obj) |
373 | { | 373 | { |
374 | struct rpc_cred *cred = task->tk_msg.rpc_cred; | 374 | struct rpc_cred *cred = task->tk_msg.rpc_cred; |
375 | 375 | ||
diff --git a/net/sunrpc/auth_gss/auth_gss.c b/net/sunrpc/auth_gss/auth_gss.c index 6eed3e166ba3..a6ed2d22a6e6 100644 --- a/net/sunrpc/auth_gss/auth_gss.c +++ b/net/sunrpc/auth_gss/auth_gss.c | |||
@@ -826,14 +826,14 @@ out: | |||
826 | * Marshal credentials. | 826 | * Marshal credentials. |
827 | * Maybe we should keep a cached credential for performance reasons. | 827 | * Maybe we should keep a cached credential for performance reasons. |
828 | */ | 828 | */ |
829 | static u32 * | 829 | static __be32 * |
830 | gss_marshal(struct rpc_task *task, u32 *p) | 830 | gss_marshal(struct rpc_task *task, __be32 *p) |
831 | { | 831 | { |
832 | struct rpc_cred *cred = task->tk_msg.rpc_cred; | 832 | struct rpc_cred *cred = task->tk_msg.rpc_cred; |
833 | struct gss_cred *gss_cred = container_of(cred, struct gss_cred, | 833 | struct gss_cred *gss_cred = container_of(cred, struct gss_cred, |
834 | gc_base); | 834 | gc_base); |
835 | struct gss_cl_ctx *ctx = gss_cred_get_ctx(cred); | 835 | struct gss_cl_ctx *ctx = gss_cred_get_ctx(cred); |
836 | u32 *cred_len; | 836 | __be32 *cred_len; |
837 | struct rpc_rqst *req = task->tk_rqstp; | 837 | struct rpc_rqst *req = task->tk_rqstp; |
838 | u32 maj_stat = 0; | 838 | u32 maj_stat = 0; |
839 | struct xdr_netobj mic; | 839 | struct xdr_netobj mic; |
@@ -894,12 +894,12 @@ gss_refresh(struct rpc_task *task) | |||
894 | return 0; | 894 | return 0; |
895 | } | 895 | } |
896 | 896 | ||
897 | static u32 * | 897 | static __be32 * |
898 | gss_validate(struct rpc_task *task, u32 *p) | 898 | gss_validate(struct rpc_task *task, __be32 *p) |
899 | { | 899 | { |
900 | struct rpc_cred *cred = task->tk_msg.rpc_cred; | 900 | struct rpc_cred *cred = task->tk_msg.rpc_cred; |
901 | struct gss_cl_ctx *ctx = gss_cred_get_ctx(cred); | 901 | struct gss_cl_ctx *ctx = gss_cred_get_ctx(cred); |
902 | u32 seq; | 902 | __be32 seq; |
903 | struct kvec iov; | 903 | struct kvec iov; |
904 | struct xdr_buf verf_buf; | 904 | struct xdr_buf verf_buf; |
905 | struct xdr_netobj mic; | 905 | struct xdr_netobj mic; |
@@ -940,13 +940,14 @@ out_bad: | |||
940 | 940 | ||
941 | static inline int | 941 | static inline int |
942 | gss_wrap_req_integ(struct rpc_cred *cred, struct gss_cl_ctx *ctx, | 942 | gss_wrap_req_integ(struct rpc_cred *cred, struct gss_cl_ctx *ctx, |
943 | kxdrproc_t encode, struct rpc_rqst *rqstp, u32 *p, void *obj) | 943 | kxdrproc_t encode, struct rpc_rqst *rqstp, __be32 *p, void *obj) |
944 | { | 944 | { |
945 | struct xdr_buf *snd_buf = &rqstp->rq_snd_buf; | 945 | struct xdr_buf *snd_buf = &rqstp->rq_snd_buf; |
946 | struct xdr_buf integ_buf; | 946 | struct xdr_buf integ_buf; |
947 | u32 *integ_len = NULL; | 947 | __be32 *integ_len = NULL; |
948 | struct xdr_netobj mic; | 948 | struct xdr_netobj mic; |
949 | u32 offset, *q; | 949 | u32 offset; |
950 | __be32 *q; | ||
950 | struct kvec *iov; | 951 | struct kvec *iov; |
951 | u32 maj_stat = 0; | 952 | u32 maj_stat = 0; |
952 | int status = -EIO; | 953 | int status = -EIO; |
@@ -1032,13 +1033,13 @@ out: | |||
1032 | 1033 | ||
1033 | static inline int | 1034 | static inline int |
1034 | gss_wrap_req_priv(struct rpc_cred *cred, struct gss_cl_ctx *ctx, | 1035 | gss_wrap_req_priv(struct rpc_cred *cred, struct gss_cl_ctx *ctx, |
1035 | kxdrproc_t encode, struct rpc_rqst *rqstp, u32 *p, void *obj) | 1036 | kxdrproc_t encode, struct rpc_rqst *rqstp, __be32 *p, void *obj) |
1036 | { | 1037 | { |
1037 | struct xdr_buf *snd_buf = &rqstp->rq_snd_buf; | 1038 | struct xdr_buf *snd_buf = &rqstp->rq_snd_buf; |
1038 | u32 offset; | 1039 | u32 offset; |
1039 | u32 maj_stat; | 1040 | u32 maj_stat; |
1040 | int status; | 1041 | int status; |
1041 | u32 *opaque_len; | 1042 | __be32 *opaque_len; |
1042 | struct page **inpages; | 1043 | struct page **inpages; |
1043 | int first; | 1044 | int first; |
1044 | int pad; | 1045 | int pad; |
@@ -1095,7 +1096,7 @@ gss_wrap_req_priv(struct rpc_cred *cred, struct gss_cl_ctx *ctx, | |||
1095 | 1096 | ||
1096 | static int | 1097 | static int |
1097 | gss_wrap_req(struct rpc_task *task, | 1098 | gss_wrap_req(struct rpc_task *task, |
1098 | kxdrproc_t encode, void *rqstp, u32 *p, void *obj) | 1099 | kxdrproc_t encode, void *rqstp, __be32 *p, void *obj) |
1099 | { | 1100 | { |
1100 | struct rpc_cred *cred = task->tk_msg.rpc_cred; | 1101 | struct rpc_cred *cred = task->tk_msg.rpc_cred; |
1101 | struct gss_cred *gss_cred = container_of(cred, struct gss_cred, | 1102 | struct gss_cred *gss_cred = container_of(cred, struct gss_cred, |
@@ -1132,7 +1133,7 @@ out: | |||
1132 | 1133 | ||
1133 | static inline int | 1134 | static inline int |
1134 | gss_unwrap_resp_integ(struct rpc_cred *cred, struct gss_cl_ctx *ctx, | 1135 | gss_unwrap_resp_integ(struct rpc_cred *cred, struct gss_cl_ctx *ctx, |
1135 | struct rpc_rqst *rqstp, u32 **p) | 1136 | struct rpc_rqst *rqstp, __be32 **p) |
1136 | { | 1137 | { |
1137 | struct xdr_buf *rcv_buf = &rqstp->rq_rcv_buf; | 1138 | struct xdr_buf *rcv_buf = &rqstp->rq_rcv_buf; |
1138 | struct xdr_buf integ_buf; | 1139 | struct xdr_buf integ_buf; |
@@ -1169,7 +1170,7 @@ gss_unwrap_resp_integ(struct rpc_cred *cred, struct gss_cl_ctx *ctx, | |||
1169 | 1170 | ||
1170 | static inline int | 1171 | static inline int |
1171 | gss_unwrap_resp_priv(struct rpc_cred *cred, struct gss_cl_ctx *ctx, | 1172 | gss_unwrap_resp_priv(struct rpc_cred *cred, struct gss_cl_ctx *ctx, |
1172 | struct rpc_rqst *rqstp, u32 **p) | 1173 | struct rpc_rqst *rqstp, __be32 **p) |
1173 | { | 1174 | { |
1174 | struct xdr_buf *rcv_buf = &rqstp->rq_rcv_buf; | 1175 | struct xdr_buf *rcv_buf = &rqstp->rq_rcv_buf; |
1175 | u32 offset; | 1176 | u32 offset; |
@@ -1198,13 +1199,13 @@ gss_unwrap_resp_priv(struct rpc_cred *cred, struct gss_cl_ctx *ctx, | |||
1198 | 1199 | ||
1199 | static int | 1200 | static int |
1200 | gss_unwrap_resp(struct rpc_task *task, | 1201 | gss_unwrap_resp(struct rpc_task *task, |
1201 | kxdrproc_t decode, void *rqstp, u32 *p, void *obj) | 1202 | kxdrproc_t decode, void *rqstp, __be32 *p, void *obj) |
1202 | { | 1203 | { |
1203 | struct rpc_cred *cred = task->tk_msg.rpc_cred; | 1204 | struct rpc_cred *cred = task->tk_msg.rpc_cred; |
1204 | struct gss_cred *gss_cred = container_of(cred, struct gss_cred, | 1205 | struct gss_cred *gss_cred = container_of(cred, struct gss_cred, |
1205 | gc_base); | 1206 | gc_base); |
1206 | struct gss_cl_ctx *ctx = gss_cred_get_ctx(cred); | 1207 | struct gss_cl_ctx *ctx = gss_cred_get_ctx(cred); |
1207 | u32 *savedp = p; | 1208 | __be32 *savedp = p; |
1208 | struct kvec *head = ((struct rpc_rqst *)rqstp)->rq_rcv_buf.head; | 1209 | struct kvec *head = ((struct rpc_rqst *)rqstp)->rq_rcv_buf.head; |
1209 | int savedlen = head->iov_len; | 1210 | int savedlen = head->iov_len; |
1210 | int status = -EIO; | 1211 | int status = -EIO; |
diff --git a/net/sunrpc/auth_gss/gss_krb5_seal.c b/net/sunrpc/auth_gss/gss_krb5_seal.c index 2f312164d6d5..08601ee4cd73 100644 --- a/net/sunrpc/auth_gss/gss_krb5_seal.c +++ b/net/sunrpc/auth_gss/gss_krb5_seal.c | |||
@@ -115,7 +115,7 @@ gss_get_mic_kerberos(struct gss_ctx *gss_ctx, struct xdr_buf *text, | |||
115 | krb5_hdr = ptr - 2; | 115 | krb5_hdr = ptr - 2; |
116 | msg_start = krb5_hdr + 24; | 116 | msg_start = krb5_hdr + 24; |
117 | 117 | ||
118 | *(u16 *)(krb5_hdr + 2) = htons(ctx->signalg); | 118 | *(__be16 *)(krb5_hdr + 2) = htons(ctx->signalg); |
119 | memset(krb5_hdr + 4, 0xff, 4); | 119 | memset(krb5_hdr + 4, 0xff, 4); |
120 | 120 | ||
121 | if (make_checksum(checksum_type, krb5_hdr, 8, text, 0, &md5cksum)) | 121 | if (make_checksum(checksum_type, krb5_hdr, 8, text, 0, &md5cksum)) |
diff --git a/net/sunrpc/auth_gss/gss_krb5_wrap.c b/net/sunrpc/auth_gss/gss_krb5_wrap.c index f179415d0c38..cc45c1605f80 100644 --- a/net/sunrpc/auth_gss/gss_krb5_wrap.c +++ b/net/sunrpc/auth_gss/gss_krb5_wrap.c | |||
@@ -177,9 +177,9 @@ gss_wrap_kerberos(struct gss_ctx *ctx, int offset, | |||
177 | msg_start = krb5_hdr + 24; | 177 | msg_start = krb5_hdr + 24; |
178 | /* XXXJBF: */ BUG_ON(buf->head[0].iov_base + offset + headlen != msg_start + blocksize); | 178 | /* XXXJBF: */ BUG_ON(buf->head[0].iov_base + offset + headlen != msg_start + blocksize); |
179 | 179 | ||
180 | *(u16 *)(krb5_hdr + 2) = htons(kctx->signalg); | 180 | *(__be16 *)(krb5_hdr + 2) = htons(kctx->signalg); |
181 | memset(krb5_hdr + 4, 0xff, 4); | 181 | memset(krb5_hdr + 4, 0xff, 4); |
182 | *(u16 *)(krb5_hdr + 4) = htons(kctx->sealalg); | 182 | *(__be16 *)(krb5_hdr + 4) = htons(kctx->sealalg); |
183 | 183 | ||
184 | make_confounder(msg_start, blocksize); | 184 | make_confounder(msg_start, blocksize); |
185 | 185 | ||
diff --git a/net/sunrpc/auth_gss/svcauth_gss.c b/net/sunrpc/auth_gss/svcauth_gss.c index cd3d77ca3a31..a2587e8eef7b 100644 --- a/net/sunrpc/auth_gss/svcauth_gss.c +++ b/net/sunrpc/auth_gss/svcauth_gss.c | |||
@@ -640,7 +640,7 @@ svc_safe_putnetobj(struct kvec *resv, struct xdr_netobj *o) | |||
640 | */ | 640 | */ |
641 | static int | 641 | static int |
642 | gss_verify_header(struct svc_rqst *rqstp, struct rsc *rsci, | 642 | gss_verify_header(struct svc_rqst *rqstp, struct rsc *rsci, |
643 | u32 *rpcstart, struct rpc_gss_wire_cred *gc, u32 *authp) | 643 | __be32 *rpcstart, struct rpc_gss_wire_cred *gc, __be32 *authp) |
644 | { | 644 | { |
645 | struct gss_ctx *ctx_id = rsci->mechctx; | 645 | struct gss_ctx *ctx_id = rsci->mechctx; |
646 | struct xdr_buf rpchdr; | 646 | struct xdr_buf rpchdr; |
@@ -687,7 +687,7 @@ gss_verify_header(struct svc_rqst *rqstp, struct rsc *rsci, | |||
687 | static int | 687 | static int |
688 | gss_write_null_verf(struct svc_rqst *rqstp) | 688 | gss_write_null_verf(struct svc_rqst *rqstp) |
689 | { | 689 | { |
690 | u32 *p; | 690 | __be32 *p; |
691 | 691 | ||
692 | svc_putnl(rqstp->rq_res.head, RPC_AUTH_NULL); | 692 | svc_putnl(rqstp->rq_res.head, RPC_AUTH_NULL); |
693 | p = rqstp->rq_res.head->iov_base + rqstp->rq_res.head->iov_len; | 693 | p = rqstp->rq_res.head->iov_base + rqstp->rq_res.head->iov_len; |
@@ -701,11 +701,11 @@ gss_write_null_verf(struct svc_rqst *rqstp) | |||
701 | static int | 701 | static int |
702 | gss_write_verf(struct svc_rqst *rqstp, struct gss_ctx *ctx_id, u32 seq) | 702 | gss_write_verf(struct svc_rqst *rqstp, struct gss_ctx *ctx_id, u32 seq) |
703 | { | 703 | { |
704 | u32 xdr_seq; | 704 | __be32 xdr_seq; |
705 | u32 maj_stat; | 705 | u32 maj_stat; |
706 | struct xdr_buf verf_data; | 706 | struct xdr_buf verf_data; |
707 | struct xdr_netobj mic; | 707 | struct xdr_netobj mic; |
708 | u32 *p; | 708 | __be32 *p; |
709 | struct kvec iov; | 709 | struct kvec iov; |
710 | 710 | ||
711 | svc_putnl(rqstp->rq_res.head, RPC_AUTH_GSS); | 711 | svc_putnl(rqstp->rq_res.head, RPC_AUTH_GSS); |
@@ -782,7 +782,7 @@ EXPORT_SYMBOL(svcauth_gss_register_pseudoflavor); | |||
782 | static inline int | 782 | static inline int |
783 | read_u32_from_xdr_buf(struct xdr_buf *buf, int base, u32 *obj) | 783 | read_u32_from_xdr_buf(struct xdr_buf *buf, int base, u32 *obj) |
784 | { | 784 | { |
785 | u32 raw; | 785 | __be32 raw; |
786 | int status; | 786 | int status; |
787 | 787 | ||
788 | status = read_bytes_from_xdr_buf(buf, base, &raw, sizeof(*obj)); | 788 | status = read_bytes_from_xdr_buf(buf, base, &raw, sizeof(*obj)); |
@@ -905,7 +905,7 @@ struct gss_svc_data { | |||
905 | struct rpc_gss_wire_cred clcred; | 905 | struct rpc_gss_wire_cred clcred; |
906 | /* pointer to the beginning of the procedure-specific results, | 906 | /* pointer to the beginning of the procedure-specific results, |
907 | * which may be encrypted/checksummed in svcauth_gss_release: */ | 907 | * which may be encrypted/checksummed in svcauth_gss_release: */ |
908 | u32 *body_start; | 908 | __be32 *body_start; |
909 | struct rsc *rsci; | 909 | struct rsc *rsci; |
910 | }; | 910 | }; |
911 | 911 | ||
@@ -946,7 +946,7 @@ gss_write_init_verf(struct svc_rqst *rqstp, struct rsi *rsip) | |||
946 | * response here and return SVC_COMPLETE. | 946 | * response here and return SVC_COMPLETE. |
947 | */ | 947 | */ |
948 | static int | 948 | static int |
949 | svcauth_gss_accept(struct svc_rqst *rqstp, u32 *authp) | 949 | svcauth_gss_accept(struct svc_rqst *rqstp, __be32 *authp) |
950 | { | 950 | { |
951 | struct kvec *argv = &rqstp->rq_arg.head[0]; | 951 | struct kvec *argv = &rqstp->rq_arg.head[0]; |
952 | struct kvec *resv = &rqstp->rq_res.head[0]; | 952 | struct kvec *resv = &rqstp->rq_res.head[0]; |
@@ -956,8 +956,8 @@ svcauth_gss_accept(struct svc_rqst *rqstp, u32 *authp) | |||
956 | struct rpc_gss_wire_cred *gc; | 956 | struct rpc_gss_wire_cred *gc; |
957 | struct rsc *rsci = NULL; | 957 | struct rsc *rsci = NULL; |
958 | struct rsi *rsip, rsikey; | 958 | struct rsi *rsip, rsikey; |
959 | u32 *rpcstart; | 959 | __be32 *rpcstart; |
960 | u32 *reject_stat = resv->iov_base + resv->iov_len; | 960 | __be32 *reject_stat = resv->iov_base + resv->iov_len; |
961 | int ret; | 961 | int ret; |
962 | 962 | ||
963 | dprintk("RPC: svcauth_gss: argv->iov_len = %zd\n",argv->iov_len); | 963 | dprintk("RPC: svcauth_gss: argv->iov_len = %zd\n",argv->iov_len); |
@@ -1156,7 +1156,7 @@ svcauth_gss_wrap_resp_integ(struct svc_rqst *rqstp) | |||
1156 | struct xdr_buf integ_buf; | 1156 | struct xdr_buf integ_buf; |
1157 | struct xdr_netobj mic; | 1157 | struct xdr_netobj mic; |
1158 | struct kvec *resv; | 1158 | struct kvec *resv; |
1159 | u32 *p; | 1159 | __be32 *p; |
1160 | int integ_offset, integ_len; | 1160 | int integ_offset, integ_len; |
1161 | int stat = -EINVAL; | 1161 | int stat = -EINVAL; |
1162 | 1162 | ||
@@ -1219,7 +1219,7 @@ svcauth_gss_wrap_resp_priv(struct svc_rqst *rqstp) | |||
1219 | struct rpc_gss_wire_cred *gc = &gsd->clcred; | 1219 | struct rpc_gss_wire_cred *gc = &gsd->clcred; |
1220 | struct xdr_buf *resbuf = &rqstp->rq_res; | 1220 | struct xdr_buf *resbuf = &rqstp->rq_res; |
1221 | struct page **inpages = NULL; | 1221 | struct page **inpages = NULL; |
1222 | u32 *p; | 1222 | __be32 *p; |
1223 | int offset, *len; | 1223 | int offset, *len; |
1224 | int pad; | 1224 | int pad; |
1225 | 1225 | ||
@@ -1264,7 +1264,7 @@ svcauth_gss_wrap_resp_priv(struct svc_rqst *rqstp) | |||
1264 | return -ENOMEM; | 1264 | return -ENOMEM; |
1265 | *len = htonl(resbuf->len - offset); | 1265 | *len = htonl(resbuf->len - offset); |
1266 | pad = 3 - ((resbuf->len - offset - 1)&3); | 1266 | pad = 3 - ((resbuf->len - offset - 1)&3); |
1267 | p = (u32 *)(resbuf->tail[0].iov_base + resbuf->tail[0].iov_len); | 1267 | p = (__be32 *)(resbuf->tail[0].iov_base + resbuf->tail[0].iov_len); |
1268 | memset(p, 0, pad); | 1268 | memset(p, 0, pad); |
1269 | resbuf->tail[0].iov_len += pad; | 1269 | resbuf->tail[0].iov_len += pad; |
1270 | resbuf->len += pad; | 1270 | resbuf->len += pad; |
diff --git a/net/sunrpc/auth_null.c b/net/sunrpc/auth_null.c index 2eccffa96ba1..3be257dc32b2 100644 --- a/net/sunrpc/auth_null.c +++ b/net/sunrpc/auth_null.c | |||
@@ -60,8 +60,8 @@ nul_match(struct auth_cred *acred, struct rpc_cred *cred, int taskflags) | |||
60 | /* | 60 | /* |
61 | * Marshal credential. | 61 | * Marshal credential. |
62 | */ | 62 | */ |
63 | static u32 * | 63 | static __be32 * |
64 | nul_marshal(struct rpc_task *task, u32 *p) | 64 | nul_marshal(struct rpc_task *task, __be32 *p) |
65 | { | 65 | { |
66 | *p++ = htonl(RPC_AUTH_NULL); | 66 | *p++ = htonl(RPC_AUTH_NULL); |
67 | *p++ = 0; | 67 | *p++ = 0; |
@@ -81,8 +81,8 @@ nul_refresh(struct rpc_task *task) | |||
81 | return 0; | 81 | return 0; |
82 | } | 82 | } |
83 | 83 | ||
84 | static u32 * | 84 | static __be32 * |
85 | nul_validate(struct rpc_task *task, u32 *p) | 85 | nul_validate(struct rpc_task *task, __be32 *p) |
86 | { | 86 | { |
87 | rpc_authflavor_t flavor; | 87 | rpc_authflavor_t flavor; |
88 | u32 size; | 88 | u32 size; |
diff --git a/net/sunrpc/auth_unix.c b/net/sunrpc/auth_unix.c index 74c7406a1054..f7f990c9afe2 100644 --- a/net/sunrpc/auth_unix.c +++ b/net/sunrpc/auth_unix.c | |||
@@ -137,12 +137,12 @@ unx_match(struct auth_cred *acred, struct rpc_cred *rcred, int flags) | |||
137 | * Marshal credentials. | 137 | * Marshal credentials. |
138 | * Maybe we should keep a cached credential for performance reasons. | 138 | * Maybe we should keep a cached credential for performance reasons. |
139 | */ | 139 | */ |
140 | static u32 * | 140 | static __be32 * |
141 | unx_marshal(struct rpc_task *task, u32 *p) | 141 | unx_marshal(struct rpc_task *task, __be32 *p) |
142 | { | 142 | { |
143 | struct rpc_clnt *clnt = task->tk_client; | 143 | struct rpc_clnt *clnt = task->tk_client; |
144 | struct unx_cred *cred = (struct unx_cred *) task->tk_msg.rpc_cred; | 144 | struct unx_cred *cred = (struct unx_cred *) task->tk_msg.rpc_cred; |
145 | u32 *base, *hold; | 145 | __be32 *base, *hold; |
146 | int i; | 146 | int i; |
147 | 147 | ||
148 | *p++ = htonl(RPC_AUTH_UNIX); | 148 | *p++ = htonl(RPC_AUTH_UNIX); |
@@ -178,8 +178,8 @@ unx_refresh(struct rpc_task *task) | |||
178 | return 0; | 178 | return 0; |
179 | } | 179 | } |
180 | 180 | ||
181 | static u32 * | 181 | static __be32 * |
182 | unx_validate(struct rpc_task *task, u32 *p) | 182 | unx_validate(struct rpc_task *task, __be32 *p) |
183 | { | 183 | { |
184 | rpc_authflavor_t flavor; | 184 | rpc_authflavor_t flavor; |
185 | u32 size; | 185 | u32 size; |
diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c index 084a0ad5c64e..124ff0ceb55b 100644 --- a/net/sunrpc/clnt.c +++ b/net/sunrpc/clnt.c | |||
@@ -60,8 +60,8 @@ static void call_refreshresult(struct rpc_task *task); | |||
60 | static void call_timeout(struct rpc_task *task); | 60 | static void call_timeout(struct rpc_task *task); |
61 | static void call_connect(struct rpc_task *task); | 61 | static void call_connect(struct rpc_task *task); |
62 | static void call_connect_status(struct rpc_task *task); | 62 | static void call_connect_status(struct rpc_task *task); |
63 | static u32 * call_header(struct rpc_task *task); | 63 | static __be32 * call_header(struct rpc_task *task); |
64 | static u32 * call_verify(struct rpc_task *task); | 64 | static __be32 * call_verify(struct rpc_task *task); |
65 | 65 | ||
66 | 66 | ||
67 | static int | 67 | static int |
@@ -782,7 +782,7 @@ call_encode(struct rpc_task *task) | |||
782 | struct xdr_buf *rcvbuf = &req->rq_rcv_buf; | 782 | struct xdr_buf *rcvbuf = &req->rq_rcv_buf; |
783 | unsigned int bufsiz; | 783 | unsigned int bufsiz; |
784 | kxdrproc_t encode; | 784 | kxdrproc_t encode; |
785 | u32 *p; | 785 | __be32 *p; |
786 | 786 | ||
787 | dprintk("RPC: %4d call_encode (status %d)\n", | 787 | dprintk("RPC: %4d call_encode (status %d)\n", |
788 | task->tk_pid, task->tk_status); | 788 | task->tk_pid, task->tk_status); |
@@ -1100,7 +1100,7 @@ call_decode(struct rpc_task *task) | |||
1100 | struct rpc_clnt *clnt = task->tk_client; | 1100 | struct rpc_clnt *clnt = task->tk_client; |
1101 | struct rpc_rqst *req = task->tk_rqstp; | 1101 | struct rpc_rqst *req = task->tk_rqstp; |
1102 | kxdrproc_t decode = task->tk_msg.rpc_proc->p_decode; | 1102 | kxdrproc_t decode = task->tk_msg.rpc_proc->p_decode; |
1103 | u32 *p; | 1103 | __be32 *p; |
1104 | 1104 | ||
1105 | dprintk("RPC: %4d call_decode (status %d)\n", | 1105 | dprintk("RPC: %4d call_decode (status %d)\n", |
1106 | task->tk_pid, task->tk_status); | 1106 | task->tk_pid, task->tk_status); |
@@ -1197,12 +1197,12 @@ call_refreshresult(struct rpc_task *task) | |||
1197 | /* | 1197 | /* |
1198 | * Call header serialization | 1198 | * Call header serialization |
1199 | */ | 1199 | */ |
1200 | static u32 * | 1200 | static __be32 * |
1201 | call_header(struct rpc_task *task) | 1201 | call_header(struct rpc_task *task) |
1202 | { | 1202 | { |
1203 | struct rpc_clnt *clnt = task->tk_client; | 1203 | struct rpc_clnt *clnt = task->tk_client; |
1204 | struct rpc_rqst *req = task->tk_rqstp; | 1204 | struct rpc_rqst *req = task->tk_rqstp; |
1205 | u32 *p = req->rq_svec[0].iov_base; | 1205 | __be32 *p = req->rq_svec[0].iov_base; |
1206 | 1206 | ||
1207 | /* FIXME: check buffer size? */ | 1207 | /* FIXME: check buffer size? */ |
1208 | 1208 | ||
@@ -1221,12 +1221,13 @@ call_header(struct rpc_task *task) | |||
1221 | /* | 1221 | /* |
1222 | * Reply header verification | 1222 | * Reply header verification |
1223 | */ | 1223 | */ |
1224 | static u32 * | 1224 | static __be32 * |
1225 | call_verify(struct rpc_task *task) | 1225 | call_verify(struct rpc_task *task) |
1226 | { | 1226 | { |
1227 | struct kvec *iov = &task->tk_rqstp->rq_rcv_buf.head[0]; | 1227 | struct kvec *iov = &task->tk_rqstp->rq_rcv_buf.head[0]; |
1228 | int len = task->tk_rqstp->rq_rcv_buf.len >> 2; | 1228 | int len = task->tk_rqstp->rq_rcv_buf.len >> 2; |
1229 | u32 *p = iov->iov_base, n; | 1229 | __be32 *p = iov->iov_base; |
1230 | u32 n; | ||
1230 | int error = -EACCES; | 1231 | int error = -EACCES; |
1231 | 1232 | ||
1232 | if ((task->tk_rqstp->rq_rcv_buf.len & 3) != 0) { | 1233 | if ((task->tk_rqstp->rq_rcv_buf.len & 3) != 0) { |
@@ -1303,7 +1304,7 @@ call_verify(struct rpc_task *task) | |||
1303 | printk(KERN_WARNING "call_verify: auth check failed\n"); | 1304 | printk(KERN_WARNING "call_verify: auth check failed\n"); |
1304 | goto out_garbage; /* bad verifier, retry */ | 1305 | goto out_garbage; /* bad verifier, retry */ |
1305 | } | 1306 | } |
1306 | len = p - (u32 *)iov->iov_base - 1; | 1307 | len = p - (__be32 *)iov->iov_base - 1; |
1307 | if (len < 0) | 1308 | if (len < 0) |
1308 | goto out_overflow; | 1309 | goto out_overflow; |
1309 | switch ((n = ntohl(*p++))) { | 1310 | switch ((n = ntohl(*p++))) { |
@@ -1358,12 +1359,12 @@ out_overflow: | |||
1358 | goto out_garbage; | 1359 | goto out_garbage; |
1359 | } | 1360 | } |
1360 | 1361 | ||
1361 | static int rpcproc_encode_null(void *rqstp, u32 *data, void *obj) | 1362 | static int rpcproc_encode_null(void *rqstp, __be32 *data, void *obj) |
1362 | { | 1363 | { |
1363 | return 0; | 1364 | return 0; |
1364 | } | 1365 | } |
1365 | 1366 | ||
1366 | static int rpcproc_decode_null(void *rqstp, u32 *data, void *obj) | 1367 | static int rpcproc_decode_null(void *rqstp, __be32 *data, void *obj) |
1367 | { | 1368 | { |
1368 | return 0; | 1369 | return 0; |
1369 | } | 1370 | } |
diff --git a/net/sunrpc/pmap_clnt.c b/net/sunrpc/pmap_clnt.c index c04609d3476a..919d5ba7ca0a 100644 --- a/net/sunrpc/pmap_clnt.c +++ b/net/sunrpc/pmap_clnt.c | |||
@@ -300,7 +300,7 @@ static struct rpc_clnt *pmap_create(char *hostname, struct sockaddr_in *srvaddr, | |||
300 | /* | 300 | /* |
301 | * XDR encode/decode functions for PMAP | 301 | * XDR encode/decode functions for PMAP |
302 | */ | 302 | */ |
303 | static int xdr_encode_mapping(struct rpc_rqst *req, u32 *p, struct portmap_args *map) | 303 | static int xdr_encode_mapping(struct rpc_rqst *req, __be32 *p, struct portmap_args *map) |
304 | { | 304 | { |
305 | dprintk("RPC: xdr_encode_mapping(%u, %u, %u, %u)\n", | 305 | dprintk("RPC: xdr_encode_mapping(%u, %u, %u, %u)\n", |
306 | map->pm_prog, map->pm_vers, map->pm_prot, map->pm_port); | 306 | map->pm_prog, map->pm_vers, map->pm_prot, map->pm_port); |
@@ -313,13 +313,13 @@ static int xdr_encode_mapping(struct rpc_rqst *req, u32 *p, struct portmap_args | |||
313 | return 0; | 313 | return 0; |
314 | } | 314 | } |
315 | 315 | ||
316 | static int xdr_decode_port(struct rpc_rqst *req, u32 *p, unsigned short *portp) | 316 | static int xdr_decode_port(struct rpc_rqst *req, __be32 *p, unsigned short *portp) |
317 | { | 317 | { |
318 | *portp = (unsigned short) ntohl(*p++); | 318 | *portp = (unsigned short) ntohl(*p++); |
319 | return 0; | 319 | return 0; |
320 | } | 320 | } |
321 | 321 | ||
322 | static int xdr_decode_bool(struct rpc_rqst *req, u32 *p, unsigned int *boolp) | 322 | static int xdr_decode_bool(struct rpc_rqst *req, __be32 *p, unsigned int *boolp) |
323 | { | 323 | { |
324 | *boolp = (unsigned int) ntohl(*p++); | 324 | *boolp = (unsigned int) ntohl(*p++); |
325 | return 0; | 325 | return 0; |
diff --git a/net/sunrpc/svc.c b/net/sunrpc/svc.c index 6589e1ad47fa..44b8d9d4c18a 100644 --- a/net/sunrpc/svc.c +++ b/net/sunrpc/svc.c | |||
@@ -256,11 +256,11 @@ svc_process(struct svc_serv *serv, struct svc_rqst *rqstp) | |||
256 | struct kvec * argv = &rqstp->rq_arg.head[0]; | 256 | struct kvec * argv = &rqstp->rq_arg.head[0]; |
257 | struct kvec * resv = &rqstp->rq_res.head[0]; | 257 | struct kvec * resv = &rqstp->rq_res.head[0]; |
258 | kxdrproc_t xdr; | 258 | kxdrproc_t xdr; |
259 | u32 *statp; | 259 | __be32 *statp; |
260 | u32 dir, prog, vers, proc, | 260 | u32 dir, prog, vers, proc; |
261 | auth_stat, rpc_stat; | 261 | __be32 auth_stat, rpc_stat; |
262 | int auth_res; | 262 | int auth_res; |
263 | u32 *accept_statp; | 263 | __be32 *accept_statp; |
264 | 264 | ||
265 | rpc_stat = rpc_success; | 265 | rpc_stat = rpc_success; |
266 | 266 | ||
diff --git a/net/sunrpc/svcauth.c b/net/sunrpc/svcauth.c index 3f4d1f622de8..8f2320aded5c 100644 --- a/net/sunrpc/svcauth.c +++ b/net/sunrpc/svcauth.c | |||
@@ -35,7 +35,7 @@ static struct auth_ops *authtab[RPC_AUTH_MAXFLAVOR] = { | |||
35 | }; | 35 | }; |
36 | 36 | ||
37 | int | 37 | int |
38 | svc_authenticate(struct svc_rqst *rqstp, u32 *authp) | 38 | svc_authenticate(struct svc_rqst *rqstp, __be32 *authp) |
39 | { | 39 | { |
40 | rpc_authflavor_t flavor; | 40 | rpc_authflavor_t flavor; |
41 | struct auth_ops *aops; | 41 | struct auth_ops *aops; |
diff --git a/net/sunrpc/svcauth_unix.c b/net/sunrpc/svcauth_unix.c index 27f443b44af8..f98229fb5e10 100644 --- a/net/sunrpc/svcauth_unix.c +++ b/net/sunrpc/svcauth_unix.c | |||
@@ -145,7 +145,7 @@ static void ip_map_request(struct cache_detail *cd, | |||
145 | { | 145 | { |
146 | char text_addr[20]; | 146 | char text_addr[20]; |
147 | struct ip_map *im = container_of(h, struct ip_map, h); | 147 | struct ip_map *im = container_of(h, struct ip_map, h); |
148 | __u32 addr = im->m_addr.s_addr; | 148 | __be32 addr = im->m_addr.s_addr; |
149 | 149 | ||
150 | snprintf(text_addr, 20, "%u.%u.%u.%u", | 150 | snprintf(text_addr, 20, "%u.%u.%u.%u", |
151 | ntohl(addr) >> 24 & 0xff, | 151 | ntohl(addr) >> 24 & 0xff, |
@@ -410,7 +410,7 @@ svcauth_unix_set_client(struct svc_rqst *rqstp) | |||
410 | } | 410 | } |
411 | 411 | ||
412 | static int | 412 | static int |
413 | svcauth_null_accept(struct svc_rqst *rqstp, u32 *authp) | 413 | svcauth_null_accept(struct svc_rqst *rqstp, __be32 *authp) |
414 | { | 414 | { |
415 | struct kvec *argv = &rqstp->rq_arg.head[0]; | 415 | struct kvec *argv = &rqstp->rq_arg.head[0]; |
416 | struct kvec *resv = &rqstp->rq_res.head[0]; | 416 | struct kvec *resv = &rqstp->rq_res.head[0]; |
@@ -472,7 +472,7 @@ struct auth_ops svcauth_null = { | |||
472 | 472 | ||
473 | 473 | ||
474 | static int | 474 | static int |
475 | svcauth_unix_accept(struct svc_rqst *rqstp, u32 *authp) | 475 | svcauth_unix_accept(struct svc_rqst *rqstp, __be32 *authp) |
476 | { | 476 | { |
477 | struct kvec *argv = &rqstp->rq_arg.head[0]; | 477 | struct kvec *argv = &rqstp->rq_arg.head[0]; |
478 | struct kvec *resv = &rqstp->rq_res.head[0]; | 478 | struct kvec *resv = &rqstp->rq_res.head[0]; |
@@ -491,7 +491,7 @@ svcauth_unix_accept(struct svc_rqst *rqstp, u32 *authp) | |||
491 | slen = XDR_QUADLEN(svc_getnl(argv)); /* machname length */ | 491 | slen = XDR_QUADLEN(svc_getnl(argv)); /* machname length */ |
492 | if (slen > 64 || (len -= (slen + 3)*4) < 0) | 492 | if (slen > 64 || (len -= (slen + 3)*4) < 0) |
493 | goto badcred; | 493 | goto badcred; |
494 | argv->iov_base = (void*)((u32*)argv->iov_base + slen); /* skip machname */ | 494 | argv->iov_base = (void*)((__be32*)argv->iov_base + slen); /* skip machname */ |
495 | argv->iov_len -= slen*4; | 495 | argv->iov_len -= slen*4; |
496 | 496 | ||
497 | cred->cr_uid = svc_getnl(argv); /* uid */ | 497 | cred->cr_uid = svc_getnl(argv); /* uid */ |
diff --git a/net/sunrpc/svcsock.c b/net/sunrpc/svcsock.c index 953aff89bcac..f09f7487051f 100644 --- a/net/sunrpc/svcsock.c +++ b/net/sunrpc/svcsock.c | |||
@@ -1030,7 +1030,7 @@ svc_tcp_sendto(struct svc_rqst *rqstp) | |||
1030 | { | 1030 | { |
1031 | struct xdr_buf *xbufp = &rqstp->rq_res; | 1031 | struct xdr_buf *xbufp = &rqstp->rq_res; |
1032 | int sent; | 1032 | int sent; |
1033 | u32 reclen; | 1033 | __be32 reclen; |
1034 | 1034 | ||
1035 | /* Set up the first element of the reply kvec. | 1035 | /* Set up the first element of the reply kvec. |
1036 | * Any other kvecs that may be in use have been taken | 1036 | * Any other kvecs that may be in use have been taken |
diff --git a/net/sunrpc/xdr.c b/net/sunrpc/xdr.c index 6ac45103a272..9022eb8b37ed 100644 --- a/net/sunrpc/xdr.c +++ b/net/sunrpc/xdr.c | |||
@@ -18,8 +18,8 @@ | |||
18 | /* | 18 | /* |
19 | * XDR functions for basic NFS types | 19 | * XDR functions for basic NFS types |
20 | */ | 20 | */ |
21 | u32 * | 21 | __be32 * |
22 | xdr_encode_netobj(u32 *p, const struct xdr_netobj *obj) | 22 | xdr_encode_netobj(__be32 *p, const struct xdr_netobj *obj) |
23 | { | 23 | { |
24 | unsigned int quadlen = XDR_QUADLEN(obj->len); | 24 | unsigned int quadlen = XDR_QUADLEN(obj->len); |
25 | 25 | ||
@@ -29,8 +29,8 @@ xdr_encode_netobj(u32 *p, const struct xdr_netobj *obj) | |||
29 | return p + XDR_QUADLEN(obj->len); | 29 | return p + XDR_QUADLEN(obj->len); |
30 | } | 30 | } |
31 | 31 | ||
32 | u32 * | 32 | __be32 * |
33 | xdr_decode_netobj(u32 *p, struct xdr_netobj *obj) | 33 | xdr_decode_netobj(__be32 *p, struct xdr_netobj *obj) |
34 | { | 34 | { |
35 | unsigned int len; | 35 | unsigned int len; |
36 | 36 | ||
@@ -55,7 +55,7 @@ xdr_decode_netobj(u32 *p, struct xdr_netobj *obj) | |||
55 | * Returns the updated current XDR buffer position | 55 | * Returns the updated current XDR buffer position |
56 | * | 56 | * |
57 | */ | 57 | */ |
58 | u32 *xdr_encode_opaque_fixed(u32 *p, const void *ptr, unsigned int nbytes) | 58 | __be32 *xdr_encode_opaque_fixed(__be32 *p, const void *ptr, unsigned int nbytes) |
59 | { | 59 | { |
60 | if (likely(nbytes != 0)) { | 60 | if (likely(nbytes != 0)) { |
61 | unsigned int quadlen = XDR_QUADLEN(nbytes); | 61 | unsigned int quadlen = XDR_QUADLEN(nbytes); |
@@ -79,21 +79,21 @@ EXPORT_SYMBOL(xdr_encode_opaque_fixed); | |||
79 | * | 79 | * |
80 | * Returns the updated current XDR buffer position | 80 | * Returns the updated current XDR buffer position |
81 | */ | 81 | */ |
82 | u32 *xdr_encode_opaque(u32 *p, const void *ptr, unsigned int nbytes) | 82 | __be32 *xdr_encode_opaque(__be32 *p, const void *ptr, unsigned int nbytes) |
83 | { | 83 | { |
84 | *p++ = htonl(nbytes); | 84 | *p++ = htonl(nbytes); |
85 | return xdr_encode_opaque_fixed(p, ptr, nbytes); | 85 | return xdr_encode_opaque_fixed(p, ptr, nbytes); |
86 | } | 86 | } |
87 | EXPORT_SYMBOL(xdr_encode_opaque); | 87 | EXPORT_SYMBOL(xdr_encode_opaque); |
88 | 88 | ||
89 | u32 * | 89 | __be32 * |
90 | xdr_encode_string(u32 *p, const char *string) | 90 | xdr_encode_string(__be32 *p, const char *string) |
91 | { | 91 | { |
92 | return xdr_encode_array(p, string, strlen(string)); | 92 | return xdr_encode_array(p, string, strlen(string)); |
93 | } | 93 | } |
94 | 94 | ||
95 | u32 * | 95 | __be32 * |
96 | xdr_decode_string_inplace(u32 *p, char **sp, int *lenp, int maxlen) | 96 | xdr_decode_string_inplace(__be32 *p, char **sp, int *lenp, int maxlen) |
97 | { | 97 | { |
98 | unsigned int len; | 98 | unsigned int len; |
99 | 99 | ||
@@ -432,7 +432,7 @@ xdr_shift_buf(struct xdr_buf *buf, size_t len) | |||
432 | * of the buffer length, and takes care of adjusting the kvec | 432 | * of the buffer length, and takes care of adjusting the kvec |
433 | * length for us. | 433 | * length for us. |
434 | */ | 434 | */ |
435 | void xdr_init_encode(struct xdr_stream *xdr, struct xdr_buf *buf, uint32_t *p) | 435 | void xdr_init_encode(struct xdr_stream *xdr, struct xdr_buf *buf, __be32 *p) |
436 | { | 436 | { |
437 | struct kvec *iov = buf->head; | 437 | struct kvec *iov = buf->head; |
438 | int scratch_len = buf->buflen - buf->page_len - buf->tail[0].iov_len; | 438 | int scratch_len = buf->buflen - buf->page_len - buf->tail[0].iov_len; |
@@ -440,8 +440,8 @@ void xdr_init_encode(struct xdr_stream *xdr, struct xdr_buf *buf, uint32_t *p) | |||
440 | BUG_ON(scratch_len < 0); | 440 | BUG_ON(scratch_len < 0); |
441 | xdr->buf = buf; | 441 | xdr->buf = buf; |
442 | xdr->iov = iov; | 442 | xdr->iov = iov; |
443 | xdr->p = (uint32_t *)((char *)iov->iov_base + iov->iov_len); | 443 | xdr->p = (__be32 *)((char *)iov->iov_base + iov->iov_len); |
444 | xdr->end = (uint32_t *)((char *)iov->iov_base + scratch_len); | 444 | xdr->end = (__be32 *)((char *)iov->iov_base + scratch_len); |
445 | BUG_ON(iov->iov_len > scratch_len); | 445 | BUG_ON(iov->iov_len > scratch_len); |
446 | 446 | ||
447 | if (p != xdr->p && p != NULL) { | 447 | if (p != xdr->p && p != NULL) { |
@@ -465,10 +465,10 @@ EXPORT_SYMBOL(xdr_init_encode); | |||
465 | * bytes of data. If so, update the total xdr_buf length, and | 465 | * bytes of data. If so, update the total xdr_buf length, and |
466 | * adjust the length of the current kvec. | 466 | * adjust the length of the current kvec. |
467 | */ | 467 | */ |
468 | uint32_t * xdr_reserve_space(struct xdr_stream *xdr, size_t nbytes) | 468 | __be32 * xdr_reserve_space(struct xdr_stream *xdr, size_t nbytes) |
469 | { | 469 | { |
470 | uint32_t *p = xdr->p; | 470 | __be32 *p = xdr->p; |
471 | uint32_t *q; | 471 | __be32 *q; |
472 | 472 | ||
473 | /* align nbytes on the next 32-bit boundary */ | 473 | /* align nbytes on the next 32-bit boundary */ |
474 | nbytes += 3; | 474 | nbytes += 3; |
@@ -524,7 +524,7 @@ EXPORT_SYMBOL(xdr_write_pages); | |||
524 | * @buf: pointer to XDR buffer from which to decode data | 524 | * @buf: pointer to XDR buffer from which to decode data |
525 | * @p: current pointer inside XDR buffer | 525 | * @p: current pointer inside XDR buffer |
526 | */ | 526 | */ |
527 | void xdr_init_decode(struct xdr_stream *xdr, struct xdr_buf *buf, uint32_t *p) | 527 | void xdr_init_decode(struct xdr_stream *xdr, struct xdr_buf *buf, __be32 *p) |
528 | { | 528 | { |
529 | struct kvec *iov = buf->head; | 529 | struct kvec *iov = buf->head; |
530 | unsigned int len = iov->iov_len; | 530 | unsigned int len = iov->iov_len; |
@@ -534,7 +534,7 @@ void xdr_init_decode(struct xdr_stream *xdr, struct xdr_buf *buf, uint32_t *p) | |||
534 | xdr->buf = buf; | 534 | xdr->buf = buf; |
535 | xdr->iov = iov; | 535 | xdr->iov = iov; |
536 | xdr->p = p; | 536 | xdr->p = p; |
537 | xdr->end = (uint32_t *)((char *)iov->iov_base + len); | 537 | xdr->end = (__be32 *)((char *)iov->iov_base + len); |
538 | } | 538 | } |
539 | EXPORT_SYMBOL(xdr_init_decode); | 539 | EXPORT_SYMBOL(xdr_init_decode); |
540 | 540 | ||
@@ -548,10 +548,10 @@ EXPORT_SYMBOL(xdr_init_decode); | |||
548 | * If so return the current pointer, then update the current | 548 | * If so return the current pointer, then update the current |
549 | * pointer position. | 549 | * pointer position. |
550 | */ | 550 | */ |
551 | uint32_t * xdr_inline_decode(struct xdr_stream *xdr, size_t nbytes) | 551 | __be32 * xdr_inline_decode(struct xdr_stream *xdr, size_t nbytes) |
552 | { | 552 | { |
553 | uint32_t *p = xdr->p; | 553 | __be32 *p = xdr->p; |
554 | uint32_t *q = p + XDR_QUADLEN(nbytes); | 554 | __be32 *q = p + XDR_QUADLEN(nbytes); |
555 | 555 | ||
556 | if (unlikely(q > xdr->end || q < p)) | 556 | if (unlikely(q > xdr->end || q < p)) |
557 | return NULL; | 557 | return NULL; |
@@ -599,8 +599,8 @@ void xdr_read_pages(struct xdr_stream *xdr, unsigned int len) | |||
599 | * Position current pointer at beginning of tail, and | 599 | * Position current pointer at beginning of tail, and |
600 | * set remaining message length. | 600 | * set remaining message length. |
601 | */ | 601 | */ |
602 | xdr->p = (uint32_t *)((char *)iov->iov_base + padding); | 602 | xdr->p = (__be32 *)((char *)iov->iov_base + padding); |
603 | xdr->end = (uint32_t *)((char *)iov->iov_base + end); | 603 | xdr->end = (__be32 *)((char *)iov->iov_base + end); |
604 | } | 604 | } |
605 | EXPORT_SYMBOL(xdr_read_pages); | 605 | EXPORT_SYMBOL(xdr_read_pages); |
606 | 606 | ||
@@ -624,8 +624,8 @@ void xdr_enter_page(struct xdr_stream *xdr, unsigned int len) | |||
624 | */ | 624 | */ |
625 | if (len > PAGE_CACHE_SIZE - xdr->buf->page_base) | 625 | if (len > PAGE_CACHE_SIZE - xdr->buf->page_base) |
626 | len = PAGE_CACHE_SIZE - xdr->buf->page_base; | 626 | len = PAGE_CACHE_SIZE - xdr->buf->page_base; |
627 | xdr->p = (uint32_t *)(kaddr + xdr->buf->page_base); | 627 | xdr->p = (__be32 *)(kaddr + xdr->buf->page_base); |
628 | xdr->end = (uint32_t *)((char *)xdr->p + len); | 628 | xdr->end = (__be32 *)((char *)xdr->p + len); |
629 | } | 629 | } |
630 | EXPORT_SYMBOL(xdr_enter_page); | 630 | EXPORT_SYMBOL(xdr_enter_page); |
631 | 631 | ||
@@ -743,7 +743,7 @@ out: | |||
743 | int | 743 | int |
744 | xdr_decode_word(struct xdr_buf *buf, int base, u32 *obj) | 744 | xdr_decode_word(struct xdr_buf *buf, int base, u32 *obj) |
745 | { | 745 | { |
746 | u32 raw; | 746 | __be32 raw; |
747 | int status; | 747 | int status; |
748 | 748 | ||
749 | status = read_bytes_from_xdr_buf(buf, base, &raw, sizeof(*obj)); | 749 | status = read_bytes_from_xdr_buf(buf, base, &raw, sizeof(*obj)); |
@@ -756,7 +756,7 @@ xdr_decode_word(struct xdr_buf *buf, int base, u32 *obj) | |||
756 | int | 756 | int |
757 | xdr_encode_word(struct xdr_buf *buf, int base, u32 obj) | 757 | xdr_encode_word(struct xdr_buf *buf, int base, u32 obj) |
758 | { | 758 | { |
759 | u32 raw = htonl(obj); | 759 | __be32 raw = htonl(obj); |
760 | 760 | ||
761 | return write_bytes_to_xdr_buf(buf, base, &raw, sizeof(obj)); | 761 | return write_bytes_to_xdr_buf(buf, base, &raw, sizeof(obj)); |
762 | } | 762 | } |
diff --git a/net/sunrpc/xprt.c b/net/sunrpc/xprt.c index 1f786f68729d..80857470dc11 100644 --- a/net/sunrpc/xprt.c +++ b/net/sunrpc/xprt.c | |||
@@ -594,7 +594,7 @@ static void xprt_connect_status(struct rpc_task *task) | |||
594 | * @xid: RPC XID of incoming reply | 594 | * @xid: RPC XID of incoming reply |
595 | * | 595 | * |
596 | */ | 596 | */ |
597 | struct rpc_rqst *xprt_lookup_rqst(struct rpc_xprt *xprt, u32 xid) | 597 | struct rpc_rqst *xprt_lookup_rqst(struct rpc_xprt *xprt, __be32 xid) |
598 | { | 598 | { |
599 | struct list_head *pos; | 599 | struct list_head *pos; |
600 | 600 | ||
@@ -801,7 +801,7 @@ void xprt_reserve(struct rpc_task *task) | |||
801 | spin_unlock(&xprt->reserve_lock); | 801 | spin_unlock(&xprt->reserve_lock); |
802 | } | 802 | } |
803 | 803 | ||
804 | static inline u32 xprt_alloc_xid(struct rpc_xprt *xprt) | 804 | static inline __be32 xprt_alloc_xid(struct rpc_xprt *xprt) |
805 | { | 805 | { |
806 | return xprt->xid++; | 806 | return xprt->xid++; |
807 | } | 807 | } |
diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c index 9b62923a9c06..28100e019225 100644 --- a/net/sunrpc/xprtsock.c +++ b/net/sunrpc/xprtsock.c | |||
@@ -548,7 +548,8 @@ static void xs_udp_data_ready(struct sock *sk, int len) | |||
548 | struct rpc_rqst *rovr; | 548 | struct rpc_rqst *rovr; |
549 | struct sk_buff *skb; | 549 | struct sk_buff *skb; |
550 | int err, repsize, copied; | 550 | int err, repsize, copied; |
551 | u32 _xid, *xp; | 551 | u32 _xid; |
552 | __be32 *xp; | ||
552 | 553 | ||
553 | read_lock(&sk->sk_callback_lock); | 554 | read_lock(&sk->sk_callback_lock); |
554 | dprintk("RPC: xs_udp_data_ready...\n"); | 555 | dprintk("RPC: xs_udp_data_ready...\n"); |