]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
dm-vdo murmurhash: remove u64 alignment requirement
authorSusan LeGendre-McGhee <slegendr@redhat.com>
Tue, 24 Sep 2024 15:46:24 +0000 (11:46 -0400)
committerMikulas Patocka <mpatocka@redhat.com>
Wed, 20 Nov 2024 10:38:04 +0000 (11:38 +0100)
Signed-off-by: Susan LeGendre-McGhee <slegendr@redhat.com>
Signed-off-by: Matthew Sakai <msakai@redhat.com>
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
drivers/md/dm-vdo/murmurhash3.c

index 13008b0892062e3aa95473e473ba2216b18af51b..b0b0587d85f37deeefe13bfbf89f6331187213a3 100644 (file)
@@ -44,14 +44,11 @@ void murmurhash3_128(const void *key, const int len, const u32 seed, void *out)
        u64 *hash_out = out;
 
        /* body */
-
-       const u64 *blocks = (const u64 *)(data);
-
        int i;
 
        for (i = 0; i < nblocks; i++) {
-               u64 k1 = get_unaligned_le64(&blocks[i * 2]);
-               u64 k2 = get_unaligned_le64(&blocks[i * 2 + 1]);
+               u64 k1 = get_unaligned_le64(&data[i * 16]);
+               u64 k2 = get_unaligned_le64(&data[i * 16 + 8]);
 
                k1 *= c1;
                k1 = ROTL64(k1, 31);