linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 1/1] device property: Fix documentation for *_match_string() APIs
@ 2022-10-06 12:38 Andy Shevchenko
  2022-10-06 12:45 ` Sakari Ailus
  2022-10-25  9:06 ` Andy Shevchenko
  0 siblings, 2 replies; 7+ messages in thread
From: Andy Shevchenko @ 2022-10-06 12:38 UTC (permalink / raw)
  To: Andy Shevchenko, linux-acpi, linux-kernel
  Cc: Daniel Scally, Heikki Krogerus, Sakari Ailus, Greg Kroah-Hartman,
	Rafael J. Wysocki

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,
@@ -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,
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH v1 1/1] device property: Fix documentation for *_match_string() APIs
  2022-10-06 12:38 [PATCH v1 1/1] device property: Fix documentation for *_match_string() APIs Andy Shevchenko
@ 2022-10-06 12:45 ` Sakari Ailus
  2022-10-06 12:55   ` Andy Shevchenko
  2022-10-25  9:06 ` Andy Shevchenko
  1 sibling, 1 reply; 7+ messages in thread
From: Sakari Ailus @ 2022-10-06 12:45 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: linux-acpi, linux-kernel, Daniel Scally, Heikki Krogerus,
	Greg Kroah-Hartman, Rafael J. Wysocki

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v1 1/1] device property: Fix documentation for *_match_string() APIs
  2022-10-06 12:45 ` Sakari Ailus
@ 2022-10-06 12:55   ` Andy Shevchenko
  2022-10-06 14:04     ` Sakari Ailus
  0 siblings, 1 reply; 7+ messages in thread
From: Andy Shevchenko @ 2022-10-06 12:55 UTC (permalink / raw)
  To: Sakari Ailus
  Cc: linux-acpi, linux-kernel, Daniel Scally, Heikki Krogerus,
	Greg Kroah-Hartman, Rafael J. Wysocki

On Thu, Oct 06, 2022 at 12:45:41PM +0000, Sakari Ailus wrote:
> 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()")

...

> > - * 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.

Right, I think we would rather do an incremental change since that will be
more intrusive and would not be exactly the fix (improvement?).

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

Thanks!

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v1 1/1] device property: Fix documentation for *_match_string() APIs
  2022-10-06 12:55   ` Andy Shevchenko
@ 2022-10-06 14:04     ` Sakari Ailus
  0 siblings, 0 replies; 7+ messages in thread
From: Sakari Ailus @ 2022-10-06 14:04 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: linux-acpi, linux-kernel, Daniel Scally, Heikki Krogerus,
	Greg Kroah-Hartman, Rafael J. Wysocki

On Thu, Oct 06, 2022 at 03:55:05PM +0300, Andy Shevchenko wrote:
> On Thu, Oct 06, 2022 at 12:45:41PM +0000, Sakari Ailus wrote:
> > 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()")
> 
> ...
> 
> > > - * 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.
> 
> Right, I think we would rather do an incremental change since that will be
> more intrusive and would not be exactly the fix (improvement?).

It's a fix in documentation. It's perhaps unlikely a bug would have been
introduced because of what was missing.

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

You're welcome!

-- 
Sakari Ailus

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v1 1/1] device property: Fix documentation for *_match_string() APIs
  2022-10-06 12:38 [PATCH v1 1/1] device property: Fix documentation for *_match_string() APIs Andy Shevchenko
  2022-10-06 12:45 ` Sakari Ailus
@ 2022-10-25  9:06 ` Andy Shevchenko
  2022-10-25 18:20   ` Rafael J. Wysocki
  1 sibling, 1 reply; 7+ messages in thread
From: Andy Shevchenko @ 2022-10-25  9:06 UTC (permalink / raw)
  To: linux-acpi, linux-kernel
  Cc: Daniel Scally, Heikki Krogerus, Sakari Ailus, Greg Kroah-Hartman,
	Rafael J. Wysocki

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>

Is this gone through the cracks?

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v1 1/1] device property: Fix documentation for *_match_string() APIs
  2022-10-25  9:06 ` Andy Shevchenko
@ 2022-10-25 18:20   ` Rafael J. Wysocki
  2022-10-26 11:16     ` Andy Shevchenko
  0 siblings, 1 reply; 7+ messages in thread
From: Rafael J. Wysocki @ 2022-10-25 18:20 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: linux-acpi, linux-kernel, Daniel Scally, Heikki Krogerus,
	Sakari Ailus, Greg Kroah-Hartman, Rafael J. Wysocki

On Tue, Oct 25, 2022 at 11:06 AM Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:
>
> 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>
>
> Is this gone through the cracks?

No, it is not.  I've just applied it for 6.1-rc3.

Thanks!

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v1 1/1] device property: Fix documentation for *_match_string() APIs
  2022-10-25 18:20   ` Rafael J. Wysocki
@ 2022-10-26 11:16     ` Andy Shevchenko
  0 siblings, 0 replies; 7+ messages in thread
From: Andy Shevchenko @ 2022-10-26 11:16 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: linux-acpi, linux-kernel, Daniel Scally, Heikki Krogerus,
	Sakari Ailus, Greg Kroah-Hartman

On Tue, Oct 25, 2022 at 08:20:24PM +0200, Rafael J. Wysocki wrote:
> On Tue, Oct 25, 2022 at 11:06 AM Andy Shevchenko
> <andriy.shevchenko@linux.intel.com> wrote:
> > 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>
> >
> > Is this gone through the cracks?
> 
> No, it is not.  I've just applied it for 6.1-rc3.

Thank you, Rafael!

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-10-26 11:17 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-06 12:38 [PATCH v1 1/1] device property: Fix documentation for *_match_string() APIs Andy Shevchenko
2022-10-06 12:45 ` Sakari Ailus
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).