Minor cleanup as long as I'm messing about in the area. Signed-off-by: George Spelvin <linux@xxxxxxxxxxx> --- The str2hashbuf declaration generates a checkpatch warning. False positive? fs/ext4/hash.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/fs/ext4/hash.c b/fs/ext4/hash.c index 3d586f02..5186e09a 100644 --- a/fs/ext4/hash.c +++ b/fs/ext4/hash.c @@ -140,11 +140,10 @@ int ext4fs_dirhash(const char *name, int len, struct dx_hash_info *hinfo) { __u32 hash; __u32 minor_hash = 0; - const char *p; - int i; - __u32 in[8], buf[4]; - void (*str2hashbuf)(const char *, int, __u32 *, int) = - str2hashbuf_signed; + int i; + __u32 in[8], buf[4]; + void (*str2hashbuf)(const char *, int, __u32 *, int) = + str2hashbuf_signed; /* Initialize the default seed for the hash checksum functions */ buf[0] = 0x67452301; @@ -172,12 +171,11 @@ int ext4fs_dirhash(const char *name, int len, struct dx_hash_info *hinfo) case DX_HASH_HALF_MD4_UNSIGNED: str2hashbuf = str2hashbuf_unsigned; case DX_HASH_HALF_MD4: - p = name; while (len > 0) { - (*str2hashbuf)(p, len, in, 8); + (*str2hashbuf)(name, len, in, 8); half_md4_transform(buf, in); len -= 32; - p += 32; + name += 32; } minor_hash = buf[2]; hash = buf[1]; @@ -185,12 +183,11 @@ int ext4fs_dirhash(const char *name, int len, struct dx_hash_info *hinfo) case DX_HASH_TEA_UNSIGNED: str2hashbuf = str2hashbuf_unsigned; case DX_HASH_TEA: - p = name; while (len > 0) { - (*str2hashbuf)(p, len, in, 4); + (*str2hashbuf)(name, len, in, 4); TEA_transform(buf, in); len -= 16; - p += 16; + name += 16; } hash = buf[0]; minor_hash = buf[1]; -- 2.1.0 -- To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html