Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

scsi: lpfc: Use secs_to_jiffies() instead of msecs_to_jiffies()

Use secs_to_jiffies() instead of msecs_to_jiffies() and avoid scaling the
timeouts to milliseconds.

No functional changes intended.

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Link: https://lore.kernel.org/r/20250428171625.2499-2-thorsten.blum@linux.dev
Reviewed-by: Justin Tee <justin.tee@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

authored by

Thorsten Blum and committed by
Martin K. Petersen
edf147e2 62b434b0

+4 -6
+2 -4
drivers/scsi/lpfc/lpfc_bsg.c
··· 2687 2687 evt->wait_time_stamp = jiffies; 2688 2688 time_left = wait_event_interruptible_timeout( 2689 2689 evt->wq, !list_empty(&evt->events_to_see), 2690 - msecs_to_jiffies(1000 * 2691 - ((phba->fc_ratov * 2) + LPFC_DRVR_TIMEOUT))); 2690 + secs_to_jiffies(phba->fc_ratov * 2 + LPFC_DRVR_TIMEOUT)); 2692 2691 if (list_empty(&evt->events_to_see)) 2693 2692 ret_val = (time_left) ? -EINTR : -ETIMEDOUT; 2694 2693 else { ··· 3257 3258 evt->waiting = 1; 3258 3259 time_left = wait_event_interruptible_timeout( 3259 3260 evt->wq, !list_empty(&evt->events_to_see), 3260 - msecs_to_jiffies(1000 * 3261 - ((phba->fc_ratov * 2) + LPFC_DRVR_TIMEOUT))); 3261 + secs_to_jiffies(phba->fc_ratov * 2 + LPFC_DRVR_TIMEOUT)); 3262 3262 evt->waiting = 0; 3263 3263 if (list_empty(&evt->events_to_see)) { 3264 3264 rc = (time_left) ? -EINTR : -ETIMEDOUT;
+2 -2
drivers/scsi/lpfc/lpfc_vport.c
··· 505 505 wait_event_timeout(waitq, 506 506 !test_bit(NLP_WAIT_FOR_LOGO, 507 507 &ndlp->save_flags), 508 - msecs_to_jiffies(phba->fc_ratov * 2000)); 508 + secs_to_jiffies(phba->fc_ratov * 2)); 509 509 510 510 if (!test_bit(NLP_WAIT_FOR_LOGO, &ndlp->save_flags)) 511 511 goto logo_cmpl; ··· 703 703 wait_event_timeout(waitq, 704 704 !test_bit(NLP_WAIT_FOR_DA_ID, 705 705 &ndlp->save_flags), 706 - msecs_to_jiffies(phba->fc_ratov * 2000)); 706 + secs_to_jiffies(phba->fc_ratov * 2)); 707 707 } 708 708 709 709 lpfc_printf_vlog(vport, KERN_INFO, LOG_VPORT | LOG_ELS,