]> www.infradead.org Git - users/hch/misc.git/commitdiff
scsi: qla2xxx: Use secs_to_jiffies() instead of msecs_to_jiffies()
authorThorsten Blum <thorsten.blum@linux.dev>
Thu, 28 Aug 2025 16:11:53 +0000 (18:11 +0200)
committerMartin K. Petersen <martin.petersen@oracle.com>
Sun, 31 Aug 2025 01:48:29 +0000 (21:48 -0400)
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>
drivers/scsi/qla2xxx/qla_bsg.c
drivers/scsi/qla2xxx/qla_os.c

index 10431a67d202bb5a926e59214ce4bdaf402c63fb..ccfc2d26dd37255516df78c232fc618f2cc3b3fb 100644 (file)
@@ -3106,8 +3106,8 @@ static bool qla_bsg_found(struct qla_qpair *qpair, struct bsg_job *bsg_job)
        switch (rval) {
        case QLA_SUCCESS:
                /* Wait for the command completion. */
-               ratov_j = ha->r_a_tov / 10 * 4 * 1000;
-               ratov_j = msecs_to_jiffies(ratov_j);
+               ratov_j = ha->r_a_tov / 10 * 4;
+               ratov_j = secs_to_jiffies(ratov_j);
 
                if (!wait_for_completion_timeout(&comp, ratov_j)) {
                        ql_log(ql_log_info, vha, 0x7089,
index 253f802605d63d608ba6eddc4875817abd527fd5..98a5c105fdfd8249d021d0bb07cc98d241289376 100644 (file)
@@ -1291,8 +1291,8 @@ qla2xxx_eh_abort(struct scsi_cmnd *cmd)
               "Abort command mbx cmd=%p, rval=%x.\n", cmd, rval);
 
        /* Wait for the command completion. */
-       ratov_j = ha->r_a_tov/10 * 4 * 1000;
-       ratov_j = msecs_to_jiffies(ratov_j);
+       ratov_j = ha->r_a_tov / 10 * 4;
+       ratov_j = secs_to_jiffies(ratov_j);
        switch (rval) {
        case QLA_SUCCESS:
                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,
                rval = ha->isp_ops->abort_command(sp);
                /* Wait for command completion. */
                ret_cmd = false;
-               ratov_j = ha->r_a_tov/10 * 4 * 1000;
-               ratov_j = msecs_to_jiffies(ratov_j);
+               ratov_j = ha->r_a_tov / 10 * 4;
+               ratov_j = secs_to_jiffies(ratov_j);
                switch (rval) {
                case QLA_SUCCESS:
                        if (wait_for_completion_timeout(&comp, ratov_j)) {