Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp256181pxb; Wed, 3 Feb 2021 05:00:21 -0800 (PST) X-Google-Smtp-Source: ABdhPJxCJ4/jhET+FVnAVlGu0E1rqeeTUzOmDWjluHayriIEVLm3Wc0Ub4V64C93W03PajGdRl1P X-Received: by 2002:aa7:db4e:: with SMTP id n14mr2754549edt.101.1612357221025; Wed, 03 Feb 2021 05:00:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612357221; cv=none; d=google.com; s=arc-20160816; b=mib+oQyuPeB56YD+dlGiNSlNQnxZL2rFDO4VQ8qKfr9hnj9NCaJ9WHwlRFCCOVg0TE XLPw+hcJHQCT0cD9FufDGq05NIndrGRF1PLED7HRuLdD2ZIdppWdSsAJ76AyM9PYaGST s0kj5RJ6PwY5BwNCyAGYADp0v0wp+IxVqrx+n6t6nmvwQzY8bzS0CiwdP92a5DoiiPZ1 O2taWUnBU0hKzbd5vq2ljY5eZy4f8ge/Fdsh5f644MIEsC80xeaGiAGPm5ctQIw8kADh WfejoKM1EFz3+OEH561Nm7OvXiigj7GC1/rZbINR5Y8UlcqiyylRDSBuXl64nzqKjFlN hGPg== 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=xm6v0SNAWNJctEuf9qp3guvJFoMNdNs8eky588H2Dr4=; b=ORVajFKODc6mTcURI9k9kyKaxfdic/WyC686IhC+3iLyXyzD/K8kTOyoXX91SAvY+j JzgbKFllyQsNduj5QxSas7Uw3/6wQDdzn0UcdRbmgBzRBBlPBA6MVkA0011im6jwpWUt GRTDdOUCUW1A15dRwoA3hRZf4OtuYb0mtivWyf/U98DeUZ+1l1mQQEwTIo4dtSIbuDOh x+lMKlJS5p4HnOOjVJQ1HVU1R9sN21cWtCfN8TCuu31AI8cOXBs0ph/mU11Dn+D/DmgT AbJqKZDaQnBau7lzi3oSahXlwL8vbaWNeDqYpvH7pxMv6Ll/PPXGQYFcIC295LH9Fngz tm5Q== 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 m24si1163583ejg.728.2021.02.03.04.59.55; Wed, 03 Feb 2021 05:00:21 -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 S231296AbhBCM7P (ORCPT + 99 others); Wed, 3 Feb 2021 07:59:15 -0500 Received: from szxga07-in.huawei.com ([45.249.212.35]:12389 "EHLO szxga07-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230133AbhBCMnN (ORCPT ); Wed, 3 Feb 2021 07:43:13 -0500 Received: from DGGEMS408-HUB.china.huawei.com (unknown [172.30.72.59]) by szxga07-in.huawei.com (SkyGuard) with ESMTP id 4DW1WV2mYSz7fwK; Wed, 3 Feb 2021 20:41:10 +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:19 +0800 From: Xiaofei Tan To: , CC: Xiaofei Tan , , , Subject: [PATCH 1/6] rtc: cmos: Replace spin_lock_irqsave with spin_lock in hard IRQ Date: Wed, 3 Feb 2021 20:39:36 +0800 Message-ID: <1612355981-6764-2-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-cmos.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/rtc/rtc-cmos.c b/drivers/rtc/rtc-cmos.c index 68a9ac6..d46f59a 100644 --- a/drivers/rtc/rtc-cmos.c +++ b/drivers/rtc/rtc-cmos.c @@ -649,11 +649,10 @@ static struct cmos_rtc cmos_rtc; static irqreturn_t cmos_interrupt(int irq, void *p) { - unsigned long flags; u8 irqstat; u8 rtc_control; - spin_lock_irqsave(&rtc_lock, flags); + spin_lock(&rtc_lock); /* When the HPET interrupt handler calls us, the interrupt * status is passed as arg1 instead of the irq number. But @@ -687,7 +686,7 @@ static irqreturn_t cmos_interrupt(int irq, void *p) hpet_mask_rtc_irq_bit(RTC_AIE); CMOS_READ(RTC_INTR_FLAGS); } - spin_unlock_irqrestore(&rtc_lock, flags); + spin_unlock(&rtc_lock); if (is_intr(irqstat)) { rtc_update_irq(p, 1, irqstat); -- 2.8.1