diff options
author | Andrew Morton <akpm@linux-foundation.org> | 2013-05-07 19:18:16 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-05-07 21:38:27 -0400 |
commit | 50bea5c0d583e255e3d8a193f8b20e177bac8ec8 (patch) | |
tree | b2d71f94a5caf90c4f3d71bf9aac95d27f19e2d6 /drivers/infiniband/hw/cxgb4 | |
parent | e00adf39134028d65023c327b427074728c18f7e (diff) |
drivers/infiniband/hw: rename random32() to prandom_u32()
Use preferable function name which implies using a pseudo-random number
generator.
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/infiniband/hw/cxgb4')
-rw-r--r-- | drivers/infiniband/hw/cxgb4/id_table.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/infiniband/hw/cxgb4/id_table.c b/drivers/infiniband/hw/cxgb4/id_table.c index f95e5df30db2..0161ae6ad629 100644 --- a/drivers/infiniband/hw/cxgb4/id_table.c +++ b/drivers/infiniband/hw/cxgb4/id_table.c | |||
@@ -54,7 +54,7 @@ u32 c4iw_id_alloc(struct c4iw_id_table *alloc) | |||
54 | 54 | ||
55 | if (obj < alloc->max) { | 55 | if (obj < alloc->max) { |
56 | if (alloc->flags & C4IW_ID_TABLE_F_RANDOM) | 56 | if (alloc->flags & C4IW_ID_TABLE_F_RANDOM) |
57 | alloc->last += random32() % RANDOM_SKIP; | 57 | alloc->last += prandom_u32() % RANDOM_SKIP; |
58 | else | 58 | else |
59 | alloc->last = obj + 1; | 59 | alloc->last = obj + 1; |
60 | if (alloc->last >= alloc->max) | 60 | if (alloc->last >= alloc->max) |
@@ -88,7 +88,7 @@ int c4iw_id_table_alloc(struct c4iw_id_table *alloc, u32 start, u32 num, | |||
88 | alloc->start = start; | 88 | alloc->start = start; |
89 | alloc->flags = flags; | 89 | alloc->flags = flags; |
90 | if (flags & C4IW_ID_TABLE_F_RANDOM) | 90 | if (flags & C4IW_ID_TABLE_F_RANDOM) |
91 | alloc->last = random32() % RANDOM_SKIP; | 91 | alloc->last = prandom_u32() % RANDOM_SKIP; |
92 | else | 92 | else |
93 | alloc->last = 0; | 93 | alloc->last = 0; |
94 | alloc->max = num; | 94 | alloc->max = num; |