Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp250063pxb; Wed, 3 Feb 2021 04:48:44 -0800 (PST) X-Google-Smtp-Source: ABdhPJwdgd1aKTxFcWpB6oaXxZeUG9nwKU+F3K7aB+3p+R0HHjFna1yGdQ0w2PZwlYDGyGOJKkau X-Received: by 2002:a50:d987:: with SMTP id w7mr2827787edj.356.1612356524031; Wed, 03 Feb 2021 04:48:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612356524; cv=none; d=google.com; s=arc-20160816; b=sowc2AjtRZDRrwtDsWNujamZqqMY/bq3PqbMzYCC5fTswWMGQisYxA74LtnL3VhuNs TGUfZzaIOjHavmWkBUFO2vgvmg1FN/WDntXEVOMTFK93OeFVTbeZ5S9GysOpcNe8xipO dfnYwVuaTqhxBCrkDu3aq/iZ6+wh4gnDH1EYKzx2dTf6u7jBXAIMqcoYRjL43eI1eLcp djHHA4Dcm0KeLlcd58ZwOEEN0fc54+K/yJfmxhM1p1AGCQB08cjyZneWVjE/NTNPq1he cq6V6vjbbWi6RcBwxnQ2ygWAk0m5F2ZHuFqnSGl3kp/lqTr6lxfCzIdketA4qovf/92S xemw== 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=KInsRkpqeMhiHp0fgBCs4D3yfYtXrS0nvaLHoIIWqwM=; b=ZkzQyqwI0uCqJYXnkyKqm7G9hAohV+42AJBnRA+CUiXTXAgY7WjIAdI65+ZJ1pkHwA qqQwGMrq1IZzN8E+IXPwpNQOE8qqVe3ZUmg0nn6zB/euEq1yVtb8P1/IIwcosUp8y1Ly W/FiZ2FfOZuHyHskGxENHuZOLBMUcql2UwvQ76/0Exe2uwyVq5XgVYEjdldUmXqZmCM6 L7x3FGlOlkfvuPT70aQgqMa6tbOjpT1ZF04RW6iq3TuIRtj64PwmC6+ZLqoR32g2AD3W KgVA+BsTNmLwSj+Rc0kHhluBmgU/PVmjv2VpGPdx2SAiROFOwQr62oPxvZEWqoih/gr4 N08Q== 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 w8si1253987ejv.203.2021.02.03.04.48.19; Wed, 03 Feb 2021 04:48:44 -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 S229774AbhBCMrg (ORCPT + 99 others); Wed, 3 Feb 2021 07:47:36 -0500 Received: from szxga04-in.huawei.com ([45.249.212.190]:12117 "EHLO szxga04-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231252AbhBCMnX (ORCPT ); Wed, 3 Feb 2021 07:43:23 -0500 Received: from DGGEMS408-HUB.china.huawei.com (unknown [172.30.72.60]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4DW1Wh25k2z163X0; 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:28 +0800 From: Xiaofei Tan To: , CC: Xiaofei Tan , , , Subject: [PATCH 3/6] rtc: r7301: Replace spin_lock_irqsave with spin_lock in hard IRQ Date: Wed, 3 Feb 2021 20:39:38 +0800 Message-ID: <1612355981-6764-4-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-r7301.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/rtc/rtc-r7301.c b/drivers/rtc/rtc-r7301.c index aaf1b95..5dbaeb7 100644 --- a/drivers/rtc/rtc-r7301.c +++ b/drivers/rtc/rtc-r7301.c @@ -320,11 +320,10 @@ static irqreturn_t rtc7301_irq_handler(int irq, void *dev_id) { struct rtc_device *rtc = dev_id; struct rtc7301_priv *priv = dev_get_drvdata(rtc->dev.parent); - unsigned long flags; irqreturn_t ret = IRQ_NONE; u8 alrm_ctrl; - spin_lock_irqsave(&priv->lock, flags); + spin_lock(&priv->lock); rtc7301_select_bank(priv, 1); @@ -335,7 +334,7 @@ static irqreturn_t rtc7301_irq_handler(int irq, void *dev_id) rtc_update_irq(rtc, 1, RTC_IRQF | RTC_AF); } - spin_unlock_irqrestore(&priv->lock, flags); + spin_unlock(&priv->lock); return ret; } -- 2.8.1