Commit 0d772aaa authored by Chris Wedgwood's avatar Chris Wedgwood Committed by Linus Torvalds

[PATCH] Remove build warning from drivers/char/random.c on 32-bit platforms

Remove build warning from drivers/char/random.c on 32-bit platforms.
Signed-off-by: default avatarChris Wedgwood <cw@f00f.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 9ff7049f
......@@ -818,12 +818,10 @@ static void add_timer_randomness(struct timer_rand_state *state, unsigned num)
* jiffies.
*/
time = get_cycles();
if (time != 0) {
if (sizeof(time) > 4)
num ^= (u32)(time >> 32);
} else {
if (time)
num ^= (u32)((time >> 31) >> 1);
else
time = jiffies;
}
/*
* Calculate number of bits of randomness we probably added.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment