From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.11]) (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 9F0AB1FBE8B; Mon, 7 Jul 2025 20:39:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.11 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1751920758; cv=none; b=iWK7qD9zEYR8nMVaALdkh6rEaPzByh3R3AiJ2zr3pHQ8w842J9ic+20oyvTOVzhfB2Hxyyx33d+hJjEKnwb9WJpXbbDkrSvaBQmP2G8+xMRT3r2mBpaPzDOVXcUs7BiSD1HaOvyveeycTe5p8pyVK1gOvLxq2HvAK1/Jh7rJ3n4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1751920758; c=relaxed/simple; bh=kcrB6F2mxoqFMPRnDijT6o6h3KVvHamrCsmEhzHfJiQ=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ojZCsbENrfrohihtcqIR3QZ7Py5fctMO+0nrkDTAlfsovrC1JeBAb88jnwxzASgz4JGQuDkGdg0c+Ar9FpakvMuqoC7nawqx21Mx5zXsfm9WbuzvBptkMdQ52wNVzwPQWlZ0Gv6pNYb68AarYdtJiPMiN5jYwsEuI9BSejWglz8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=QWrYm+hV; arc=none smtp.client-ip=198.175.65.11 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="QWrYm+hV" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1751920757; x=1783456757; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=kcrB6F2mxoqFMPRnDijT6o6h3KVvHamrCsmEhzHfJiQ=; b=QWrYm+hVoOBvaM1dosFsuV3oloBBzgvWx/+Nzt06LYELr2u/hBitTrAu vKUXPQi94q0i49hMvSRPNYx8yzZQuptMo/JIIPwvUR0sGemReV193bMcH b0UJ+JAfWs6DT5kw/7vNlGeyQy05SW/dPUDZYuugdKAec7+F3MNJyL1zS nlExRR7vvi7u02pLP0WZEtSyASWx5ijtjAl7OjydSygTQOT9e2x/xhw0D PGnUk7eu4kyCydWVDRey9P9pcZCXT1+F2FKVZi4Pk1fgp/GOdrPV3xMOD +WIvyQ6Zk/2+dxy6IP5ZEan5N/yHnGVcA9V5g448KYE2spKdF+cZ6+WLu A==; X-CSE-ConnectionGUID: XZKvKVPcRwCC4J5Kor88kw== X-CSE-MsgGUID: im2bvxoLR7u+lY64K5yNkw== X-IronPort-AV: E=McAfee;i="6800,10657,11487"; a="64397516" X-IronPort-AV: E=Sophos;i="6.16,295,1744095600"; d="scan'208";a="64397516" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by orvoesa103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Jul 2025 13:39:16 -0700 X-CSE-ConnectionGUID: vD4xfab6Q4iMgufgeuM4pw== X-CSE-MsgGUID: i1AYe1TLR5CbsO1FTsLDjA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.16,295,1744095600"; d="scan'208";a="192494134" Received: from smile.fi.intel.com ([10.237.72.52]) by orviesa001.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Jul 2025 13:39:09 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.98.2) (envelope-from ) id 1uYscD-0000000DOQV-12J7; Mon, 07 Jul 2025 23:39:05 +0300 Date: Mon, 7 Jul 2025 23:39:04 +0300 From: Andy Shevchenko To: Anup Patel Cc: Michael Turquette , Stephen Boyd , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Jassi Brar , Thomas Gleixner , "Rafael J . Wysocki" , Mika Westerberg , Linus Walleij , Bartosz Golaszewski , Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= , Palmer Dabbelt , Paul Walmsley , Alexandre Ghiti , Len Brown , Sunil V L , Rahul Pathak , Leyfoon Tan , Atish Patra , Andrew Jones , Samuel Holland , Anup Patel , linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-acpi@vger.kernel.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v8 14/24] ACPI: property: Refactor acpi_fwnode_get_reference_args() to support nargs_prop Message-ID: References: <20250704070356.1683992-1-apatel@ventanamicro.com> <20250704070356.1683992-15-apatel@ventanamicro.com> Precedence: bulk X-Mailing-List: linux-acpi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20250704070356.1683992-15-apatel@ventanamicro.com> Organization: Intel Finland Oy - BIC 0357606-4 - c/o Alberga Business Park, 6 krs, Bertel Jungin Aukio 5, 02600 Espoo On Fri, Jul 04, 2025 at 12:33:46PM +0530, Anup Patel wrote: > > Currently, acpi_fwnode_get_reference_args() delegates to the internal > function __acpi_node_get_property_reference() to retrieve property > references. However, this function does not handle the nargs_prop (cells > property) parameter, and instead expects the number of arguments (nargs) > to be known or hardcoded. > > As a result, when fwnode_property_get_reference_args() is used with a > valid nargs_prop, the ACPI backend ignores it, whereas the Device Tree > (DT) backend uses the #*-cells property from the reference node to > determine the number of arguments dynamically. > > To support the nargs_prop in ACPI, refactor the code as follows: > > - Move the implementation from __acpi_node_get_property_reference() > into acpi_fwnode_get_reference_args(). > > - Update __acpi_node_get_property_reference() to call the (now updated) > acpi_fwnode_get_reference_args() passing NULL as nargs_prop to keep > the behavior of __acpi_node_get_property_reference() intact. Reviewed-by: Andy Shevchenko -- With Best Regards, Andy Shevchenko From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8B7D6C83030 for ; Mon, 7 Jul 2025 20:39:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=bIDAOOLEmtrz2YBlGpHE7LQbXyZnW5xNH8s5EAYr7IQ=; b=JtGYjMR9/anXn8 gLvgIaLimLW2w6brYq53ceq2G8SzvYbgLxyrqR37z8WP6NYMj9xeG8RmViyNXFWXgFgV/lipFrXhg am46ex/tqGuyNht9dRvNzNDz6YEhlGJcKHQ0G8VKiPpOoKdMDq0bJ4mkX4xkzAy07NbIVBg44kk54 dSv0hxHq8UYK6P/T9brQH9Sr6FC1drHNAdifHPuxQbK82HpfSnzoTGfhQW6awW3cWoBASvv4cIeOE G3GmXLsghStHzcYobx2vxQn3jk7CR+d6HId2z0Zno2u7TwWOajGSzBBvAQkc6YSdyfbg2EwFP44yd NX9+uKzFreFijZxHL0/A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1uYscT-00000003YHB-2suS; Mon, 07 Jul 2025 20:39:21 +0000 Received: from mgamail.intel.com ([198.175.65.11]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1uYscQ-00000003YGq-3xVL for linux-riscv@lists.infradead.org; Mon, 07 Jul 2025 20:39:20 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1751920759; x=1783456759; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=kcrB6F2mxoqFMPRnDijT6o6h3KVvHamrCsmEhzHfJiQ=; b=KLTE6RNMEZ+V0tvv43NXm7FZDttKrVS6kF5n5wR9OnvPCJID1FTYVbq0 DRSG8kZNsdA6PYUfY+DG6Wa3xYbx8In6SBguoB8HZJGBxoYkpEXNF/at1 KxjEH32/nkNABScx+joHpl9lbr/LIsx5FJB7D7rI2Lg0lGrwGywwYeGA0 vBfoQZrBk6OYX+G6gvPZ5FHyvOBbS5aiGS5II0yuuF0eIaDxS26VZM+/9 iQAspWxunefE0KugiRA5urdyeTPgCwoZLfeQUkw2RfNuZ4mQNctdZ7V2g TVtd8HiPF1OBjPMxnCws7yTeccg/cWXEzNkKFbDGyUwz653stjMf/CDcE A==; X-CSE-ConnectionGUID: wYRZHZAlQNOykrCDksn5gw== X-CSE-MsgGUID: eFI/polITDi+YuvRx/IDjw== X-IronPort-AV: E=McAfee;i="6800,10657,11487"; a="64397518" X-IronPort-AV: E=Sophos;i="6.16,295,1744095600"; d="scan'208";a="64397518" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by orvoesa103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Jul 2025 13:39:16 -0700 X-CSE-ConnectionGUID: vD4xfab6Q4iMgufgeuM4pw== X-CSE-MsgGUID: i1AYe1TLR5CbsO1FTsLDjA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.16,295,1744095600"; d="scan'208";a="192494134" Received: from smile.fi.intel.com ([10.237.72.52]) by orviesa001.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Jul 2025 13:39:09 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.98.2) (envelope-from ) id 1uYscD-0000000DOQV-12J7; Mon, 07 Jul 2025 23:39:05 +0300 Date: Mon, 7 Jul 2025 23:39:04 +0300 From: Andy Shevchenko To: Anup Patel Subject: Re: [PATCH v8 14/24] ACPI: property: Refactor acpi_fwnode_get_reference_args() to support nargs_prop Message-ID: References: <20250704070356.1683992-1-apatel@ventanamicro.com> <20250704070356.1683992-15-apatel@ventanamicro.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20250704070356.1683992-15-apatel@ventanamicro.com> Organization: Intel Finland Oy - BIC 0357606-4 - c/o Alberga Business Park, 6 krs, Bertel Jungin Aukio 5, 02600 Espoo X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250707_133919_033446_93B4117E X-CRM114-Status: GOOD ( 14.47 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jassi Brar , Atish Patra , Michael Turquette , Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= , linux-riscv@lists.infradead.org, linux-clk@vger.kernel.org, Rob Herring , Alexandre Ghiti , Anup Patel , Bartosz Golaszewski , "Rafael J . Wysocki" , linux-acpi@vger.kernel.org, Linus Walleij , Andrew Jones , devicetree@vger.kernel.org, Conor Dooley , Leyfoon Tan , Paul Walmsley , Thomas Gleixner , Mika Westerberg , Stephen Boyd , linux-kernel@vger.kernel.org, Samuel Holland , Palmer Dabbelt , Krzysztof Kozlowski , Rahul Pathak , Len Brown Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org On Fri, Jul 04, 2025 at 12:33:46PM +0530, Anup Patel wrote: > > Currently, acpi_fwnode_get_reference_args() delegates to the internal > function __acpi_node_get_property_reference() to retrieve property > references. However, this function does not handle the nargs_prop (cells > property) parameter, and instead expects the number of arguments (nargs) > to be known or hardcoded. > > As a result, when fwnode_property_get_reference_args() is used with a > valid nargs_prop, the ACPI backend ignores it, whereas the Device Tree > (DT) backend uses the #*-cells property from the reference node to > determine the number of arguments dynamically. > > To support the nargs_prop in ACPI, refactor the code as follows: > > - Move the implementation from __acpi_node_get_property_reference() > into acpi_fwnode_get_reference_args(). > > - Update __acpi_node_get_property_reference() to call the (now updated) > acpi_fwnode_get_reference_args() passing NULL as nargs_prop to keep > the behavior of __acpi_node_get_property_reference() intact. Reviewed-by: Andy Shevchenko -- With Best Regards, Andy Shevchenko _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv