You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
[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>
This commit is contained in:
+2
-2
@@ -46,7 +46,7 @@ int gfs2_dir_get_new_buffer(struct gfs2_inode *ip, u64 block,
|
||||
|
||||
static inline u32 gfs2_disk_hash(const char *data, int len)
|
||||
{
|
||||
return crc32_le(0xFFFFFFFF, data, len) ^ 0xFFFFFFFF;
|
||||
return crc32_le((u32)~0, data, len) ^ (u32)~0;
|
||||
}
|
||||
|
||||
|
||||
@@ -67,7 +67,7 @@ static inline void gfs2_qstr2dirent(const struct qstr *name, u16 reclen, struct
|
||||
dent->de_name_len = cpu_to_be16(name->len);
|
||||
dent->de_type = cpu_to_be16(0);
|
||||
memset(dent->__pad, 0, sizeof(dent->__pad));
|
||||
memcpy((char*)(dent+1), name->name, name->len);
|
||||
memcpy(dent + 1, name->name, name->len);
|
||||
}
|
||||
|
||||
#endif /* __DIR_DOT_H__ */
|
||||
|
||||
Reference in New Issue
Block a user