Replace __get_unaligned_cpu32 in jhash function
PATCH 1/1 Replace __get_unaligned_cpu32 in jhash function
The __get_unaligned_cpu32 function is deprecated. So, replace it with the more generic get_unaligned and just cast the input parameter.
Signed-off-by Julian Vetter <[email protected]>
--- include/linux/jhash.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
include/linux/jhash.h +4 -4
@@ -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 ;
Signature · 1 line
2.34.1