summaryrefslogtreecommitdiffstats
path: root/drivers/char/random.c
diff options
context:
space:
mode:
authorGreg Price <price@MIT.EDU>2013-12-07 09:49:55 -0500
committerTheodore Ts'o <tytso@mit.edu>2014-03-19 22:18:51 -0400
commit7d1b08c40c4f02c119476b29eca9bbc8d98d2a83 (patch)
tree5cac56d71116f1ff903093345012c72640849385 /drivers/char/random.c
parent0fb7a01af5b0cbe5bf365891fc4d186f2caa23f7 (diff)
downloadblackbird-op-linux-7d1b08c40c4f02c119476b29eca9bbc8d98d2a83.tar.gz
blackbird-op-linux-7d1b08c40c4f02c119476b29eca9bbc8d98d2a83.zip
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/random.c')
-rw-r--r--drivers/char/random.c6
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:
r->entropy_total, _RET_IP_);
if (r == &input_pool) {
- int entropy_bytes = entropy_count >> ENTROPY_SHIFT;
+ int entropy_bits = entropy_count >> ENTROPY_SHIFT;
/* should we wake readers? */
- if (entropy_bytes >= random_read_wakeup_thresh) {
+ if (entropy_bits >= random_read_wakeup_thresh) {
wake_up_interruptible(&random_read_wait);
kill_fasync(&fasync, SIGIO, POLL_IN);
}
@@ -678,7 +678,7 @@ retry:
* forth between them, until the output pools are 75%
* full.
*/
- if (entropy_bytes > random_write_wakeup_thresh &&
+ if (entropy_bits > random_write_wakeup_thresh &&
r->initialized &&
r->entropy_total >= 2*random_read_wakeup_thresh) {
static struct entropy_store *last = &blocking_pool;
OpenPOWER on IntegriCloud