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

tcm_qla2xxx: pass timeout as HZ independent value

API compliance scanning with coccinelle flagged:
./drivers/scsi/qla2xxx/tcm_qla2xxx.c:407:2-29:
WARNING: timeout is HZ dependent

This was introduced in 'commit 75f8c1f693ee ("[SCSI] tcm_qla2xxx: Add >=
24xx series fabric module for target-core")'. wait_for_completion_timeout()
expects a timeout in jiffies so the numeric constant makes the effective
timeout HZ dependent. Resolved by converting it to CONST * HZ.

Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
Acked-by: Nilesh Javali <nilesh.javali@qlogic.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>

authored by

Nicholas Mc Guire and committed by
Nicholas Bellinger
fd4e1393 5dacbfc9

+1 -1
+1 -1
drivers/scsi/qla2xxx/tcm_qla2xxx.c
··· 405 405 se_cmd->t_state == TRANSPORT_COMPLETE_QF_WP) { 406 406 spin_unlock_irqrestore(&se_cmd->t_state_lock, flags); 407 407 wait_for_completion_timeout(&se_cmd->t_transport_stop_comp, 408 - 3000); 408 + 3 * HZ); 409 409 return 0; 410 410 } 411 411 spin_unlock_irqrestore(&se_cmd->t_state_lock, flags);