From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 21C0526F44F; Tue, 8 Apr 2025 12:34:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744115657; cv=none; b=HCPY+B2noccq6zpYnppgknm1X0yyTjm3wa5gPhKl00ocH5moplKFFQ1CWsBpVXLe5UwQJvgZBpnDRcWtkoifEQ9XWvJ2XnX3bCb53hKSdidLFeGaQUJGatmyaJgBtqg8en3mnQnCJrc8AIkIPBT/Kaubm9HkDV/ttVI7RFQIoLo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744115657; c=relaxed/simple; bh=GtwB1DRI00RxKU8TNb66YbUuQ/i71mXjxwdYbwTY0yA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=JSOBDDg8NE+eB9jUSI5IE0Ny4Hd0WR//MDoJcepKoju9XGLUuPQrdp10rq+PaDrhMq8MJMcx2mTrPho3+vERDkTAeBx3CEacMjZL629vjkcCKZD/fhLUCE6HPDW9Uw52M6eXTgHh5o1/gkmJih6z7jS4neLH1vfSnDISR2gAfkA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=jmqCm9ku; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="jmqCm9ku" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 14BBEC4CEE7; Tue, 8 Apr 2025 12:34:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1744115656; bh=GtwB1DRI00RxKU8TNb66YbUuQ/i71mXjxwdYbwTY0yA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jmqCm9kuvwApsLkJPG+UKfR9xc0RRSMS5yNGbDg8kow6f1tHAPLcb+yr22hCAsnIl d28NaYRefVTKwZ11jNGU0EKapX2FWCSdyZ2XB3/ZJoGYB7fvcRPlGVVHDLZtRfApbz +PLTAy/933qH/Ea6yJqSPAn8IiQzoWPO8A86UXm8= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Zijun Hu , Sakari Ailus , "Rob Herring (Arm)" , Sasha Levin Subject: [PATCH 6.1 055/204] of: property: Increase NR_FWNODE_REFERENCE_ARGS Date: Tue, 8 Apr 2025 12:49:45 +0200 Message-ID: <20250408104821.960266771@linuxfoundation.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250408104820.266892317@linuxfoundation.org> References: <20250408104820.266892317@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Zijun Hu [ Upstream commit eb50844d728f11e87491f7c7af15a4a737f1159d ] Currently, the following two macros have different values: // The maximal argument count for firmware node reference #define NR_FWNODE_REFERENCE_ARGS 8 // The maximal argument count for DT node reference #define MAX_PHANDLE_ARGS 16 It may cause firmware node reference's argument count out of range if directly assign DT node reference's argument count to firmware's. drivers/of/property.c:of_fwnode_get_reference_args() is doing the direct assignment, so may cause firmware's argument count @args->nargs got out of range, namely, in [9, 16]. Fix by increasing NR_FWNODE_REFERENCE_ARGS to 16 to meet DT requirement. Will align both macros later to avoid such inconsistency. Fixes: 3e3119d3088f ("device property: Introduce fwnode_property_get_reference_args") Signed-off-by: Zijun Hu Acked-by: Sakari Ailus Link: https://lore.kernel.org/r/20250225-fix_arg_count-v4-1-13cdc519eb31@quicinc.com Signed-off-by: Rob Herring (Arm) Signed-off-by: Sasha Levin --- include/linux/fwnode.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/fwnode.h b/include/linux/fwnode.h index 525cc031596b6..7efb4493e51c0 100644 --- a/include/linux/fwnode.h +++ b/include/linux/fwnode.h @@ -83,7 +83,7 @@ struct fwnode_endpoint { #define SWNODE_GRAPH_PORT_NAME_FMT "port@%u" #define SWNODE_GRAPH_ENDPOINT_NAME_FMT "endpoint@%u" -#define NR_FWNODE_REFERENCE_ARGS 8 +#define NR_FWNODE_REFERENCE_ARGS 16 /** * struct fwnode_reference_args - Fwnode reference with additional arguments -- 2.39.5