From patchwork Sat Dec 30 11:10:39 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jia-Ju Bai X-Patchwork-Id: 10137677 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C379D60375 for ; Sat, 30 Dec 2017 11:07:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B765B29491 for ; Sat, 30 Dec 2017 11:07:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AC2912949C; Sat, 30 Dec 2017 11:07:42 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 58A8229491 for ; Sat, 30 Dec 2017 11:07:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751013AbdL3LHa (ORCPT ); Sat, 30 Dec 2017 06:07:30 -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 Received: by mail-pg0-f66.google.com with SMTP id o13so11073625pgp.4; Sat, 30 Dec 2017 03:07:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=WQLgj+Pz9GBMiAvKitqRUS5/j5wBGm42i3zQHJiEGqc=; b=rm6pY5KjgnUxRU0s+n2v3oPk9VVrT3E47AV+RdaVWUPdwXDzoyVOh7fxyJEkgL0L5t 593JJZ2l21KfTcLO4+gtqYR1PWoSYg2+TtNI1zmNNhOBlaFbpmZYOYZz7gfrnVyrzyzl bf6ivN3xDbvXLTifCfq0LZ/qLrWSL33C1aFhmocYCeGQPeyoUfpKTRHhaZ08IdrQya3x jO5MWl6z0/e277+2zrUDMsmraOSoB/dEEv+1AXRXjzjpZCnHsVO0d8hjJNkxELM+FLcM /Dwf6Shys/gEP30rGYxmZCSiGQRVqBYTwsDSiN2asNfKx7JIKWvybb75IkprOmhYBiI6 kpDg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=WQLgj+Pz9GBMiAvKitqRUS5/j5wBGm42i3zQHJiEGqc=; b=ZxU9eKRhffr3UtE43cwhYhSmCmAslgYM4ukrPQgqSzTlcxr3ni1/YqD1pd4HQtIHc4 C7qljEtTehqcx1SDxxH43FVn8M9MmYunjedPkv+Qot128n8Uja8+g/+ERwZj04PfqSo0 CNwou4luRF3srMNhHNVRLlZvvbRuQ/U0PJQBQlLuEXAPljE+Hyizj+rlpVSiClmjhFfY uJTjRnGOPhtg1pq7uH8E5Vf2/FyPaRsFTmQAgYUHFpVfHdCJILoJs2pa6DXzo/3S5M5s ZXqbEdJuVPEn5m7uauLFDwBG8mQ9iBfKWSHlo31AvaxIudrNAPTY/jeLqHYg1fhVTLRz gk6g== X-Gm-Message-State: AKGB3mJjzkL3sH0FUs01GTG6p84mqh3TJ0w58OUGCRKwXvvj6mLB0kPa el29RAVLNxYiBIFVRCFI5/I= X-Google-Smtp-Source: ACJfBouOayRn9mfMHSCsgufXtKnYHXs4C2BQtQx0Yi3IKEzP+r6KKkFMT3NPKQ8YMBGRlufPgUVogA== X-Received: by 10.99.43.5 with SMTP id r5mr33358968pgr.348.1514632049094; Sat, 30 Dec 2017 03:07:29 -0800 (PST) Received: from bai-oslab.tsinghua.edu.cn ([2402:f000:1:4413:50fc:9040:8222:5e3]) by smtp.gmail.com with ESMTPSA id s14sm86244538pfe.36.2017.12.30.03.07.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 30 Dec 2017 03:07:28 -0800 (PST) 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-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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); }