Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp250768pxb; Wed, 3 Feb 2021 04:50:00 -0800 (PST) X-Google-Smtp-Source: ABdhPJxkUYdjfy/2Yutvq+UMu4OpASMEqE3MBU+meL7NTfgwZyFUkO6SOzOyUugzRqpw762IYMqe X-Received: by 2002:a17:906:2353:: with SMTP id m19mr3091629eja.13.1612356600309; Wed, 03 Feb 2021 04:50:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612356600; cv=none; d=google.com; s=arc-20160816; b=FoOljjUKCQr2dRX5Y1o/0FjP85byjWqyQbi53r+82lRcJc/ZCo4QojAVp3BmgMCtbd z50KAyRTXW+Zsf05sP4IMXJ/w7qhN4ln9OkoEseNf6bnSBNyaxNdQ+eH64EPAyic9mYY IITlbzLjoCO4RSDDSp+zIEMOkZT8fUrrX59m+tUETk1OjI7ckv5uG3nCjkfiB0hjy38G n5kbrgE+QsSZ1HiwIIPK2eI2zYZVqT1UitakM8dDYlCEmYjEUJu3UuFI6+7kzgtBuYOi 0spAT+HSj61Ti7w1WgFEWqeLCsQRvBZfazyLG8M5WNzgehuGX/gAl+szb+KKBpIxc4An 0JVQ== 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=UXG0RLwXwMcGf+t0/EyF0APRo9dsQfXRXGrF7kEGiYs=; b=yYjOZXiDt1y8AVFu4k8cho/xWb9K15jaJ0LGMQkvwXnEF7Dp5qPiup1f5X/MDM71hT 3O9YyDA3XahDwgrkh1RTorFzObFSMTvnkswwROXOAuzoNE3+hZQ3zZYw0Micxe5UHvxz miwSK1kP+ZCCZoYslyxhJ1tOop8qv58a03CtOBeQuyrx2oj2blcYMo33LtBC8ujpZ3c/ N3jYuAxv9N4C8sz/yWy9MUPNxeX6uLDWxBm7Uk1Ioen4UIAqOhJ67vid4WkClCnGiuz2 xVciXCVlQio1nl/XgMr/J6GHgdBfum1f7U/WF3R5+wAB8z1F1udJ4bH2sp36AcegCSA5 ylWw== 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 n23si626583edw.585.2021.02.03.04.49.35; Wed, 03 Feb 2021 04:50:00 -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 S230138AbhBCMsm (ORCPT + 99 others); Wed, 3 Feb 2021 07:48:42 -0500 Received: from szxga04-in.huawei.com ([45.249.212.190]:12118 "EHLO szxga04-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231229AbhBCMnW (ORCPT ); Wed, 3 Feb 2021 07:43:22 -0500 Received: from DGGEMS408-HUB.china.huawei.com (unknown [172.30.72.59]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4DW1Wh2cBPz163WM; Wed, 3 Feb 2021 20:41:20 +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; Wed, 3 Feb 2021 20:42:32 +0800 From: Xiaofei Tan To: , CC: Xiaofei Tan , , , Subject: [PATCH 6/6] rtc: mxc_v2: Replace spin_lock_irqsave with spin_lock in hard IRQ Date: Wed, 3 Feb 2021 20:39:41 +0800 Message-ID: <1612355981-6764-7-git-send-email-tanxiaofei@huawei.com> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1612355981-6764-1-git-send-email-tanxiaofei@huawei.com> References: <1612355981-6764-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/rtc/rtc-mxc_v2.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/rtc/rtc-mxc_v2.c b/drivers/rtc/rtc-mxc_v2.c index 0d73f6f..a577a74 100644 --- a/drivers/rtc/rtc-mxc_v2.c +++ b/drivers/rtc/rtc-mxc_v2.c @@ -74,13 +74,12 @@ static irqreturn_t mxc_rtc_interrupt(int irq, void *dev_id) struct device *dev = dev_id; struct mxc_rtc_data *pdata = dev_get_drvdata(dev); void __iomem *ioaddr = pdata->ioaddr; - unsigned long flags; u32 lp_status; u32 lp_cr; - spin_lock_irqsave(&pdata->lock, flags); + spin_lock(&pdata->lock); if (clk_enable(pdata->clk)) { - spin_unlock_irqrestore(&pdata->lock, flags); + spin_unlock(&pdata->lock); return IRQ_NONE; } @@ -104,7 +103,7 @@ static irqreturn_t mxc_rtc_interrupt(int irq, void *dev_id) mxc_rtc_sync_lp_locked(dev, ioaddr); clk_disable(pdata->clk); - spin_unlock_irqrestore(&pdata->lock, flags); + spin_unlock(&pdata->lock); return IRQ_HANDLED; } -- 2.8.1