lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aGUaaOQaya-SaasR@smile.fi.intel.com>
Date: Wed, 2 Jul 2025 14:39:20 +0300
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: "Rafael J. Wysocki" <rafael@...nel.org>
Cc: Anup Patel <apatel@...tanamicro.com>,
	Michael Turquette <mturquette@...libre.com>,
	Stephen Boyd <sboyd@...nel.org>, Rob Herring <robh@...nel.org>,
	Krzysztof Kozlowski <krzk+dt@...nel.org>,
	Conor Dooley <conor+dt@...nel.org>,
	Jassi Brar <jassisinghbrar@...il.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	Mika Westerberg <mika.westerberg@...ux.intel.com>,
	Linus Walleij <linus.walleij@...aro.org>,
	Bartosz Golaszewski <brgl@...ev.pl>,
	Uwe Kleine-König <ukleinek@...nel.org>,
	Palmer Dabbelt <palmer@...belt.com>,
	Paul Walmsley <paul.walmsley@...ive.com>,
	Alexandre Ghiti <alex@...ti.fr>, Len Brown <lenb@...nel.org>,
	Sunil V L <sunilvl@...tanamicro.com>,
	Rahul Pathak <rpathak@...tanamicro.com>,
	Leyfoon Tan <leyfoon.tan@...rfivetech.com>,
	Atish Patra <atish.patra@...ux.dev>,
	Andrew Jones <ajones@...tanamicro.com>,
	Samuel Holland <samuel.holland@...ive.com>,
	Anup Patel <anup@...infault.org>, linux-clk@...r.kernel.org,
	devicetree@...r.kernel.org, linux-acpi@...r.kernel.org,
	linux-riscv@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v7 15/24] ACPI: property: Add support for cells property

On Wed, Jul 02, 2025 at 02:37:58PM +0300, 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 <apatel@...tanamicro.com> 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.
> 
> > >                         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.
> But this can be made shorter with Elvis in use:
> 
> 						&element, end, nargs_count ?: args_count);
> 
> > And analogously below.
> 
> And below. And in case if there is a new proposal to have
> 
> 	if (!nargs_count)

I meant

	if (!nargs_prop)

here of course.

> 		args_count = acpi_fwnode_get_args_count(device, nargs_prop);
> 
> that is exactly what I asked to drop as it's included in the
> acpi_fwnode_get_args_count() already, i.e. no need to check this in
> the caller and in the callee.
> 
> > >                         if (ret < 0)
> > >                                 return ret;

-- 
With Best Regards,
Andy Shevchenko



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ