From patchwork Mon Feb 12 11:37:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Biju Das X-Patchwork-Id: 13552972 X-Patchwork-Delegate: geert@linux-m68k.org Received: from relmlie6.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5B49B39843 for ; Mon, 12 Feb 2024 11:37:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=210.160.252.172 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707737852; cv=none; b=LFV6LiPfiiLWgzaAKHRqdWbm0oh0MwWbQdTzyMfH2z8geUcPviEkCORvr30Hl8ApgkfJnTUnP8CmD1DeSxpzQssQqE0Q8+hvW8XhlRcjTBDOBjws+W0HDSmd+LVGyE/nuCa2gwQM3UZ1uCtEtaCHjatx287PqTL4QE0tnAAQkUg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707737852; c=relaxed/simple; bh=dHYkbNy0rqXKoKhOrkeAWaX2PGmX+UlSFCrXuGbrQ1E=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=swuQ5Udhvr4Yi9pRauQ+HFlMBaeYormvp7tonxM3PLeoPpqf66ZHkjNP45Z8tJ7GeVxeJdXRNPuD2CuMhxPR/eSpnvBgZ97Dy8hDE6IBcPK+wtq/7iOaNWJv9+5Bv2TYc3PvqUsSwtuPKwenT53XjujWHD9T+9uAeSJa1l4E660= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=bp.renesas.com; spf=pass smtp.mailfrom=bp.renesas.com; arc=none smtp.client-ip=210.160.252.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=bp.renesas.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bp.renesas.com X-IronPort-AV: E=Sophos;i="6.06,263,1705330800"; d="scan'208";a="197568523" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie6.idc.renesas.com with ESMTP; 12 Feb 2024 20:37:23 +0900 Received: from localhost.localdomain (unknown [10.226.92.40]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id 26DC841A9A88; Mon, 12 Feb 2024 20:37:20 +0900 (JST) From: Biju Das To: Thomas Gleixner Cc: Biju Das , Lad Prabhakar , Marc Zyngier , Geert Uytterhoeven , Biju Das , linux-renesas-soc@vger.kernel.org Subject: [PATCH 2/5] irqchip/renesas-rzg2l: Rename rzg2l_tint_eoi() Date: Mon, 12 Feb 2024 11:37:09 +0000 Message-Id: <20240212113712.71878-3-biju.das.jz@bp.renesas.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240212113712.71878-1-biju.das.jz@bp.renesas.com> References: <20240212113712.71878-1-biju.das.jz@bp.renesas.com> Precedence: bulk X-Mailing-List: linux-renesas-soc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Rename rzg2l_tint_eoi->rzg2l_clear_tint_int and simplify the code by removing redundant priv and hw_irq local variables. Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven --- drivers/irqchip/irq-renesas-rzg2l.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/irqchip/irq-renesas-rzg2l.c b/drivers/irqchip/irq-renesas-rzg2l.c index 46f9b07e0e8a..74c8cbb790e9 100644 --- a/drivers/irqchip/irq-renesas-rzg2l.c +++ b/drivers/irqchip/irq-renesas-rzg2l.c @@ -103,11 +103,10 @@ static void rzg2l_irq_eoi(struct irq_data *d) writel_relaxed(iscr & ~bit, priv->base + ISCR); } -static void rzg2l_tint_eoi(struct irq_data *d) +static void rzg2l_clear_tint_int(struct rzg2l_irqc_priv *priv, + unsigned int hwirq) { - unsigned int hw_irq = irqd_to_hwirq(d) - IRQC_TINT_START; - struct rzg2l_irqc_priv *priv = irq_data_to_priv(d); - u32 bit = BIT(hw_irq); + u32 bit = BIT(hwirq - IRQC_TINT_START); u32 reg; reg = readl_relaxed(priv->base + TSCR); @@ -127,7 +126,7 @@ static void rzg2l_irqc_eoi(struct irq_data *d) if (hw_irq >= IRQC_IRQ_START && hw_irq <= IRQC_IRQ_COUNT) rzg2l_irq_eoi(d); else if (hw_irq >= IRQC_TINT_START && hw_irq < IRQC_NUM_IRQ) - rzg2l_tint_eoi(d); + rzg2l_clear_tint_int(priv, hw_irq); raw_spin_unlock(&priv->lock); irq_chip_eoi_parent(d); }