X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=fs%2Fadfs%2Fdir_f.c;h=b61648b2d1dda120c7f68a4076970dcf1ac2f07b;hb=c7b5ebbddf7bcd3651947760f423e3783bbe6573;hp=1c606266830fb157353b20682ea3dc6f5757ee63;hpb=a2c21200f1c81b08cb55e417b68150bba439b646;p=linux-2.6.git diff --git a/fs/adfs/dir_f.c b/fs/adfs/dir_f.c index 1c6062668..b61648b2d 100644 --- a/fs/adfs/dir_f.c +++ b/fs/adfs/dir_f.c @@ -93,7 +93,7 @@ static inline void adfs_writename(char *to, char *from, int maxlen) #define dir_u32(idx) \ ({ int _buf = idx >> blocksize_bits; \ int _off = idx - (_buf << blocksize_bits);\ - *(u32 *)(bh[_buf]->b_data + _off); \ + *(__le32 *)(bh[_buf]->b_data + _off); \ }) #define bufoff(_bh,_idx) \ @@ -112,7 +112,7 @@ adfs_dir_checkbyte(const struct adfs_dir *dir) { struct buffer_head * const *bh = dir->bh; const int blocksize_bits = dir->sb->s_blocksize_bits; - union { u32 *ptr32; u8 *ptr8; } ptr, end; + union { __le32 *ptr32; u8 *ptr8; } ptr, end; u32 dircheck = 0; int last = 5 - 26; int i = 0; @@ -125,7 +125,7 @@ adfs_dir_checkbyte(const struct adfs_dir *dir) do { last += 26; do { - dircheck = cpu_to_le32(dir_u32(i)) ^ ror13(dircheck); + dircheck = le32_to_cpu(dir_u32(i)) ^ ror13(dircheck); i += sizeof(u32); } while (i < (last & ~3)); @@ -155,8 +155,8 @@ adfs_dir_checkbyte(const struct adfs_dir *dir) end.ptr8 = ptr.ptr8 + 36; do { - unsigned int v = *ptr.ptr32++; - dircheck = cpu_to_le32(v) ^ ror13(dircheck); + __le32 v = *ptr.ptr32++; + dircheck = le32_to_cpu(v) ^ ror13(dircheck); } while (ptr.ptr32 < end.ptr32); return (dircheck ^ (dircheck >> 8) ^ (dircheck >> 16) ^ (dircheck >> 24)) & 0xff; @@ -165,7 +165,7 @@ adfs_dir_checkbyte(const struct adfs_dir *dir) /* * Read and check that a directory is valid */ -int +static int adfs_dir_read(struct super_block *sb, unsigned long object_id, unsigned int size, struct adfs_dir *dir) { @@ -260,7 +260,7 @@ adfs_obj2dir(struct adfs_direntry *de, struct object_info *obj) * get a directory entry. Note that the caller is responsible * for holding the relevant locks. */ -int +static int __adfs_dir_get(struct adfs_dir *dir, int pos, struct object_info *obj) { struct super_block *sb = dir->sb; @@ -290,7 +290,7 @@ __adfs_dir_get(struct adfs_dir *dir, int pos, struct object_info *obj) return 0; } -int +static int __adfs_dir_put(struct adfs_dir *dir, int pos, struct object_info *obj) { struct super_block *sb = dir->sb;