From nobody Wed Dec 17 18:01:31 2025 Received: from ci74p00im-qukt09082501.me.com (ci74p00im-qukt09082501.me.com [17.57.156.14]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 49DB11B040E for ; Mon, 9 Dec 2024 13:26:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=17.57.156.14 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733750765; cv=none; b=ZgjRW46Mhvhmqu8V9yRJhOugJD/awWn5rJ9jfm36H1iyUEMjNA+SpioAz0lw0OxNJw9gFtUPaPeQB9hqPCred0dDivxL4mIcmjGzKEHt3UwF/oxRZHpNygFpy1aeYswXKit08jsoe0qrB2qV6qoeUpFg1sLtQLJk7+PYxhzvAbY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733750765; c=relaxed/simple; bh=lunfMj+OkQF1YbU/Hvegdk+70uQ6ogQFARMPAWKoCRQ=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=NqwtrhQU1uBFY6mcFwJwtm7uTt3aHaFGFitB4YGM8V1yTqhaRJv4c2YOv3RpiqN+bXcgWYD8RgO4LVso7twN7lI59VRjv2H4T04ga1wMO8wi21+EhWLR7KU/vzBNQSmhFesEaqt7fl+cPVYPtfLIh6KaIH5TgoGl1T+6buPAo/E= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=icloud.com; spf=pass smtp.mailfrom=icloud.com; dkim=pass (2048-bit key) header.d=icloud.com header.i=@icloud.com header.b=rmtwx3AI; arc=none smtp.client-ip=17.57.156.14 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=icloud.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=icloud.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=icloud.com header.i=@icloud.com header.b="rmtwx3AI" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=icloud.com; s=1a1hai; t=1733750762; bh=4VVA4adu+gEU1vT76JzxHosCOPZrovp9nyCp9xo0Oyw=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:To: x-icloud-hme; b=rmtwx3AIgG9xuJV+aEqXgTvzQNj0F4zHLYHsyL/ZrxWSLOcWMC+EZvEV2bQQJOVac sP9m8ZzkI/Bk9LrpJ3yfx7Ck4uLzMr8kxHVHQhj2vQMNCxXV/EPeirGMS1laCirkN9 qYqcQqc/4d89E3RJ4K0/ausS1JHTA+hgy8LIpJRls29O66fgAdYQelvvWeBqspLAR3 qGD2LYNh+LLMdsWi+KuGWoPMv3o+iKcOdVD85+SumsSBTSiH22/X03jANFhrs9gkfm 7J9qB6udI9J/QrFWKiJYOX5tOipHuFfjc83VXx1/AjM/v+zDLnzeSeyFzl3w7+u+Jx A0VzzbLfrFNlQ== Received: from [192.168.1.26] (ci77p00im-dlb-asmtp-mailmevip.me.com [17.57.156.26]) by ci74p00im-qukt09082501.me.com (Postfix) with ESMTPSA id 1E1D74AA045E; Mon, 9 Dec 2024 13:25:55 +0000 (UTC) From: Zijun Hu Date: Mon, 09 Dec 2024 21:25:00 +0800 Subject: [PATCH 2/8] of/irq: Correct element count for array @dummy_imask in API of_irq_parse_raw() Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20241209-of_irq_fix-v1-2-782f1419c8a1@quicinc.com> References: <20241209-of_irq_fix-v1-0-782f1419c8a1@quicinc.com> In-Reply-To: <20241209-of_irq_fix-v1-0-782f1419c8a1@quicinc.com> To: Rob Herring , Saravana Kannan , Lorenzo Pieralisi , Bjorn Helgaas , Marc Zyngier , Stefan Wiehler , Grant Likely , Tony Lindgren , Kumar Gala , Thierry Reding , Julia Lawall , Jamie Iles , Grant Likely , Benjamin Herrenschmidt Cc: Zijun Hu , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Rob Herring , Zijun Hu X-Mailer: b4 0.14.2 X-Apple-Remote-Links: v=1;h=KCk=;charset=UTF-8 From: Zijun Hu Array @dummy_imask only needs MAX_PHANDLE_ARGS elements, but it actually has (MAX_PHANDLE_ARGS + 1) elements. Fix by using (MAX_PHANDLE_ARGS - 1) as max element index in initializer. Signed-off-by: Zijun Hu --- drivers/of/irq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/of/irq.c b/drivers/of/irq.c index 43cf60479b9e18eb0eec35f39c147deccd8fe8dd..758eb9b3714868112e83469d131= b244ce77d4e82 100644 --- a/drivers/of/irq.c +++ b/drivers/of/irq.c @@ -171,7 +171,7 @@ int of_irq_parse_raw(const __be32 *addr, struct of_phan= dle_args *out_irq) struct device_node *ipar, *tnode, *old =3D NULL; __be32 initial_match_array[MAX_PHANDLE_ARGS]; const __be32 *match_array =3D initial_match_array; - const __be32 *tmp, dummy_imask[] =3D { [0 ... MAX_PHANDLE_ARGS] =3D cpu_t= o_be32(~0) }; + const __be32 *tmp, dummy_imask[] =3D { [0 ... (MAX_PHANDLE_ARGS - 1)] =3D= cpu_to_be32(~0) }; u32 intsize =3D 1, addrsize; int i, rc =3D -EINVAL; =20 --=20 2.34.1