drivers/char/random.c: remove unused dont_count_entropy
Ever since "random: kill dead extract_state struct" [1], the dont_count_entropy member of struct timer_rand_state has been effectively unused. Since it hasn't found a new use in 12 years, it's probably safe to finally kill it. [1] Pre-git, https://git.kernel.org/pub/scm/linux/kernel/git/tglx/history.git/commit/?id=c1c48e61c251f57e7a3f1bf11b3c462b2de9dcb5 Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
This commit is contained in:
parent
e8e8a2e47d
commit
5e747dd9be
@ -964,7 +964,6 @@ static ssize_t extract_crng_user(void __user *buf, size_t nbytes)
|
||||
struct timer_rand_state {
|
||||
cycles_t last_time;
|
||||
long last_delta, last_delta2;
|
||||
unsigned dont_count_entropy:1;
|
||||
};
|
||||
|
||||
#define INIT_TIMER_RAND_STATE { INITIAL_JIFFIES, };
|
||||
@ -1030,8 +1029,6 @@ static void add_timer_randomness(struct timer_rand_state *state, unsigned num)
|
||||
* We take into account the first, second and third-order deltas
|
||||
* in order to make our estimate.
|
||||
*/
|
||||
|
||||
if (!state->dont_count_entropy) {
|
||||
delta = sample.jiffies - state->last_time;
|
||||
state->last_time = sample.jiffies;
|
||||
|
||||
@ -1058,7 +1055,7 @@ static void add_timer_randomness(struct timer_rand_state *state, unsigned num)
|
||||
* and limit entropy entimate to 12 bits.
|
||||
*/
|
||||
credit_entropy_bits(r, min_t(int, fls(delta>>1), 11));
|
||||
}
|
||||
|
||||
preempt_enable();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user