]> git.hungrycats.org Git - linux/commitdiff
[PATCH] afs endianness annotations
authorAlexander Viro <viro@www.linux.org.uk>
Wed, 22 Sep 2004 01:33:10 +0000 (18:33 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Wed, 22 Sep 2004 01:33:10 +0000 (18:33 -0700)
Signed-off-by: Al Viro <viro@parcelfarce.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
fs/afs/cmservice.c
fs/afs/dir.c
fs/afs/fsclient.c
fs/afs/vlclient.c

index 1f968366e6517c90879b1c566bd7a942ab17a3b7..72443ef1756d771793769c6f6ca9d28f5065131e 100644 (file)
@@ -424,7 +424,7 @@ static void _SRXAFSCM_CallBack(struct rxrpc_call *call)
                {
                        struct afs_callback *cb, *pcb;
                        int loop;
-                       u32 *fp, *bp;
+                       __be32 *fp, *bp;
 
                        fp = rxrpc_call_alloc_scratch(call, qty);
 
index 7fcdd24dc8721baed0dbba0220f235f4fad1da66..6682d6d7f2940800bff6fe51e84bfe67cc5c3619 100644 (file)
@@ -65,9 +65,9 @@ union afs_dirent {
        struct {
                uint8_t         valid;
                uint8_t         unused[1];
-               uint16_t        hash_next;
-               uint32_t        vnode;
-               uint32_t        unique;
+               __be16          hash_next;
+               __be32          vnode;
+               __be32          unique;
                uint8_t         name[16];
                uint8_t         overflow[4];    /* if any char of the name (inc
                                                 * NUL) reaches here, consume
@@ -78,8 +78,8 @@ union afs_dirent {
 
 /* AFS directory page header (one at the beginning of every 2048-byte chunk) */
 struct afs_dir_pagehdr {
-       uint16_t        npages;
-       uint16_t        magic;
+       __be16          npages;
+       __be16          magic;
 #define AFS_DIR_MAGIC htons(1234)
        uint8_t         nentries;
        uint8_t         bitmap[8];
@@ -308,7 +308,7 @@ static int afs_dir_iterate_block(unsigned *fpos,
                              blkoff + offset * sizeof(union afs_dirent),
                              ntohl(dire->u.vnode),
                              filldir == afs_dir_lookup_filldir ?
-                             dire->u.unique : DT_UNKNOWN);
+                             ntohl(dire->u.unique) : DT_UNKNOWN);
                if (ret < 0) {
                        _leave(" = 0 [full]");
                        return 0;
@@ -416,7 +416,7 @@ static int afs_dir_lookup_filldir(void *_cookie, const char *name, int nlen,
        struct afs_dir_lookup_cookie *cookie = _cookie;
 
        _enter("{%s,%Zu},%s,%u,,%lu,%u",
-              cookie->name, cookie->nlen, name, nlen, ino, ntohl(dtype));
+              cookie->name, cookie->nlen, name, nlen, ino, dtype);
 
        if (cookie->nlen != nlen || memcmp(cookie->name, name, nlen) != 0) {
                _leave(" = 0 [no]");
@@ -424,7 +424,7 @@ static int afs_dir_lookup_filldir(void *_cookie, const char *name, int nlen,
        }
 
        cookie->fid.vnode = ino;
-       cookie->fid.unique = ntohl(dtype);
+       cookie->fid.unique = dtype;
        cookie->found = 1;
 
        _leave(" = -1 [found]");
index e6377cea6942f9e61047cde60d98c1cba222fe0c..61bc371532ab6d0f325d06d776fd7389047299e8 100644 (file)
@@ -307,7 +307,7 @@ int afs_rxfs_fetch_file_status(struct afs_server *server,
        struct kvec piov[1];
        size_t sent;
        int ret;
-       u32 *bp;
+       __be32 *bp;
 
        DECLARE_WAITQUEUE(myself, current);
 
@@ -432,7 +432,7 @@ int afs_rxfs_fetch_file_data(struct afs_server *server,
        struct kvec piov[1];
        size_t sent;
        int ret;
-       u32 *bp;
+       __be32 *bp;
 
        DECLARE_WAITQUEUE(myself, current);
 
@@ -583,7 +583,7 @@ int afs_rxfs_give_up_callback(struct afs_server *server,
        struct kvec piov[1];
        size_t sent;
        int ret;
-       u32 *bp;
+       __be32 *bp;
 
        DECLARE_WAITQUEUE(myself, current);
 
index 9e3631750e3ecedcc2240ffb52ef7b1ddcc1ac67..7b0e3192ee390a46a20e7e2639f4a3fa57cc06c3 100644 (file)
@@ -101,7 +101,7 @@ static int afs_rxvl_probe(struct afs_server *server, int alloc_flags)
        struct kvec piov[1];
        size_t sent;
        int ret;
-       u32 param[1];
+       __be32 param[1];
 
        DECLARE_WAITQUEUE(myself, current);
 
@@ -193,7 +193,7 @@ int afs_rxvl_get_entry_by_name(struct afs_server *server,
        unsigned tmp;
        size_t sent;
        int ret, loop;
-       u32 *bp, param[2], zero;
+       __be32 *bp, param[2], zero;
 
        _enter(",%*.*s,%u,", volnamesz, volnamesz, volname, volnamesz);
 
@@ -328,7 +328,7 @@ int afs_rxvl_get_entry_by_id(struct afs_server *server,
        unsigned tmp;
        size_t sent;
        int ret, loop;
-       u32 *bp, param[3];
+       __be32 *bp, param[3];
 
        _enter(",%x,%d,", volid, voltype);
 
@@ -464,7 +464,7 @@ int afs_rxvl_get_entry_by_id_async(struct afs_async_op *op,
        struct kvec piov[1];
        size_t sent;
        int ret;
-       u32 param[3];
+       __be32 param[3];
 
        _enter(",%x,%d,", volid, voltype);
 
@@ -547,7 +547,8 @@ int afs_rxvl_get_entry_by_id_async(struct afs_async_op *op,
 int afs_rxvl_get_entry_by_id_async2(struct afs_async_op *op,
                                    struct afs_cache_vlocation *entry)
 {
-       unsigned *bp, tmp;
+       __be32 *bp;
+       __u32 tmp;
        int loop, ret;
 
        _enter("{op=%p cst=%u}", op, op->call->app_call_state);