Skip to content

Commit

Permalink
random: move random_min_urandom_seed into CONFIG_SYSCTL ifdef block
Browse files Browse the repository at this point in the history
Building arm allnodefconfig causes the following build warning:

drivers/char/random.c:318:12: warning: 'random_min_urandom_seed' defined but not used [-Wunused-variable]

Fix the warning by moving 'random_min_urandom_seed' declaration inside
the CONFIG_SYSCTL ifdef block, where it is actually used.

While at it, remove the comment prior to the variable declaration.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
  • Loading branch information
Fabio Estevam authored and tytso committed Feb 7, 2017
1 parent c440408 commit db61ffe
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions drivers/char/random.c
Original file line number Diff line number Diff line change
Expand Up @@ -312,11 +312,6 @@ static int random_read_wakeup_bits = 64;
*/
static int random_write_wakeup_bits = 28 * OUTPUT_POOL_WORDS;

/*
* Variable is currently unused by left for user space compatibility.
*/
static int random_min_urandom_seed = 60;

/*
* Originally, we used a primitive polynomial of degree .poolwords
* over GF(2). The taps for various sizes are defined below. They
Expand Down Expand Up @@ -1886,6 +1881,7 @@ SYSCALL_DEFINE3(getrandom, char __user *, buf, size_t, count,
static int min_read_thresh = 8, min_write_thresh;
static int max_read_thresh = OUTPUT_POOL_WORDS * 32;
static int max_write_thresh = INPUT_POOL_WORDS * 32;
static int random_min_urandom_seed = 60;
static char sysctl_bootid[16];

/*
Expand Down

0 comments on commit db61ffe

Please sign in to comment.