Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751174AbdL3LHb (ORCPT ); Sat, 30 Dec 2017 06:07:31 -0500 Received: from mail-pg0-f66.google.com ([74.125.83.66]:37193 "EHLO mail-pg0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750841AbdL3LH3 (ORCPT ); Sat, 30 Dec 2017 06:07:29 -0500 X-Google-Smtp-Source: ACJfBouOayRn9mfMHSCsgufXtKnYHXs4C2BQtQx0Yi3IKEzP+r6KKkFMT3NPKQ8YMBGRlufPgUVogA== From: Jia-Ju Bai To: jejb@linux.vnet.ibm.com, martin.petersen@oracle.com Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, Jia-Ju Bai Subject: [PATCH] scsi: imm: Replace mdelay with msleep in imm_init Date: Sat, 30 Dec 2017 19:10:39 +0800 Message-Id: <1514632239-14895-1-git-send-email-baijiaju1990@gmail.com> X-Mailer: git-send-email 1.7.9.5 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 847 Lines: 28 imm_init is not called in an interrupt handler nor holding a spinlock. The function mdelay in it can be replaced with msleep, to reduce busy wait. Signed-off-by: Jia-Ju Bai --- drivers/scsi/imm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/imm.c b/drivers/scsi/imm.c index 87c9419..4805c0e 100644 --- a/drivers/scsi/imm.c +++ b/drivers/scsi/imm.c @@ -591,9 +591,9 @@ static int imm_init(imm_struct *dev) if (imm_connect(dev, 0) != 1) return -EIO; imm_reset_pulse(dev->base); - mdelay(1); /* Delay to allow devices to settle */ + msleep(1); /* Delay to allow devices to settle */ imm_disconnect(dev); - mdelay(1); /* Another delay to allow devices to settle */ + msleep(1); /* Another delay to allow devices to settle */ return device_check(dev); } -- 1.7.9.5