From nobody Thu Apr 2 01:49:54 2026 Received: from mail-wr1-f44.google.com (mail-wr1-f44.google.com [209.85.221.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5245C351C3A for ; Wed, 25 Mar 2026 19:24:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.44 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774466700; cv=none; b=gX9Puez6WtGqu/bJmg73OnIuX6M+SCeLAlOIBLC4hx0WJ9PiorXgluhgeMjsutruwRKNBc/vIVylVxBlqzq2eaAn0mWBtFz13D9c3U1pLy3ONfW6elzjV5krcxePLjSlLuCqee8Te4J+YofFSQztBGIDb0DHt1ctVrSYJGqu6fg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774466700; c=relaxed/simple; bh=9Z/FEUEI7IKD3/xYNJ+3r3mkZ4auHrIx0kRdou6eG4Y=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=OuufymNksgy6zXyMfEkwXK+zvMVHzs/WiWIjTaY0d4Ao9d+qaHNDNsBhjIi4D0hcu+jKanbXhpSQIHDFU21KAMTK1uUs0Vtnk2g0ZR8Nx2j7+onk98hD13ZrBo6FsVuEU2LmUzI8P6oWP2KYDFR8rJKiwCM2afAPHdP+INMMup4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=suf2NZff; arc=none smtp.client-ip=209.85.221.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="suf2NZff" Received: by mail-wr1-f44.google.com with SMTP id ffacd0b85a97d-43b40fb7f95so145378f8f.3 for ; Wed, 25 Mar 2026 12:24:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1774466698; x=1775071498; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=snoY62jIXeVqVt7nk7FlqUp1jDOYYTaVPX97GLGeLEo=; b=suf2NZffSaryaFoytZOhmCd3a+9K9t+ebRt4IAlEuCJAybkBj9KcOzLh9S8R/sK800 +8IBh2RlF0IIJnUIKF7rGpkCiy2JDzpUsVIpAy4dB/fvcDhgL/X0BjiWOVSHcKi+0sFH Q2i6RHLo0/PQnx+Bu/vnuan3gGcrSyLKPBntqsSfdnMZl7FcFJeZKcfyMY5rfZz0NLWs +hl+JePPGXq/PVET0F+ZOWMdsP1iX2ifVGO47AGFkQOR7aD0VOPzUFSEDhYUaGwPV+1m pBc1axctaqBQzfV88h7f852bUUC5h1oPcv5uUYeo5/0YUXzHhMo7irm3uyM10nO/NPVu fZsw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1774466698; x=1775071498; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=snoY62jIXeVqVt7nk7FlqUp1jDOYYTaVPX97GLGeLEo=; b=grQu9OK6h4xcbjDRAcM9ANNslD3/4a17OSgtsi34AU/cgVhhuAwL9uW9jwZcT+VMjG KzO9+MT/C8troiNFQNOA4kZsniDyqNeH4rJ9vgyEDyWXw0FrDNGI7FPzmITDrWyQcugS 0iJGQ1kYcTUcvbMpPB2f0XUDzM0G3e7bw1RiFB7YSG/aLJTHaqrCU2t4sPpG2CSuMS/f iUyZSgV841MSAQOz0Ce638hTbEOjic+w+Pte6FhsuMIEKnZmcXzRy1Slv26ZzEf9NHOZ bMSc2wG0/w9roKj9UTDqLgkhcaFqx/abD5HHDmMYtZT/NV0wK6PWulq9w91ZlD7/0O4I ZE5g== X-Forwarded-Encrypted: i=1; AJvYcCWz1Y+Edag1s8VMIN2Q8qKYB+uDXtZWqba1qizo77Rm8IJ7w+SorxkP2Nb79nTA3Co6ddzVHwapaiEmhKU=@vger.kernel.org X-Gm-Message-State: AOJu0Yz2n7XHnACZM2ekNVulUB4qCspl/QAURUxWd814pAqPEuIHv3SC dOqYXpdKHr8shb3FDmDV6YY4kwCxJV6O6eP+lNeE5b6z2YFw7w2zrCnL X-Gm-Gg: ATEYQzzUVaep98fljYyDH+ekDkN6mCEw+IBeViABk/I5ugG2msn4LomiGCIQhuUe+mD jr3fZWA95uylkEor1Pd6TRQNZfoICBUkYmVhiEdzk8oKBWmQ8k87S9iXZcw+LwtnajfEgPRcl4d sJOWAewBi2GqAU4Ti1BjU+kVAURYhBws9sBcPuMAb3xLL7UI34xrbF7Ie0b4Z5PZUxlbzJ0gErC XQx+7oi/2eQhXWz/s+1K2VoJzePnt2Q3CthjYLKXBybwHZXSq+vdnDiiQBEg+eK4SCPQKw7t7/0 YdBj0aoDbSe3xGz/Cjz0PviuhMZA2FtvOcTqpLR/s0T3YJ0R0ARmBjpfN43slBASpy5DTj69jMg 6tqdS94pB2m4mdotm8hBqUy/SH3GMsH17Mt7Z0Ia92i6dR87+RBVGe1DJpSGCSRxbAFWMgZtO9v pF/R8O1D5zVod9coskU/AQXVuO7bdWgsakOV2s5NtREVY2cwWu X-Received: by 2002:a5d:5f47:0:b0:43b:851c:4479 with SMTP id ffacd0b85a97d-43b88991cbbmr7251231f8f.2.1774466697550; Wed, 25 Mar 2026 12:24:57 -0700 (PDT) Received: from localhost.localdomain ([2a00:23c4:a758:8a01:8138:17e4:88b1:468c]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-43b9192e533sm2464485f8f.2.2026.03.25.12.24.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Mar 2026 12:24:57 -0700 (PDT) From: Biju X-Google-Original-From: Biju To: Thomas Gleixner Cc: Biju Das , linux-kernel@vger.kernel.org, Geert Uytterhoeven , Prabhakar Mahadev Lad , Biju Das , linux-renesas-soc@vger.kernel.org Subject: [PATCH v7 04/16] irqchip/renesas-rzg2l: Drop redundant IRQC_TINT_START check in rzg2l_irqc_alloc() Date: Wed, 25 Mar 2026 19:24:19 +0000 Message-ID: <20260325192451.172562-5-biju.das.jz@bp.renesas.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260325192451.172562-1-biju.das.jz@bp.renesas.com> References: <20260325192451.172562-1-biju.das.jz@bp.renesas.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Biju Das The check `hwirq < IRQC_TINT_START` in rzg2l_irqc_alloc() is unnecessary as the condition is already guaranteed to be false at that point in the code. The outer `if (hwirq > IRQC_IRQ_COUNT)` block ensures that hwirq is always above IRQC_IRQ_COUNT before reaching this check, and since IRQC_TINT_START <=3D IRQC_IRQ_COUNT, the guard can never trigger. Remove the dead code to simplify the allocation path. Signed-off-by: Biju Das --- v6->v7: * No change. v5->v6: * No change. v5: * New patch. --- drivers/irqchip/irq-renesas-rzg2l.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/irqchip/irq-renesas-rzg2l.c b/drivers/irqchip/irq-rene= sas-rzg2l.c index eb01d4c5aca7..8587d4c5f110 100644 --- a/drivers/irqchip/irq-renesas-rzg2l.c +++ b/drivers/irqchip/irq-renesas-rzg2l.c @@ -491,9 +491,6 @@ static int rzg2l_irqc_alloc(struct irq_domain *domain, = unsigned int virq, if (hwirq > IRQC_IRQ_COUNT) { tint =3D TINT_EXTRACT_GPIOINT(hwirq); hwirq =3D TINT_EXTRACT_HWIRQ(hwirq); - - if (hwirq < IRQC_TINT_START) - return -EINVAL; } =20 if (hwirq > (IRQC_NUM_IRQ - 1)) --=20 2.43.0