Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp250219pxb; Wed, 3 Feb 2021 04:49:02 -0800 (PST) X-Google-Smtp-Source: ABdhPJxWm4O6Uj8B1d+zBaYBVh+BAAw4wUlyXOcrOnbEWK8bhHeMinE1sWgIqbs0pBGa5DIPZNRz X-Received: by 2002:aa7:d696:: with SMTP id d22mr2682118edr.361.1612356542414; Wed, 03 Feb 2021 04:49:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612356542; cv=none; d=google.com; s=arc-20160816; b=hgjynXY6dw4FJ3K90HG5kEQcR0IE/Ia9sfGETKyQTllNksdE1XGhx6+0va/SOsEI+T IP8uta81HFcbt1JmFWNnuvuiMILdmJtAaHG1a+duxqEfWz+gn7XKqpRteGEU6Kvd66/R jCRqpJwnQV1edISgtF3HJN8/9y0pEDQIk73Y+jhbeBWzYXD3R5P3+JoTiSF+zoW7b2hN NqBnAtRdNC4U6XRrGAkEH1tvkGb1aNBaMbUZ6YD5/N2S2EsKnaXH3gQjI0yqAErGM7v0 vcfO+RVzx62jhritaPr6a9l6ZPHdmRsj1j99N/YPl4qyuPD92iXixWet9Vv22R3kFDW/ B9VA== 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=GoeSWr5Kyz7RzOkGiJ+fw64UeQNrqQwEatkRtw6nL3M=; b=vudarJvcXq3tZhe/THw1U5BC1E8eUb23XKPexEVlsNkOSzeWZQ30LdMqjcs0TbvWo7 nTASYN44x8erWVTofV+qATGPAtOJqReLw2jTT8ZE+cao/xtKICWmf06nhoGkmIkzgymS 4PqDUiebPrtNs8YG/UsNjXgT54dOzyfkB0fD/Qacx271fryTw5nzu3UX8GBqNfC5/zFi Q+5bId/gUmGKVR766Vl9r3G1HqGa9P9tfn2ZYJfTznD5iNRxXfXqcGyMEQgsTOPJqFUY UTek+ouI5pdabA/cPTwc7+4NcIfsP8480MNZ3LAGySo60Pfmge6ZVifVIV4ldZgg1cgO NIIQ== 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 f10si1090069edc.491.2021.02.03.04.48.38; Wed, 03 Feb 2021 04:49:02 -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 S229736AbhBCMrx (ORCPT + 99 others); Wed, 3 Feb 2021 07:47:53 -0500 Received: from szxga04-in.huawei.com ([45.249.212.190]:12115 "EHLO szxga04-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231287AbhBCMnX (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 4DW1Wh1Mp1z163WK; 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:31 +0800 From: Xiaofei Tan To: , CC: Xiaofei Tan , , , Subject: [PATCH 5/6] rtc: mxc: Replace spin_lock_irqsave with spin_lock in hard IRQ Date: Wed, 3 Feb 2021 20:39:40 +0800 Message-ID: <1612355981-6764-6-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.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/rtc/rtc-mxc.c b/drivers/rtc/rtc-mxc.c index 65b29b0..db57dda7 100644 --- a/drivers/rtc/rtc-mxc.c +++ b/drivers/rtc/rtc-mxc.c @@ -189,11 +189,10 @@ static irqreturn_t mxc_rtc_interrupt(int irq, void *dev_id) struct platform_device *pdev = dev_id; struct rtc_plat_data *pdata = platform_get_drvdata(pdev); void __iomem *ioaddr = pdata->ioaddr; - unsigned long flags; u32 status; u32 events = 0; - spin_lock_irqsave(&pdata->rtc->irq_lock, flags); + spin_lock(&pdata->rtc->irq_lock); status = readw(ioaddr + RTC_RTCISR) & readw(ioaddr + RTC_RTCIENR); /* clear interrupt sources */ writew(status, ioaddr + RTC_RTCISR); @@ -209,7 +208,7 @@ static irqreturn_t mxc_rtc_interrupt(int irq, void *dev_id) events |= (RTC_PF | RTC_IRQF); rtc_update_irq(pdata->rtc, 1, events); - spin_unlock_irqrestore(&pdata->rtc->irq_lock, flags); + spin_unlock(&pdata->rtc->irq_lock); return IRQ_HANDLED; } -- 2.8.1