[PATCH v3 14/23] ACPI: property: Refactor acpi_fwnode_get_reference_args()

Andy Shevchenko andriy.shevchenko at linux.intel.com
Mon May 12 01:43:54 PDT 2025


On Sun, May 11, 2025 at 07:09:30PM +0530, Anup Patel wrote:
> 
> Currently acpi_fwnode_get_reference_args() calls the public function
> __acpi_node_get_property_reference() which ignores the nargs_prop
> parameter. To fix this, make __acpi_node_get_property_reference() to
> call the static acpi_fwnode_get_reference() so that callers of
> fwnode_get_reference_args() can still pass a valid property name to
> fetch the number of arguments.

...

> +static int acpi_fwnode_get_reference_args(const struct fwnode_handle *fwnode,
> +					  const char *prop, const char *nargs_prop,

Why prop and not propname?

> +					  unsigned int args_count, unsigned int index,
> +					  struct fwnode_reference_args *args)

...

> -	ret = acpi_data_get_property(data, propname, ACPI_TYPE_ANY, &obj);
> +	ret = acpi_data_get_property(data, prop, ACPI_TYPE_ANY, &obj);

Ditto.

Sounds like an unneeded churn.

>  	if (ret)
>  		return ret == -EINVAL ? -ENOENT : -EINVAL;

-- 
With Best Regards,
Andy Shevchenko





More information about the linux-riscv mailing list