Hi Nicholas, On Mon, 2015-07-06 at 18:04 +0200, Nicholas Mc Guire wrote: > 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 <hof...@osadl.org> > --- > > As the intended timeout is not documented I'm guessing that it should be > 3000 milliseconds but someone that knows the driver needs to check if that > is a reasonable guess. > > Further its not clear why the timeout event if it were to occure does not > produce some debug message and/or pass it up through the return value. > > Patch was compile tested with x86_64_defconfig + CONFIG_SCSI_LOWLEVEL=y, > CONFIG_SCSI_FC_ATTRS=y, CONFIG_TARGET_CORE=m, CONFIG_LIBFC=m, > CONFIG_SCSI_QLA_FC=m, CONFIG_TCM_QLA2XXX=m > > Patch is against 4.2-rc1 (localversion-next is -next-20150706) > > drivers/scsi/qla2xxx/tcm_qla2xxx.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/scsi/qla2xxx/tcm_qla2xxx.c > b/drivers/scsi/qla2xxx/tcm_qla2xxx.c > index d9a8c60..33364b6 100644 > --- a/drivers/scsi/qla2xxx/tcm_qla2xxx.c > +++ b/drivers/scsi/qla2xxx/tcm_qla2xxx.c > @@ -405,7 +405,7 @@ static int tcm_qla2xxx_write_pending_status(struct se_cmd > *se_cmd) > se_cmd->t_state == TRANSPORT_COMPLETE_QF_WP) { > spin_unlock_irqrestore(&se_cmd->t_state_lock, flags); > wait_for_completion_timeout(&se_cmd->t_transport_stop_comp, > - 3000); > + 3 * HZ); > return 0; > } > spin_unlock_irqrestore(&se_cmd->t_state_lock, flags);
Applied to target-pending/master, and will include in the next v4.2-rc fixes PULL request. Thanks! --nab -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/