]> git.baikalelectronics.ru Git - kernel.git/commit
Eliminate bad hash multipliers from hash_32() and hash_64()
authorGeorge Spelvin <linux@sciencehorizons.net>
Fri, 27 May 2016 03:00:23 +0000 (23:00 -0400)
committerGeorge Spelvin <linux@sciencehorizons.net>
Sat, 28 May 2016 19:42:51 +0000 (15:42 -0400)
commitcc9a44d33c5ba04469f61f61ba516aff044901f4
tree4207abfae54812ba02e76ad6450ce4d0facd6b41
parent77c3dbf7a750ca28aed326a85f8685b63af8a356
Eliminate bad hash multipliers from hash_32() and  hash_64()

The "simplified" prime multipliers made very bad hash functions, so get rid
of them.  This completes the work of 1a18294e2f.

To avoid the inefficiency which was the motivation for the "simplified"
multipliers, hash_64() on 32-bit systems is changed to use a different
algorithm.  It makes two calls to hash_32() instead.

drivers/media/usb/dvb-usb-v2/af9015.c uses the old GOLDEN_RATIO_PRIME_32
for some horrible reason, so it inherits a copy of the old definition.

Signed-off-by: George Spelvin <linux@sciencehorizons.net>
Cc: Antti Palosaari <crope@iki.fi>
Cc: Mauro Carvalho Chehab <m.chehab@samsung.com>
drivers/media/usb/dvb-usb-v2/af9015.c
include/linux/hash.h