scsi: rename random32() to prandom_u32()
Use preferable function name which implies using a pseudo-random number generator. Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Cc: "James E.J. Bottomley" <JBottomley@parallels.com> Cc: Robert Love <robert.w.love@intel.com> Cc: James Smart <james.smart@emulex.com> Cc: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
此提交包含在:
@@ -2161,7 +2161,7 @@ static void fcoe_ctlr_vn_restart(struct fcoe_ctlr *fip)
|
||||
|
||||
if (fip->probe_tries < FIP_VN_RLIM_COUNT) {
|
||||
fip->probe_tries++;
|
||||
wait = random32() % FIP_VN_PROBE_WAIT;
|
||||
wait = prandom_u32() % FIP_VN_PROBE_WAIT;
|
||||
} else
|
||||
wait = FIP_VN_RLIM_INT;
|
||||
mod_timer(&fip->timer, jiffies + msecs_to_jiffies(wait));
|
||||
@@ -2794,7 +2794,7 @@ static void fcoe_ctlr_vn_timeout(struct fcoe_ctlr *fip)
|
||||
fcoe_all_vn2vn, 0);
|
||||
fip->port_ka_time = jiffies +
|
||||
msecs_to_jiffies(FIP_VN_BEACON_INT +
|
||||
(random32() % FIP_VN_BEACON_FUZZ));
|
||||
(prandom_u32() % FIP_VN_BEACON_FUZZ));
|
||||
}
|
||||
if (time_before(fip->port_ka_time, next_time))
|
||||
next_time = fip->port_ka_time;
|
||||
|
新增問題並參考
封鎖使用者