mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sakari Ailus <sakari.ailus@linux.intel.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org,
	Daniel Scally <djrscally@gmail.com>,
	Heikki Krogerus <heikki.krogerus@linux.intel.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	"Rafael J. Wysocki" <rafael@kernel.org>
Subject: Re: [PATCH v1 1/1] device property: Fix documentation for *_match_string() APIs
Date: Thu, 6 Oct 2022 12:45:41 +0000	[thread overview]
Message-ID: <Yz7N9b3qibyaPAhJ@paasikivi.fi.intel.com> (raw)
In-Reply-To: <20221006123807.37014-1-andriy.shevchenko@linux.intel.com>

Hi Andy,

On Thu, Oct 06, 2022 at 03:38:07PM +0300, Andy Shevchenko wrote:
> The returned value on success is an index of the matching string,
> starting from 0. Reflect this in the documentation.
> 
> Fixes: 3f5c8d318785 ("device property: Add fwnode_property_match_string()")
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
>  drivers/base/property.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/base/property.c b/drivers/base/property.c
> index 617007a25783..bfed224c5724 100644
> --- a/drivers/base/property.c
> +++ b/drivers/base/property.c
> @@ -236,7 +236,7 @@ EXPORT_SYMBOL_GPL(device_property_read_string);
>   * Find a given string in a string array and if it is found return the
>   * index back.
>   *
> - * Return: %0 if the property was found (success),
> + * Return: index, starting from %0, if the property was found (success),
>   *	   %-EINVAL if given arguments are not valid,
>   *	   %-ENODATA if the property does not have a value,
>   *	   %-EPROTO if the property is not an array of strings,

There are other error codes that can be returned such as -ENOMEM or what
else may be returned by fwnode_property_read_string_array().

I might just refer to fwnode_property_read_string_array() and document here
those specific to these functions.

Just FYI... I guess this could be a separate patch, too.

Reviewed-by: Sakari Ailus <sakari.ailus@linux.intel.com>

> @@ -457,7 +457,7 @@ EXPORT_SYMBOL_GPL(fwnode_property_read_string);
>   * Find a given string in a string array and if it is found return the
>   * index back.
>   *
> - * Return: %0 if the property was found (success),
> + * Return: index, starting from %0, if the property was found (success),
>   *	   %-EINVAL if given arguments are not valid,
>   *	   %-ENODATA if the property does not have a value,
>   *	   %-EPROTO if the property is not an array of strings,

-- 
Kind regards,

Sakari Ailus

  reply	other threads:[~2022-10-06 12:45 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-06 12:38 Andy Shevchenko
2022-10-06 12:45 ` Sakari Ailus [this message]
2022-10-06 12:55   ` Andy Shevchenko
2022-10-06 14:04     ` Sakari Ailus
2022-10-25  9:06 ` Andy Shevchenko
2022-10-25 18:20   ` Rafael J. Wysocki
2022-10-26 11:16     ` Andy Shevchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Yz7N9b3qibyaPAhJ@paasikivi.fi.intel.com \
    --to=sakari.ailus@linux.intel.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=djrscally@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=heikki.krogerus@linux.intel.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rafael@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®