Skip to content

Commit

Permalink
uwb: rename random32() to prandom_u32()
Browse files Browse the repository at this point in the history
Use preferable function name which implies using a pseudo-random
number generator.

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Akinobu Mita authored and Linus Torvalds committed Apr 30, 2013
1 parent 314f847 commit 7878202
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/uwb/rsv.c
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ void uwb_rsv_backoff_win_increment(struct uwb_rc *rc)
return;

bow->window <<= 1;
bow->n = random32() & (bow->window - 1);
bow->n = prandom_u32() & (bow->window - 1);
dev_dbg(dev, "new_window=%d, n=%d\n: ", bow->window, bow->n);

/* reset the timer associated variables */
Expand Down Expand Up @@ -557,7 +557,7 @@ int uwb_rsv_establish(struct uwb_rsv *rsv)
if (ret)
goto out;

rsv->tiebreaker = random32() & 1;
rsv->tiebreaker = prandom_u32() & 1;
/* get available mas bitmap */
uwb_drp_available(rc, &available);

Expand Down

0 comments on commit 7878202

Please sign in to comment.