Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp251688pxb; Wed, 3 Feb 2021 04:51:46 -0800 (PST) X-Google-Smtp-Source: ABdhPJy1LT9+vL6otuoGmNcIBwXuQdHQWF2KqeQatj9D18ob/A3soII2qYc5qkIvclL5UKMnchou X-Received: by 2002:a17:906:154d:: with SMTP id c13mr3078352ejd.471.1612356705793; Wed, 03 Feb 2021 04:51:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612356705; cv=none; d=google.com; s=arc-20160816; b=YRf7j4fhJIAnQ9H5JEg2wXHNj6F8QqI01qj/uJpiYaSvLrHXnC7zpVEiBOSafJ1Pj2 q2A6lGlULBcUGEgJlDYVO7WdU4r8SxVGqW2M6qxyjMGpIFYTEPx5Yr/lMrMRxs5CLVpf L0MX9WeFYnaAFt94one82e0BTIkDgeQM+8kDMTU3qestp2kE7TO1t+xvvlnC3kPCtR4e DGFnkdCM0H6MrXiiXOFzEIDvNHEbisPP3dZELiGjMOndrbkb6cfKMU7vbSxYcXxnIjxq EUzDVYniRfv9nvWKKmP+m1Gqqhda1LqJ0bWKa9EERZ3uOgq9NZJ7G06+ivHh9oEXOvCo lyNQ== 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=G+4wRCcdJEMhxpoGDN57V4DoSFgZr/8nvlzCmYXKkDE=; b=W5mcEK2x9tT+eCmXTpyzwPjuYyR5AzdDNZJC5Z1JTSDu8NI8AJ1iz1S0nGzCTgKopY RdHr3swYc29o9YGXCQre4TTH9IDQIC07IJTMMBbtEgaPsM+lWIDdxrBKhHT1Vz4ZESsC qI/nTBMZGQKZSYQvuHU8287SvOtHC0d1/y4N8MRJKQkvMjoDvhxGB1MmfPxzAzWf9tOU HYpPW/hh5hSXmvN+lGRxVfKzZHCDOE3tdoWyFd2bkhBlsyBVuAs9pyxQncaaVQytX5Ic IO4Bb7fa5LVH0EPPiEZJaxEgTBIloc/RNu6XMDJudbKgCROYey+mTMHBU+5YJlpPar2d pbyg== 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 f23si1090401edw.418.2021.02.03.04.51.20; Wed, 03 Feb 2021 04:51:45 -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 S229852AbhBCMt2 (ORCPT + 99 others); Wed, 3 Feb 2021 07:49:28 -0500 Received: from szxga04-in.huawei.com ([45.249.212.190]:12116 "EHLO szxga04-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231259AbhBCMnW (ORCPT ); Wed, 3 Feb 2021 07:43:22 -0500 Received: from DGGEMS408-HUB.china.huawei.com (unknown [172.30.72.60]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4DW1Wh1bYLz163Wm; 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:30 +0800 From: Xiaofei Tan To: , CC: Xiaofei Tan , , , Subject: [PATCH 4/6] rtc: tegra: Replace spin_lock_irqsave with spin_lock in hard IRQ Date: Wed, 3 Feb 2021 20:39:39 +0800 Message-ID: <1612355981-6764-5-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-tegra.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/rtc/rtc-tegra.c b/drivers/rtc/rtc-tegra.c index 8925015..85f7ad5 100644 --- a/drivers/rtc/rtc-tegra.c +++ b/drivers/rtc/rtc-tegra.c @@ -232,7 +232,7 @@ static irqreturn_t tegra_rtc_irq_handler(int irq, void *data) { struct device *dev = data; struct tegra_rtc_info *info = dev_get_drvdata(dev); - unsigned long events = 0, flags; + unsigned long events = 0; u32 status; status = readl(info->base + TEGRA_RTC_REG_INTR_STATUS); @@ -240,10 +240,10 @@ static irqreturn_t tegra_rtc_irq_handler(int irq, void *data) /* clear the interrupt masks and status on any IRQ */ tegra_rtc_wait_while_busy(dev); - spin_lock_irqsave(&info->lock, flags); + spin_lock(&info->lock); writel(0, info->base + TEGRA_RTC_REG_INTR_MASK); writel(status, info->base + TEGRA_RTC_REG_INTR_STATUS); - spin_unlock_irqrestore(&info->lock, flags); + spin_unlock(&info->lock); } /* check if alarm */ -- 2.8.1