diff options
author | Greg Price <price@MIT.EDU> | 2013-12-07 09:49:55 -0500 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2014-03-19 22:18:51 -0400 |
commit | 7d1b08c40c4f02c119476b29eca9bbc8d98d2a83 (patch) | |
tree | 5cac56d71116f1ff903093345012c72640849385 /drivers/char | |
parent | 0fb7a01af5b0cbe5bf365891fc4d186f2caa23f7 (diff) |
random: entropy_bytes is actually bits
The variable 'entropy_bytes' is set from an expression that actually
counts bits. Fortunately it's also only compared to values that also
count bits. Rename it accordingly.
Signed-off-by: Greg Price <price@mit.edu>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'drivers/char')
-rw-r--r-- | drivers/char/random.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/char/random.c b/drivers/char/random.c index ded4339be8f9..581d806823e9 100644 --- a/drivers/char/random.c +++ b/drivers/char/random.c | |||
@@ -666,10 +666,10 @@ retry: | |||
666 | r->entropy_total, _RET_IP_); | 666 | r->entropy_total, _RET_IP_); |
667 | 667 | ||
668 | if (r == &input_pool) { | 668 | if (r == &input_pool) { |
669 | int entropy_bytes = entropy_count >> ENTROPY_SHIFT; | 669 | int entropy_bits = entropy_count >> ENTROPY_SHIFT; |
670 | 670 | ||
671 | /* should we wake readers? */ | 671 | /* should we wake readers? */ |
672 | if (entropy_bytes >= random_read_wakeup_thresh) { | 672 | if (entropy_bits >= random_read_wakeup_thresh) { |
673 | wake_up_interruptible(&random_read_wait); | 673 | wake_up_interruptible(&random_read_wait); |
674 | kill_fasync(&fasync, SIGIO, POLL_IN); | 674 | kill_fasync(&fasync, SIGIO, POLL_IN); |
675 | } | 675 | } |
@@ -678,7 +678,7 @@ retry: | |||
678 | * forth between them, until the output pools are 75% | 678 | * forth between them, until the output pools are 75% |
679 | * full. | 679 | * full. |
680 | */ | 680 | */ |
681 | if (entropy_bytes > random_write_wakeup_thresh && | 681 | if (entropy_bits > random_write_wakeup_thresh && |
682 | r->initialized && | 682 | r->initialized && |
683 | r->entropy_total >= 2*random_read_wakeup_thresh) { | 683 | r->entropy_total >= 2*random_read_wakeup_thresh) { |
684 | static struct entropy_store *last = &blocking_pool; | 684 | static struct entropy_store *last = &blocking_pool; |