summaryrefslogtreecommitdiff
path: root/drivers/md
diff options
context:
space:
mode:
authorSusan LeGendre-McGhee <slegendr@redhat.com>2024-09-24 11:46:24 -0400
committerMikulas Patocka <mpatocka@redhat.com>2024-11-20 11:38:04 +0100
commit87d76d286c00ae93282b6f1c8d6ed4d973c911f9 (patch)
treefea3eed74478164c5fdcde8873553305f59bd653 /drivers/md
parent2deb70d3e66d538404d9e71bff236e6d260da66e (diff)
dm-vdo murmurhash: remove u64 alignment requirement
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>
Diffstat (limited to 'drivers/md')
-rw-r--r--drivers/md/dm-vdo/murmurhash3.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/md/dm-vdo/murmurhash3.c b/drivers/md/dm-vdo/murmurhash3.c
index 13008b089206..b0b0587d85f3 100644
--- a/drivers/md/dm-vdo/murmurhash3.c
+++ b/drivers/md/dm-vdo/murmurhash3.c
@@ -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);