Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp6358539pxb; Thu, 27 Jan 2022 12:03:24 -0800 (PST) X-Google-Smtp-Source: ABdhPJwUEFcX+46wUKSwy2R/vXS4GfRGPigK/HFMhgUmXDH9JtlVT4Mqq5ElRS3iuEzZlyic9Tgh X-Received: by 2002:a17:902:e5c2:: with SMTP id u2mr5130501plf.33.1643313804026; Thu, 27 Jan 2022 12:03:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643313804; cv=none; d=google.com; s=arc-20160816; b=GNUUoea9xDL6UqVL5+lEVIJ8Tt96ZVI6Q2Cb7gRPBJzNOObUF1mev/T6qEjNURkX2L GYK4J7YbHThBY3jSuQb9xrCHAWTtlDimPQXazk5a7aozvtqXoa5rOXbNNgU8Y/gbEZ/Q e4AJqsufPBG/xvkOab9KIxkBG3wjiwISjc6FI0zMFX86Lt5Uhn/s/HpvO/zWiHEKpz4l Tf+iItYvo9r5bJfmlWIMCHiz+Wyx70rgmjm+jl9OLFTQNZClcwsjxiMi2mOCA2hjqzsH wceR2ubU2KjALXoXb71eie2bLWKTtyeLdoclggM61r4pOrqTklWzlvrjZcqApHgf6deA Uw8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:dkim-signature :dkim-signature:from; bh=MR4X9UKHf1r8ieV+0lFTTx2PgZLCHrXa68VMogEztJs=; b=cTnpAtDqv9h4vSgvuIhOl/QKyEaghZGIbAivvlfr6IK6aFcd6CdRYvXTcqoTp9QSyC r76OaHowVIao4zjTQc1L4xl5QZg95E0lETGQm8ikZBa+W3UsB/tlbC1JjS4ZVzOfKMft tPzPxtaCIkYmhl5Y8vh4f8eYysBXDRiLhgZkETFWGj7QKBSAnAS7rnrTPD4P+smCC9Pu Uc+AWSyLXVBjVgVuT112xcnOjjXTzN5yKgndBla2NjCuN1VQh5Gw/jRr3fZmPAWRX1g6 8Fqji/qvk2XDvZ9YyF1n1R1G85G7+lw4N7zBPZM+LVG4F09P81OklcAfSelEgMGSY5N9 z4gg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=SZN2cn8p; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=YhfnlrwV; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 145si3070506pga.75.2022.01.27.12.03.08; Thu, 27 Jan 2022 12:03:24 -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; dkim=pass header.i=@linutronix.de header.s=2020 header.b=SZN2cn8p; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=YhfnlrwV; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240496AbiA0LdU (ORCPT + 99 others); Thu, 27 Jan 2022 06:33:20 -0500 Received: from Galois.linutronix.de ([193.142.43.55]:35704 "EHLO galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240451AbiA0LdR (ORCPT ); Thu, 27 Jan 2022 06:33:17 -0500 From: Sebastian Andrzej Siewior DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1643283196; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=MR4X9UKHf1r8ieV+0lFTTx2PgZLCHrXa68VMogEztJs=; b=SZN2cn8pYKspbLVLrE1AWhP0QZlFzMa1kSc2wRo5nufNpB7oLTIoWmyd7jC4YxCAncF0d7 L35AEyiY093moR/PaUexrYD5l/DpcAfXS0qG3THsCciiTd9Kbo07Av+aKstCIHk8a8hgCt 31ziLpMIrVzNNVUu8hXsKcGoCrY4yVAe4dR6sfFLbKVZyxc+NwdFdUlONQnCdFyLSEwLt3 lBCGEzj0OdoDKkDRkcw6GBqSIMPNhdaoHnv1fkfcdHVCeDg8JTbveS/hNMv9ZqCb4IO8Tt rKT7IpSLsgWalteG1Ps1NbZw80/PUizRPeS/UaU0cO0d5FfGuBsgrdnaCUM1Fw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1643283196; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=MR4X9UKHf1r8ieV+0lFTTx2PgZLCHrXa68VMogEztJs=; b=YhfnlrwVkGRk+5D+PDPwd73x0HRXprjUYnAYwqpeK00NGcoL8xakrV759EewxjNGr4gioo gbM+XI9TbsrBn1Aw== To: greybus-dev@lists.linaro.org, linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org, linux-staging@lists.linux.dev, linux-usb@vger.kernel.org, netdev@vger.kernel.org Cc: "David S. Miller" , Alex Elder , Arnd Bergmann , Greg Kroah-Hartman , Hans de Goede , Jakub Kicinski , Johan Hovold , Lee Jones , Rui Miguel Silva , Thomas Gleixner , UNGLinuxDriver@microchip.com, Wolfram Sang , Woojung Huh , Sebastian Andrzej Siewior Subject: [PATCH 3/7] i2c: cht-wc: Use generic_handle_irq_safe(). Date: Thu, 27 Jan 2022 12:32:59 +0100 Message-Id: <20220127113303.3012207-4-bigeasy@linutronix.de> In-Reply-To: <20220127113303.3012207-1-bigeasy@linutronix.de> References: <20220127113303.3012207-1-bigeasy@linutronix.de> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Instead of manually disabling interrupts before invoking use generic_handle_irq() which can be invoked with enabled and disabled interrupts. Signed-off-by: Sebastian Andrzej Siewior --- drivers/i2c/busses/i2c-cht-wc.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/drivers/i2c/busses/i2c-cht-wc.c b/drivers/i2c/busses/i2c-cht-w= c.c index 1cf68f85b2e11..8ccf0c928bb44 100644 --- a/drivers/i2c/busses/i2c-cht-wc.c +++ b/drivers/i2c/busses/i2c-cht-wc.c @@ -99,15 +99,8 @@ static irqreturn_t cht_wc_i2c_adap_thread_handler(int id= , void *data) * interrupt handler as well, so running the client irq handler from * this thread will cause things to lock up. */ - if (reg & CHT_WC_EXTCHGRIRQ_CLIENT_IRQ) { - /* - * generic_handle_irq expects local IRQs to be disabled - * as normally it is called from interrupt context. - */ - local_irq_disable(); - generic_handle_irq(adap->client_irq); - local_irq_enable(); - } + if (reg & CHT_WC_EXTCHGRIRQ_CLIENT_IRQ) + generic_handle_irq_safe(adap->client_irq); =20 return IRQ_HANDLED; } --=20 2.34.1