Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3270619pxb; Sun, 7 Feb 2021 03:50:12 -0800 (PST) X-Google-Smtp-Source: ABdhPJznbV5PHIa0FTxwgPlcmRzl1fJ7dJPuhkj13pSImGkpvpOvcJl31y/cHOHBnDzjvrI8CO1b X-Received: by 2002:a05:6402:541:: with SMTP id i1mr3720030edx.36.1612698612191; Sun, 07 Feb 2021 03:50:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612698612; cv=none; d=google.com; s=arc-20160816; b=bTIMF3tp1moSDpMfbtadByBHOrYfHeUSbckyhxHBgWMMnlZzYTmvhxbIu/OazKTTdJ RNHdXKGI9CTutRepbqG+sujMxJZKFiZ5vAAVTKjOhznZQ73Pbg8C2Jyly2IszhrX33Fv GHy+LRB4h4tmvL1CKQoRJuqlRrzUuynnWMIw1pl/LwJhFo9mTm0aEJtooeZzkrQlYuDX S9idAxKV9l/6412+0T5Wy4OJOEfzF0l25KziMWnE3eOlcYkAkvyUgXe+dGLi7LBIh9Ol I1h1tSIOPc4zszvS9aUwFMKYveF/RzbA8noQYU6V6K2BoEKmnK8j1CRFlE36iL5EkyFv cXMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from; bh=TWtlL6W61Fa+VnzTe3ebX9TM1l8kH6XNbHZPt/A2nWs=; b=nlNXTJ2jRbm55WkscTDSclI2/bVSGUfosAml+8Q3FXZ4isUzxR1o7UrwkflmHmQZJO Yd9oYVrXdyw53vjUmpnjS4/RtxWVG597oovStRNV3zvdtC+Ydn+V7Ywj+LWJjVTKywKQ OI19KZKunCUAE/qH5XdAQRzh9tAtjef+fKypiBzbynE3TmKiKJJwUR9+c+RK3L0U2CXo yX2Exo6Tgx3KnHHXD2HO3Kg9uw5NXq5TwKx7BKixQtoIBdYEzC1AAte/TRXj8h5tZufI mX6tyEhAozGdrkQiSRzvaRzojohek8HozDv1UBRz6iQA/3TAcUbZ8m0UXA26dBI9cJaW 6W/w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j26si6732561eds.297.2021.02.07.03.49.49; Sun, 07 Feb 2021 03:50:12 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230046AbhBGLtR (ORCPT + 99 others); Sun, 7 Feb 2021 06:49:17 -0500 Received: from szxga06-in.huawei.com ([45.249.212.32]:12459 "EHLO szxga06-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229872AbhBGLlh (ORCPT ); Sun, 7 Feb 2021 06:41:37 -0500 Received: from DGGEMS408-HUB.china.huawei.com (unknown [172.30.72.58]) by szxga06-in.huawei.com (SkyGuard) with ESMTP id 4DYRxV312czjJml; Sun, 7 Feb 2021 19:38:38 +0800 (CST) Received: from localhost.localdomain (10.67.165.24) by DGGEMS408-HUB.china.huawei.com (10.3.19.208) with Microsoft SMTP Server id 14.3.498.0; Sun, 7 Feb 2021 19:39:38 +0800 From: Xiaofei Tan To: , CC: , , , Xiaofei Tan Subject: [PATCH for-next 31/32] scsi: wd719x: Replace spin_lock_irqsave with spin_lock in hard IRQ Date: Sun, 7 Feb 2021 19:37:02 +0800 Message-ID: <1612697823-8073-32-git-send-email-tanxiaofei@huawei.com> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1612697823-8073-1-git-send-email-tanxiaofei@huawei.com> References: <1612697823-8073-1-git-send-email-tanxiaofei@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.67.165.24] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org It is redundant to do irqsave and irqrestore in hardIRQ context, where it has been in a irq-disabled context. Signed-off-by: Xiaofei Tan --- drivers/scsi/wd719x.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/scsi/wd719x.c b/drivers/scsi/wd719x.c index edc8a13..ef372f3 100644 --- a/drivers/scsi/wd719x.c +++ b/drivers/scsi/wd719x.c @@ -657,10 +657,9 @@ static irqreturn_t wd719x_interrupt(int irq, void *dev_id) { struct wd719x *wd = dev_id; union wd719x_regs regs; - unsigned long flags; u32 SCB_out; - spin_lock_irqsave(wd->sh->host_lock, flags); + spin_lock(wd->sh->host_lock); /* read SCB pointer back from card */ SCB_out = wd719x_readl(wd, WD719X_AMR_SCB_OUT); /* read all status info at once */ @@ -668,7 +667,7 @@ static irqreturn_t wd719x_interrupt(int irq, void *dev_id) switch (regs.bytes.INT) { case WD719X_INT_NONE: - spin_unlock_irqrestore(wd->sh->host_lock, flags); + spin_unlock(wd->sh->host_lock); return IRQ_NONE; case WD719X_INT_LINKNOSTATUS: dev_err(&wd->pdev->dev, "linked command completed with no status\n"); @@ -705,7 +704,7 @@ static irqreturn_t wd719x_interrupt(int irq, void *dev_id) } /* clear interrupt so another can happen */ wd719x_writeb(wd, WD719X_AMR_INT_STATUS, WD719X_INT_NONE); - spin_unlock_irqrestore(wd->sh->host_lock, flags); + spin_unlock(wd->sh->host_lock); return IRQ_HANDLED; } -- 2.8.1