Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754676AbbGFQNT (ORCPT ); Mon, 6 Jul 2015 12:13:19 -0400 Received: from www.osadl.org ([62.245.132.105]:36337 "EHLO www.osadl.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753959AbbGFQNR (ORCPT ); Mon, 6 Jul 2015 12:13:17 -0400 From: Nicholas Mc Guire To: Nicholas Bellinger Cc: Christoph Hellwig , Saurav Kashyap , Bart Van Assche , Himanshu Madhani , linux-kernel@vger.kernel.org, Nicholas Mc Guire Subject: [PATCH] tcm_qla2xxx: pass timeout as HZ independent value Date: Mon, 6 Jul 2015 18:04:40 +0200 Message-Id: <1436198680-8303-1-git-send-email-hofrat@osadl.org> X-Mailer: git-send-email 1.7.10.4 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1960 Lines: 49 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 --- 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); -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/