]> git.baikalelectronics.ru Git - kernel.git/commit
Change hash_64() return value to 32 bits
authorGeorge Spelvin <linux@sciencehorizons.net>
Fri, 27 May 2016 02:22:01 +0000 (22:22 -0400)
committerGeorge Spelvin <linux@sciencehorizons.net>
Sat, 28 May 2016 19:42:51 +0000 (15:42 -0400)
commitc18671389951da928f8014636b18d530d405bc13
treecac25a2b98245c5e95cc94f8e0671b400fd9a0da
parent2773a79328a233bb367d891d5d5a22d7c3ac8e5c
Change hash_64() return value to 32 bits

That's all that's ever asked for, and it makes the return
type of hash_long() consistent.

It also allows (upcoming patch) an optimized implementation
of hash_64 on 32-bit machines.

I tried adding a BUILD_BUG_ON to ensure the number of bits requested
was never more than 32 (most callers use a compile-time constant), but
adding <linux/bug.h> to <linux/hash.h> breaks the tools/perf compiler
unless tools/perf/MANIFEST is updated, and understanding that code base
well enough to update it is too much trouble.  I did the rest of an
allyesconfig build with such a check, and nothing tripped.

Signed-off-by: George Spelvin <linux@sciencehorizons.net>
include/linux/hash.h