From patchwork Sun Dec 24 10:32:24 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: 10131931 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 8F62D602DC for ; Sun, 24 Dec 2017 10:29:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9231A28DD7 for ; Sun, 24 Dec 2017 10:29:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8640F28E42; Sun, 24 Dec 2017 10:29:48 +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 C75C428E41 for ; Sun, 24 Dec 2017 10:29:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751757AbdLXK3b (ORCPT ); Sun, 24 Dec 2017 05:29:31 -0500 Received: from mail-pf0-f196.google.com ([209.85.192.196]:43871 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751323AbdLXK3a (ORCPT ); Sun, 24 Dec 2017 05:29:30 -0500 Received: by mail-pf0-f196.google.com with SMTP id e3so17004767pfi.10; Sun, 24 Dec 2017 02:29:30 -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=GSh1ub1EIojxW9dTMf9tqjk+0ybePfz+6rJGf1uB+cohtu00QpGcj7aYyDdqlSSQjR 2r+xC4MjTigeU8ErKkP6Ecm21dFE8Jb7Svf3eGK5ic7FjXwzQusuIo8FphcnF1kSR9Qf Eor0ff/g5ho3o08y1JAh6mYoKzNHYyuce7kIs0JDCihirMofS8s8OHvuIeP/DkS2GWSA tuNCh3jB10shB67qw7OZ/E2kmGLBK9DLd7PiiJAWAGXaOBOvA93IKoWPLuiDrzEhnIlg gR5oSlIHbicFaUt9lAtYQ514oxeg2nrAArJyJJPieBGyDR1W5i+ig8HLFsMDcgwePm0o 1c7A== 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=TiU+GfOSIuUBae2MyvoDx0j/pQW1Uz7gUX9ImC/3p5r2kdGpjCNik1gdNT75Diw83v 4oDsFPwGJvggVhUDa60O+zB29d6r+jlu5qOCqBLpxcMsmjarSdgXtuiLzDRDo6D19MoR istc8keFVUgpA+J36M2wz2QB7UIcm83LsM1+PbgaIdmAr+E5vsS7xR3caIQFkKc7DJdY xt7X6eOf9VU9ISA7XwrGw9LYSFYjafU4+zF21s7w6vu4ykUnjWQbzNUL2Yo53Qg2DZtg HY49hSbbpNz61/gnUf/HGAwGHkRPj6jPaPheNeQTOAx1lUbEY6wl/x+fOcU4eHiYYMnw aySA== X-Gm-Message-State: AKGB3mLbcStXrEvnoXYnx8chtPCOEZvxx+YPeXOC92zLr3hC+m23WTye 5og3OhVjphFwR8f7yMZ4f1Y8jQ== X-Google-Smtp-Source: ACJfBotDqbWFJJ+ajC5LqdKlN+FvvGc9bguIXmi/FU6PhvrtYLPG9XFFV2CAGNGh+aYk9ky2ZExQqA== X-Received: by 10.99.135.65 with SMTP id i62mr17518257pge.331.1514111369831; Sun, 24 Dec 2017 02:29:29 -0800 (PST) Received: from bai-oslab.tsinghua.edu.cn ([2402:f000:1:4413:459c:3cec:e067:3081]) by smtp.gmail.com with ESMTPSA id b25sm55090865pfd.182.2017.12.24.02.29.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 24 Dec 2017 02:29:29 -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: Sun, 24 Dec 2017 18:32:24 +0800 Message-Id: <1514111544-26598-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); }