Skip to content

Commit 50b4233

Browse files
d3athjest3rakpm00
authored andcommitted
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/[email protected] Signed-off-by: Julian Vetter <[email protected]> Cc: Arnd Bergmann <[email protected]> Cc: Wei-Hsin Yeh <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent d7b8f8e commit 50b4233

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

include/linux/jhash.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
* Jozsef
2525
*/
2626
#include <linux/bitops.h>
27-
#include <linux/unaligned/packed_struct.h>
27+
#include <linux/unaligned.h>
2828

2929
/* Best hash sizes are of power of two */
3030
#define jhash_size(n) ((u32)1<<(n))
@@ -77,9 +77,9 @@ static inline u32 jhash(const void *key, u32 length, u32 initval)
7777

7878
/* All but the last block: affect some 32 bits of (a,b,c) */
7979
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));
8383
__jhash_mix(a, b, c);
8484
length -= 12;
8585
k += 12;

0 commit comments

Comments
 (0)