aboutsummaryrefslogtreecommitdiffstats
path: root/net/sunrpc
diff options
context:
space:
mode:
authorAlexey Dobriyan <adobriyan@gmail.com>2006-09-27 01:29:38 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2006-09-28 21:01:21 -0400
commitd8ed029d6000ba2e2908d9286409e4833c091b4c (patch)
tree732feaa2e3751df5c81032a30ff4761427492ac4 /net/sunrpc
parent7699431301b189fca7ccbb64fe54e5a5170f8497 (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>
Diffstat (limited to 'net/sunrpc')
-rw-r--r--net/sunrpc/auth.c12
-rw-r--r--net/sunrpc/auth_gss/auth_gss.c33
-rw-r--r--net/sunrpc/auth_gss/gss_krb5_seal.c2
-rw-r--r--net/sunrpc/auth_gss/gss_krb5_wrap.c4
-rw-r--r--net/sunrpc/auth_gss/svcauth_gss.c24
-rw-r--r--net/sunrpc/auth_null.c8
-rw-r--r--net/sunrpc/auth_unix.c10
-rw-r--r--net/sunrpc/clnt.c23
-rw-r--r--net/sunrpc/pmap_clnt.c6
-rw-r--r--net/sunrpc/svc.c8
-rw-r--r--net/sunrpc/svcauth.c2
-rw-r--r--net/sunrpc/svcauth_unix.c8
-rw-r--r--net/sunrpc/svcsock.c2
-rw-r--r--net/sunrpc/xdr.c54
-rw-r--r--net/sunrpc/xprt.c4
-rw-r--r--net/sunrpc/xprtsock.c3
16 files changed, 103 insertions, 100 deletions
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
334u32 * 334__be32 *
335rpcauth_marshcred(struct rpc_task *task, u32 *p) 335rpcauth_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
345u32 * 345__be32 *
346rpcauth_checkverf(struct rpc_task *task, u32 *p) 346rpcauth_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
356int 356int
357rpcauth_wrap_req(struct rpc_task *task, kxdrproc_t encode, void *rqstp, 357rpcauth_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
370int 370int
371rpcauth_unwrap_resp(struct rpc_task *task, kxdrproc_t decode, void *rqstp, 371rpcauth_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*/
829static u32 * 829static __be32 *
830gss_marshal(struct rpc_task *task, u32 *p) 830gss_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
897static u32 * 897static __be32 *
898gss_validate(struct rpc_task *task, u32 *p) 898gss_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
941static inline int 941static inline int
942gss_wrap_req_integ(struct rpc_cred *cred, struct gss_cl_ctx *ctx, 942gss_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
1033static inline int 1034static inline int
1034gss_wrap_req_priv(struct rpc_cred *cred, struct gss_cl_ctx *ctx, 1035gss_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
1096static int 1097static int
1097gss_wrap_req(struct rpc_task *task, 1098gss_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
1133static inline int 1134static inline int
1134gss_unwrap_resp_integ(struct rpc_cred *cred, struct gss_cl_ctx *ctx, 1135gss_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
1170static inline int 1171static inline int
1171gss_unwrap_resp_priv(struct rpc_cred *cred, struct gss_cl_ctx *ctx, 1172gss_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
1199static int 1200static int
1200gss_unwrap_resp(struct rpc_task *task, 1201gss_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 */
641static int 641static int
642gss_verify_header(struct svc_rqst *rqstp, struct rsc *rsci, 642gss_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,
687static int 687static int
688gss_write_null_verf(struct svc_rqst *rqstp) 688gss_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)
701static int 701static int
702gss_write_verf(struct svc_rqst *rqstp, struct gss_ctx *ctx_id, u32 seq) 702gss_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);
782static inline int 782static inline int
783read_u32_from_xdr_buf(struct xdr_buf *buf, int base, u32 *obj) 783read_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 */
948static int 948static int
949svcauth_gss_accept(struct svc_rqst *rqstp, u32 *authp) 949svcauth_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 */
63static u32 * 63static __be32 *
64nul_marshal(struct rpc_task *task, u32 *p) 64nul_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
84static u32 * 84static __be32 *
85nul_validate(struct rpc_task *task, u32 *p) 85nul_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 */
140static u32 * 140static __be32 *
141unx_marshal(struct rpc_task *task, u32 *p) 141unx_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
181static u32 * 181static __be32 *
182unx_validate(struct rpc_task *task, u32 *p) 182unx_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);
60static void call_timeout(struct rpc_task *task); 60static void call_timeout(struct rpc_task *task);
61static void call_connect(struct rpc_task *task); 61static void call_connect(struct rpc_task *task);
62static void call_connect_status(struct rpc_task *task); 62static void call_connect_status(struct rpc_task *task);
63static u32 * call_header(struct rpc_task *task); 63static __be32 * call_header(struct rpc_task *task);
64static u32 * call_verify(struct rpc_task *task); 64static __be32 * call_verify(struct rpc_task *task);
65 65
66 66
67static int 67static 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 */
1200static u32 * 1200static __be32 *
1201call_header(struct rpc_task *task) 1201call_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 */
1224static u32 * 1224static __be32 *
1225call_verify(struct rpc_task *task) 1225call_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
1361static int rpcproc_encode_null(void *rqstp, u32 *data, void *obj) 1362static int rpcproc_encode_null(void *rqstp, __be32 *data, void *obj)
1362{ 1363{
1363 return 0; 1364 return 0;
1364} 1365}
1365 1366
1366static int rpcproc_decode_null(void *rqstp, u32 *data, void *obj) 1367static 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 */
303static int xdr_encode_mapping(struct rpc_rqst *req, u32 *p, struct portmap_args *map) 303static 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
316static int xdr_decode_port(struct rpc_rqst *req, u32 *p, unsigned short *portp) 316static 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
322static int xdr_decode_bool(struct rpc_rqst *req, u32 *p, unsigned int *boolp) 322static 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
37int 37int
38svc_authenticate(struct svc_rqst *rqstp, u32 *authp) 38svc_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
412static int 412static int
413svcauth_null_accept(struct svc_rqst *rqstp, u32 *authp) 413svcauth_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
474static int 474static int
475svcauth_unix_accept(struct svc_rqst *rqstp, u32 *authp) 475svcauth_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 */
21u32 * 21__be32 *
22xdr_encode_netobj(u32 *p, const struct xdr_netobj *obj) 22xdr_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
32u32 * 32__be32 *
33xdr_decode_netobj(u32 *p, struct xdr_netobj *obj) 33xdr_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 */
58u32 *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 */
82u32 *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}
87EXPORT_SYMBOL(xdr_encode_opaque); 87EXPORT_SYMBOL(xdr_encode_opaque);
88 88
89u32 * 89__be32 *
90xdr_encode_string(u32 *p, const char *string) 90xdr_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
95u32 * 95__be32 *
96xdr_decode_string_inplace(u32 *p, char **sp, int *lenp, int maxlen) 96xdr_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 */
435void xdr_init_encode(struct xdr_stream *xdr, struct xdr_buf *buf, uint32_t *p) 435void 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 */
468uint32_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 */
527void xdr_init_decode(struct xdr_stream *xdr, struct xdr_buf *buf, uint32_t *p) 527void 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}
539EXPORT_SYMBOL(xdr_init_decode); 539EXPORT_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 */
551uint32_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}
605EXPORT_SYMBOL(xdr_read_pages); 605EXPORT_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}
630EXPORT_SYMBOL(xdr_enter_page); 630EXPORT_SYMBOL(xdr_enter_page);
631 631
@@ -743,7 +743,7 @@ out:
743int 743int
744xdr_decode_word(struct xdr_buf *buf, int base, u32 *obj) 744xdr_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)
756int 756int
757xdr_encode_word(struct xdr_buf *buf, int base, u32 obj) 757xdr_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 */
597struct rpc_rqst *xprt_lookup_rqst(struct rpc_xprt *xprt, u32 xid) 597struct 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
804static inline u32 xprt_alloc_xid(struct rpc_xprt *xprt) 804static 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");