Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3844407pxb; Mon, 8 Feb 2021 01:19:51 -0800 (PST) X-Google-Smtp-Source: ABdhPJzHD3aavCUSxQUzbJtx/GxWr6PytCllUIqBAkYfNP2+UDPKOn1EoGExsLSbQ7d8blo9/sLx X-Received: by 2002:a17:907:96aa:: with SMTP id hd42mr15167030ejc.526.1612775991385; Mon, 08 Feb 2021 01:19:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612775991; cv=none; d=google.com; s=arc-20160816; b=oZJYfLYPfdhJCY6FbtAkTzXBFnVRqKx6ut2of/19GRWmZmFlBL9m2z1Z1u6wAllNJi 5OHiMvU3hJE5qwMOT3OveB+/mfaB0Ftsbcy7Z7MlfH/3rHeEwKWPx5zpQ6SLuHMo7Gpt xJjoXaJqEMtldVFQDuirX10+juCTLY5Jf3KGbNt1ol6pZilhB8MxxoYBxb+EjIjnHZkl I15HCtKjM16h6ueE6a7QMPS1jkuEEAAz+DrTIedz0KTXMBhyI/v6ejxiCqqWozljkg/7 rl2Bl72ac0nrHpCrxIF4LkL+GKu9VJwtbZP2d0O18d416FGJoeJZjQXsoF2nvjJaP4T2 1bNg== 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=TEcEaPg57RTfHtNnhLnXyLXpG8ZVKj9ruBfJDx4DPvg=; b=h1KZ46J+ujCHLxgww2/kN0WZUFfXvCIwT0a9nFJMmX49+aVBzxK4zWHk5H6Vf+D7+F aftzgWVSl6AXkOZFaRYM5p7Wjji5wBryaCDN1E17+JGBr8QdQT/y23ATHc+1TQo5YVjF gB5+2fuy1f80P0IBlTQmK8R26gLsF5sE4RIfzuu6ZODTnGsWjUoACeu7mH5VYK/GsRDl bjtTu5dHDNHtbC5iKld+DXHpswQs4r2xIO1OFKUofEQp/FIrlmfhmclJ1C7BETR4fdwD 2/dA0qfsA/HTKjXEwUnckTT4WlCPMJx3eTVPTDlUPWFodDCngzX29h4q53/EQnVsFZZN jung== 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 t16si14527547edi.281.2021.02.08.01.19.27; Mon, 08 Feb 2021 01:19:51 -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 S231321AbhBHJRf (ORCPT + 99 others); Mon, 8 Feb 2021 04:17:35 -0500 Received: from szxga07-in.huawei.com ([45.249.212.35]:12866 "EHLO szxga07-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231253AbhBHI54 (ORCPT ); Mon, 8 Feb 2021 03:57:56 -0500 Received: from DGGEMS401-HUB.china.huawei.com (unknown [172.30.72.59]) by szxga07-in.huawei.com (SkyGuard) with ESMTP id 4DZ0Gl2z3Xz7hv4; Mon, 8 Feb 2021 16:55:27 +0800 (CST) Received: from huawei.com (10.69.192.56) by DGGEMS401-HUB.china.huawei.com (10.3.19.201) with Microsoft SMTP Server id 14.3.498.0; Mon, 8 Feb 2021 16:56:44 +0800 From: Luo Jiaxing To: , , , , , CC: , , Subject: [PATCH for next v1 1/2] gpio: omap: Replace raw_spin_lock_irqsave with raw_spin_lock in omap_gpio_irq_handler() Date: Mon, 8 Feb 2021 16:56:16 +0800 Message-ID: <1612774577-55943-2-git-send-email-luojiaxing@huawei.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1612774577-55943-1-git-send-email-luojiaxing@huawei.com> References: <1612774577-55943-1-git-send-email-luojiaxing@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.69.192.56] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org There is no need to use API with _irqsave in omap_gpio_irq_handler(), because it already be in a irq-disabled context. Signed-off-by: Luo Jiaxing --- drivers/gpio/gpio-omap.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c index 41952bb..dc8bbf4 100644 --- a/drivers/gpio/gpio-omap.c +++ b/drivers/gpio/gpio-omap.c @@ -560,8 +560,6 @@ static irqreturn_t omap_gpio_irq_handler(int irq, void *gpiobank) u32 enabled, isr, edge; unsigned int bit; struct gpio_bank *bank = gpiobank; - unsigned long wa_lock_flags; - unsigned long lock_flags; isr_reg = bank->base + bank->regs->irqstatus; if (WARN_ON(!isr_reg)) @@ -572,7 +570,7 @@ static irqreturn_t omap_gpio_irq_handler(int irq, void *gpiobank) return IRQ_NONE; while (1) { - raw_spin_lock_irqsave(&bank->lock, lock_flags); + raw_spin_lock(&bank->lock); enabled = omap_get_gpio_irqbank_mask(bank); isr = readl_relaxed(isr_reg) & enabled; @@ -586,7 +584,7 @@ static irqreturn_t omap_gpio_irq_handler(int irq, void *gpiobank) if (edge) omap_clear_gpio_irqbank(bank, edge); - raw_spin_unlock_irqrestore(&bank->lock, lock_flags); + raw_spin_unlock(&bank->lock); if (!isr) break; @@ -595,7 +593,7 @@ static irqreturn_t omap_gpio_irq_handler(int irq, void *gpiobank) bit = __ffs(isr); isr &= ~(BIT(bit)); - raw_spin_lock_irqsave(&bank->lock, lock_flags); + raw_spin_lock(&bank->lock); /* * Some chips can't respond to both rising and falling * at the same time. If this irq was requested with @@ -606,15 +604,14 @@ static irqreturn_t omap_gpio_irq_handler(int irq, void *gpiobank) if (bank->toggle_mask & (BIT(bit))) omap_toggle_gpio_edge_triggering(bank, bit); - raw_spin_unlock_irqrestore(&bank->lock, lock_flags); + raw_spin_unlock(&bank->lock); - raw_spin_lock_irqsave(&bank->wa_lock, wa_lock_flags); + raw_spin_lock(&bank->wa_lock); generic_handle_irq(irq_find_mapping(bank->chip.irq.domain, bit)); - raw_spin_unlock_irqrestore(&bank->wa_lock, - wa_lock_flags); + raw_spin_unlock(&bank->wa_lock); } } exit: -- 2.7.4