Re: [RFC 04/10] property: add a callback parameter to fwnode_property_match_string()

From: Andy Shevchenko
Date: Mon Feb 21 2022 - 13:02:03 EST


On Mon, Feb 21, 2022 at 05:26:46PM +0100, Clément Léger wrote:
> This function will be modified to be reused for
> fwnode_property_read_string_index(). In order to avoid copy/paste of
> existing code, split the existing function and pass a callback that
> will be executed once the string array has been retrieved.
>
> In order to reuse this function with other actions.

...

> +int fwnode_property_match_string(const struct fwnode_handle *fwnode,
> + const char *propname, const char *string)
> +{
> + return fwnode_property_string_match(fwnode, propname,
> + match_string_callback,

> + (void *)string);

We want to keep const qualifier.

> +}

--
With Best Regards,
Andy Shevchenko