From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f171.google.com (mail-pl1-f171.google.com [209.85.214.171]) (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 E9B322D0C90 for ; Wed, 2 Jul 2025 15:06:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.171 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1751468798; cv=none; b=rv1OEyMKWQj6EK9CiLNClyENhRvMUhySBrhB7v5SsC3jg86E9B19nayd02EYSBT1A9y2oiB4eMwaXqyS8vzPEtfnunSjDLNlmrDu8D2bFPvTp+n7OfIkQsFuoPPyk2N5zQ64QlPCgN9UH4HZPqiEY82fRzeknrT1u1HvyzAjcR0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1751468798; c=relaxed/simple; bh=68MAtXNRMrOlaqudDNa6dyhIXhKNWKCJp2ZktqVgKfw=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=KHjkANctLPs/di2k4568r6samly48/vpkwncGzgcp8zhSZUFrjPlHZKrdTGrgnGp2Cbv98frzSkaz7osPA8/hIq8upO/Q6CjLMZmJEmkGK0arTMYukLx5UfJcLKTZhFwVp8gO9RVExaYQdf9+maeur304BhE/xwVX8Ud8WzW0wk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ventanamicro.com; spf=pass smtp.mailfrom=ventanamicro.com; dkim=pass (2048-bit key) header.d=ventanamicro.com header.i=@ventanamicro.com header.b=mpA7MfC4; arc=none smtp.client-ip=209.85.214.171 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ventanamicro.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ventanamicro.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ventanamicro.com header.i=@ventanamicro.com header.b="mpA7MfC4" Received: by mail-pl1-f171.google.com with SMTP id d9443c01a7336-23633a6ac50so87587315ad.2 for ; Wed, 02 Jul 2025 08:06:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1751468796; x=1752073596; darn=vger.kernel.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=DuxrgWn37wvxnmqKJavpfaOGptqxe8oR/pHOsdwVSXg=; b=mpA7MfC4Zt8G8Q2vqphc//2YrzrTFQPdfBMtdqUOf2tQ52hLWPE9XbULaLXAEquHkL uxyMzrOHQusOEk+1K2Ll635NnZ5zW/6ZemPEldrFtwIvArAy5EiwHANlxkeovsIUdjr8 N5bfC2QAhN629IM7vgormxDklMpVpdalPQEcg9wYZzJXXQtKGvHUzS+sy//68RSJzd8z Da2jqfXgxTTGxCZfNyv6j+QnoEuZyqpnFCvOqA8tDRWh9SRqHbOy8TKGubZsr0HIFEdm ctJ9lT3tdw3Qja8sFzifAlDr1aeTisM7KHH3FDieuTugZBSH33MAVuINYUk1V5uogTeu O5vg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1751468796; x=1752073596; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=DuxrgWn37wvxnmqKJavpfaOGptqxe8oR/pHOsdwVSXg=; b=U0r8DdM3W3cngxPzVOZvlyzNG6dOi6eQoRhFzjJcrWAXIQquwNCYZphAZ3d+EIJ/+3 HUHNiKs6qbT8iowhHRhnjGdK4CVwS/6MqsPHRg4VJqo/iQx4d5vljk2I7++4/tTTJpgW E0JHfo7HaPt4osHFIP4xt/IwLsI2sBPZGfudm9GJFOP7hIOAVHQvDNcGzhZeVkb12sGV 0+TYNfvC9YIHGoW+bnua0+5eY4G/SDqNmm3XdrcCGecVN/jqe35mTGtK6bQcmCqjJRVg vynAJ2S5adkbKloBHU9q3/ZLMDk6Tnf7Pu4qFZVaEj+FS0PKILR3T2Zz1O2vSrnf/5Mx bw+Q== X-Forwarded-Encrypted: i=1; AJvYcCWjIXkFGjurFzFR+fJUBcXWuqiQ8I5ksc2b8RvcqHf4vX52YdpfpSALbpE84BHMpev7ROPtI6yiSdTb@vger.kernel.org X-Gm-Message-State: AOJu0YzHGH0Y4QnIrELmnfftSW2WELETJVol5csi5kvrki759Dk6PMdz v0NeNf7bWNa9fsJlfr7VAYHU2UWeMTyCILfS4XrgV1FTKooMuMjhzZ5KXdyV4rtlyjo= X-Gm-Gg: ASbGnctYMlGnMyubX6E4VjFi8+fIq1OJ6OXNNJ/rRT2Clgqh4PNTREjZ5GdHKcLyie/ XB8Fv2pzyy1uuv5Oz0zzq8Tc3Gwv5KiOGdvRYbVAJXbF7uOUlvjYQVbWHsR/xN8hKfJLnefZ0jv QRMXoWg+eOagI1L9pdMuZ5gkeiWrz/1YnhqplCZhsjLaaKtiZZ7JVM1DA57+zQh0IocA3wDzH2T UHycoltohBS0nYyC1tAOfaB9umkYG52TQHjzS1E+52ytF5fOyjHD6Rd6RsZ9xMVqyJllTD1LiyS 1IF9LKuE1GuC0VL9VhTlksJP8ueR/UiAmL/TvAYnhEusOglj3D6bIH60wY9Ee17xIpJgHg== X-Google-Smtp-Source: AGHT+IEayU19ekj4WiD0uxOsXBOzhuBGyVO7ozD4bXpw7JPLUlbTFpVZ7FSEPPWrdW6ZBL27rOJyQQ== X-Received: by 2002:a17:902:e78d:b0:234:8c3d:2912 with SMTP id d9443c01a7336-23c6e4e2a1bmr41479125ad.11.1751468796094; Wed, 02 Jul 2025 08:06:36 -0700 (PDT) Received: from sunil-laptop ([103.97.166.196]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-23acb3ba530sm130521215ad.200.2025.07.02.08.06.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Jul 2025 08:06:35 -0700 (PDT) Date: Wed, 2 Jul 2025 20:36:20 +0530 From: Sunil V L To: "Rafael J. Wysocki" Cc: Andy Shevchenko , Anup Patel , Michael Turquette , Stephen Boyd , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Jassi Brar , Thomas Gleixner , Mika Westerberg , Linus Walleij , Bartosz Golaszewski , Uwe =?utf-8?Q?Kleine-K=C3=B6nig?= , Palmer Dabbelt , Paul Walmsley , Alexandre Ghiti , Len Brown , 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 v7 15/24] ACPI: property: Add support for cells property Message-ID: References: <20250702051345.1460497-1-apatel@ventanamicro.com> <20250702051345.1460497-16-apatel@ventanamicro.com> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Wed, Jul 02, 2025 at 02:39:30PM +0200, Rafael J. Wysocki wrote: > On Wed, Jul 2, 2025 at 1:38 PM Andy Shevchenko > wrote: > > > > On Wed, Jul 02, 2025 at 12:20:55PM +0200, Rafael J. Wysocki wrote: > > > On Wed, Jul 2, 2025 at 7:16 AM Anup Patel wrote: > > > > ... > > > > > > static int acpi_fwnode_get_reference_args(const struct fwnode_handle *fwnode, > > > > const char *propname, const char *nargs_prop, > > > > unsigned int args_count, unsigned int index, > > > > > > const struct acpi_device_data *data; > > > > struct fwnode_handle *ref_fwnode; > > > > struct acpi_device *device; > > > > + unsigned int nargs_count; > > > > int ret, idx = 0; > > > > > > + nargs_count = acpi_fwnode_get_args_count(device, nargs_prop); > > > > > > I think it should work the same way as it used to for the callers that > > > pass args_count, so maybe > > > > > > if (!args_count) > > > args_count = acpi_fwnode_get_args_count(device, nargs_prop); > > > > But this is different variable. > > Of course it is different. It is an acpi_fwnode_get_reference_args() parameter. > > > > > element++; > > > > - > > > > ret = acpi_get_ref_args(idx == index ? args : NULL, > > > > acpi_fwnode_handle(device), > > > > - &element, end, args_count); > > > > + &element, end, > > > > + nargs_count ? nargs_count : args_count); > > > > > > And this change would not be necessary? > > > > This is not the same check as proposed above. > > No, it is not. > > It just makes the function work the same way it did before the change > for the callers who passed nozero args_count and so they might be > forgiven expecting that it would be taken into account. But if we do like this, the expectation of fwnode_property_get_reference_args() will differ for DT and ACPI, right? I mean nargs_prop should take higher precedence than nargs. Thanks! Sunil