summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Vetter <julian@outer-limits.org>2025-06-03 15:21:21 +0200
committerAndrew Morton <akpm@linux-foundation.org>2025-07-09 22:57:49 -0700
commit50b4233a22b1ee9ccd0e847597de66ce21329ddb (patch)
treee1ed8c364bdcafe5746336ffb8f5d13cd2c2ccb6
parentd7b8f8e20813f0179d8ef519541a3527e7661d3a (diff)
include/linux/jhash.h: replace __get_unaligned_cpu32 in jhash function
__get_unaligned_cpu32() is deprecated. So, replace it with the more generic get_unaligned() and just cast the input parameter. Link: https://lkml.kernel.org/r/20250603132121.3674066-1-julian@outer-limits.org Signed-off-by: Julian Vetter <julian@outer-limits.org> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Wei-Hsin Yeh <weihsinyeh168@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-rw-r--r--include/linux/jhash.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/include/linux/jhash.h b/include/linux/jhash.h
index fa26a2dd3b52..7c1c1821c694 100644
--- a/include/linux/jhash.h
+++ b/include/linux/jhash.h
@@ -24,7 +24,7 @@
* Jozsef
*/
#include <linux/bitops.h>
-#include <linux/unaligned/packed_struct.h>
+#include <linux/unaligned.h>
/* Best hash sizes are of power of two */
#define jhash_size(n) ((u32)1<<(n))
@@ -77,9 +77,9 @@ static inline u32 jhash(const void *key, u32 length, u32 initval)
/* All but the last block: affect some 32 bits of (a,b,c) */
while (length > 12) {
- a += __get_unaligned_cpu32(k);
- b += __get_unaligned_cpu32(k + 4);
- c += __get_unaligned_cpu32(k + 8);
+ a += get_unaligned((u32 *)k);
+ b += get_unaligned((u32 *)(k + 4));
+ c += get_unaligned((u32 *)(k + 8));
__jhash_mix(a, b, c);
length -= 12;
k += 12;