Files
i2som-imx-linux/include/linux
Alexander Duyck bf2011ac76 jhash: Update jhash_[321]words functions to use correct initval
commit 2e7056c433 upstream.

Looking over the implementation for jhash2 and comparing it to jhash_3words
I realized that the two hashes were in fact very different.  Doing a bit of
digging led me to "The new jhash implementation" in which lookup2 was
supposed to have been replaced with lookup3.

In reviewing the patch I noticed that jhash2 had originally initialized a
and b to JHASH_GOLDENRATIO and c to initval, but after the patch a, b, and
c were initialized to initval + (length << 2) + JHASH_INITVAL.  However the
changes in jhash_3words simply replaced the initialization of a and b with
JHASH_INITVAL.

This change corrects what I believe was an oversight so that a, b, and c in
jhash_3words all have the same value added consisting of initval + (length
<< 2) + JHASH_INITVAL so that jhash2 and jhash_3words will now produce the
same hash result given the same inputs.

Fixes: 60d509c823 ("The new jhash implementation")
Signed-off-by: Alexander Duyck <alexander.h.duyck@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
2015-08-07 00:32:02 +01:00
..
2014-01-03 04:33:18 +00:00
2012-11-16 16:46:48 +00:00
2013-09-10 01:57:27 +01:00
2014-12-14 16:23:48 +00:00
2015-05-09 23:16:12 +01:00
2013-01-03 03:32:57 +00:00
2013-03-06 03:23:57 +00:00
2013-08-02 22:14:47 +02:00
2015-05-09 23:16:12 +01:00
2013-03-06 03:24:27 +00:00
2013-04-25 20:25:38 +01:00
2015-02-20 00:49:40 +00:00
2013-07-27 05:34:29 +01:00
2013-04-25 20:25:40 +01:00
2014-02-15 19:20:16 +00:00
2014-04-02 00:58:44 +01:00
2014-07-11 13:33:35 +01:00
2014-08-06 18:07:42 +01:00
2013-01-16 01:13:25 +00:00
2015-02-20 00:49:37 +00:00