Skip to content

Commit

Permalink
random32: add __init prefix to prandom_start_seed_timer
Browse files Browse the repository at this point in the history
We only call that in functions annotated with __init, so add __init
prefix in prandom_start_seed_timer() as well, so that the kernel can
make use of this hint and we can possibly free up resources after it's
usage. And since it's an internal function rename it to
__prandom_start_seed_timer().

Signed-off-by: Daniel Borkmann <[email protected]>
Signed-off-by: Hannes Frederic Sowa <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Daniel Borkmann authored and davem330 committed Nov 14, 2013
1 parent 16a3fa2 commit 66b2514
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/random32.c
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ static void __prandom_timer(unsigned long dontcare)
add_timer(&seed_timer);
}

static void prandom_start_seed_timer(void)
static void __init __prandom_start_seed_timer(void)
{
set_timer_slack(&seed_timer, HZ);
seed_timer.expires = jiffies + 40 * HZ;
Expand Down Expand Up @@ -270,7 +270,7 @@ void prandom_reseed_late(void)
static int __init prandom_reseed(void)
{
__prandom_reseed(false);
prandom_start_seed_timer();
__prandom_start_seed_timer();
return 0;
}
late_initcall(prandom_reseed);
Expand Down

0 comments on commit 66b2514

Please sign in to comment.