Skip to content

Commit e02436d

Browse files
tobluxmartinkpetersen
authored andcommitted
scsi: qla2xxx: Use secs_to_jiffies() instead of msecs_to_jiffies()
Use secs_to_jiffies() instead of msecs_to_jiffies() and avoid scaling 'ratov_j' to milliseconds. No functional changes intended. Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev> Link: https://lore.kernel.org/r/20250828161153.3676-2-thorsten.blum@linux.dev Reviewed-by: Himanshu Madhani <hmadhani2024@gmail.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
1 parent 80093af commit e02436d

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

drivers/scsi/qla2xxx/qla_bsg.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3106,8 +3106,8 @@ static bool qla_bsg_found(struct qla_qpair *qpair, struct bsg_job *bsg_job)
31063106
switch (rval) {
31073107
case QLA_SUCCESS:
31083108
/* Wait for the command completion. */
3109-
ratov_j = ha->r_a_tov / 10 * 4 * 1000;
3110-
ratov_j = msecs_to_jiffies(ratov_j);
3109+
ratov_j = ha->r_a_tov / 10 * 4;
3110+
ratov_j = secs_to_jiffies(ratov_j);
31113111

31123112
if (!wait_for_completion_timeout(&comp, ratov_j)) {
31133113
ql_log(ql_log_info, vha, 0x7089,

drivers/scsi/qla2xxx/qla_os.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1291,8 +1291,8 @@ qla2xxx_eh_abort(struct scsi_cmnd *cmd)
12911291
"Abort command mbx cmd=%p, rval=%x.\n", cmd, rval);
12921292

12931293
/* Wait for the command completion. */
1294-
ratov_j = ha->r_a_tov/10 * 4 * 1000;
1295-
ratov_j = msecs_to_jiffies(ratov_j);
1294+
ratov_j = ha->r_a_tov / 10 * 4;
1295+
ratov_j = secs_to_jiffies(ratov_j);
12961296
switch (rval) {
12971297
case QLA_SUCCESS:
12981298
if (!wait_for_completion_timeout(&comp, ratov_j)) {
@@ -1806,8 +1806,8 @@ static void qla2x00_abort_srb(struct qla_qpair *qp, srb_t *sp, const int res,
18061806
rval = ha->isp_ops->abort_command(sp);
18071807
/* Wait for command completion. */
18081808
ret_cmd = false;
1809-
ratov_j = ha->r_a_tov/10 * 4 * 1000;
1810-
ratov_j = msecs_to_jiffies(ratov_j);
1809+
ratov_j = ha->r_a_tov / 10 * 4;
1810+
ratov_j = secs_to_jiffies(ratov_j);
18111811
switch (rval) {
18121812
case QLA_SUCCESS:
18131813
if (wait_for_completion_timeout(&comp, ratov_j)) {

0 commit comments

Comments
 (0)