aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/dir.h
diff options
context:
space:
mode:
authorSteven Whitehouse <swhiteho@redhat.com>2006-09-05 09:34:20 -0400
committerSteven Whitehouse <swhiteho@redhat.com>2006-09-05 09:34:20 -0400
commit2bdbc5d73961c040fdc9b30d985fab3047d697a0 (patch)
tree6f14365f7643c9b8e408f0c60e36afb18972e59b /fs/gfs2/dir.h
parent5acd3967347dab361d296d39ba19f8241507ef65 (diff)
[GFS2] Directory code style changes
As per comments from Jan Engelhardt, remove redundant casts, redundant endian conversions, add a smattering of const and rewrite the dirent_next function in order to avoid as many casts as possible. Cc: Jan Engelhardt <jengelh@linux01.gwdg.de> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2/dir.h')
-rw-r--r--fs/gfs2/dir.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/gfs2/dir.h b/fs/gfs2/dir.h
index f1f83faa36ec..d32449f0839c 100644
--- a/fs/gfs2/dir.h
+++ b/fs/gfs2/dir.h
@@ -46,7 +46,7 @@ int gfs2_dir_get_new_buffer(struct gfs2_inode *ip, u64 block,
46 46
47static inline u32 gfs2_disk_hash(const char *data, int len) 47static inline u32 gfs2_disk_hash(const char *data, int len)
48{ 48{
49 return crc32_le(0xFFFFFFFF, data, len) ^ 0xFFFFFFFF; 49 return crc32_le((u32)~0, data, len) ^ (u32)~0;
50} 50}
51 51
52 52
@@ -67,7 +67,7 @@ static inline void gfs2_qstr2dirent(const struct qstr *name, u16 reclen, struct
67 dent->de_name_len = cpu_to_be16(name->len); 67 dent->de_name_len = cpu_to_be16(name->len);
68 dent->de_type = cpu_to_be16(0); 68 dent->de_type = cpu_to_be16(0);
69 memset(dent->__pad, 0, sizeof(dent->__pad)); 69 memset(dent->__pad, 0, sizeof(dent->__pad));
70 memcpy((char*)(dent+1), name->name, name->len); 70 memcpy(dent + 1, name->name, name->len);
71} 71}
72 72
73#endif /* __DIR_DOT_H__ */ 73#endif /* __DIR_DOT_H__ */