Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Julian Vetter and committed by
Andrew Morton
50b4233a d7b8f8e2

+4 -4
+4 -4
include/linux/jhash.h
··· 24 24 * Jozsef 25 25 */ 26 26 #include <linux/bitops.h> 27 - #include <linux/unaligned/packed_struct.h> 27 + #include <linux/unaligned.h> 28 28 29 29 /* Best hash sizes are of power of two */ 30 30 #define jhash_size(n) ((u32)1<<(n)) ··· 77 77 78 78 /* All but the last block: affect some 32 bits of (a,b,c) */ 79 79 while (length > 12) { 80 - a += __get_unaligned_cpu32(k); 81 - b += __get_unaligned_cpu32(k + 4); 82 - c += __get_unaligned_cpu32(k + 8); 80 + a += get_unaligned((u32 *)k); 81 + b += get_unaligned((u32 *)(k + 4)); 82 + c += get_unaligned((u32 *)(k + 8)); 83 83 __jhash_mix(a, b, c); 84 84 length -= 12; 85 85 k += 12;