* [PATCH v2] of: property: Fix documentation for out values
@ 2019-11-13 6:43 Matti Vaittinen
2019-11-13 22:24 ` Frank Rowand
2019-11-14 22:31 ` Rob Herring
0 siblings, 2 replies; 3+ messages in thread
From: Matti Vaittinen @ 2019-11-13 6:43 UTC (permalink / raw)
To: matti.vaittinen, mazziesaccount
Cc: Rob Herring, Frank Rowand, devicetree, linux-kernel
Property fetching functions which return number of successfully fetched
properties should not state that out-values are only modified if 0 is
returned. Fix this. Also, "pointer to return value" is slightly suboptimal
phrase as "return value" commonly refers to value function returns (not via
arguments). Rather use "pointer to found values".
Signed-off-by: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
---
Changes from v1. Removed statement about modifying arg ptr only upon
successful execution (as requested by Frank). Also changed "pointer to
return value" with "pointer to found values"
drivers/of/property.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/of/property.c b/drivers/of/property.c
index d7fa75e31f22..c1dd22ed03f3 100644
--- a/drivers/of/property.c
+++ b/drivers/of/property.c
@@ -164,7 +164,7 @@ EXPORT_SYMBOL_GPL(of_property_read_u64_index);
*
* @np: device node from which the property value is to be read.
* @propname: name of the property to be searched.
- * @out_values: pointer to return value, modified only if return value is 0.
+ * @out_values: pointer to found values.
* @sz_min: minimum number of array elements to read
* @sz_max: maximum number of array elements to read, if zero there is no
* upper limit on the number of elements in the dts entry but only
@@ -212,7 +212,7 @@ EXPORT_SYMBOL_GPL(of_property_read_variable_u8_array);
*
* @np: device node from which the property value is to be read.
* @propname: name of the property to be searched.
- * @out_values: pointer to return value, modified only if return value is 0.
+ * @out_values: pointer to found values.
* @sz_min: minimum number of array elements to read
* @sz_max: maximum number of array elements to read, if zero there is no
* upper limit on the number of elements in the dts entry but only
@@ -260,7 +260,7 @@ EXPORT_SYMBOL_GPL(of_property_read_variable_u16_array);
*
* @np: device node from which the property value is to be read.
* @propname: name of the property to be searched.
- * @out_values: pointer to return value, modified only if return value is 0.
+ * @out_values: pointer to return found values.
* @sz_min: minimum number of array elements to read
* @sz_max: maximum number of array elements to read, if zero there is no
* upper limit on the number of elements in the dts entry but only
@@ -334,7 +334,7 @@ EXPORT_SYMBOL_GPL(of_property_read_u64);
*
* @np: device node from which the property value is to be read.
* @propname: name of the property to be searched.
- * @out_values: pointer to return value, modified only if return value is 0.
+ * @out_values: pointer to found values.
* @sz_min: minimum number of array elements to read
* @sz_max: maximum number of array elements to read, if zero there is no
* upper limit on the number of elements in the dts entry but only
base-commit: 31f4f5b495a62c9a8b15b1c3581acd5efeb9af8c
--
2.21.0
--
Matti Vaittinen, Linux device drivers
ROHM Semiconductors, Finland SWDC
Kiviharjunlenkki 1E
90220 OULU
FINLAND
~~~ "I don't think so," said Rene Descartes. Just then he vanished ~~~
Simon says - in Latin please.
~~~ "non cogito me" dixit Rene Descarte, deinde evanescavit ~~~
Thanks to Simon Glass for the translation =]
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2] of: property: Fix documentation for out values
2019-11-13 6:43 [PATCH v2] of: property: Fix documentation for out values Matti Vaittinen
@ 2019-11-13 22:24 ` Frank Rowand
2019-11-14 22:31 ` Rob Herring
1 sibling, 0 replies; 3+ messages in thread
From: Frank Rowand @ 2019-11-13 22:24 UTC (permalink / raw)
To: Matti Vaittinen, mazziesaccount; +Cc: Rob Herring, devicetree, linux-kernel
On 11/13/19 12:43 AM, Matti Vaittinen wrote:
> Property fetching functions which return number of successfully fetched
> properties should not state that out-values are only modified if 0 is
> returned. Fix this. Also, "pointer to return value" is slightly suboptimal
> phrase as "return value" commonly refers to value function returns (not via
> arguments). Rather use "pointer to found values".
>
> Signed-off-by: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
> ---
>
> Changes from v1. Removed statement about modifying arg ptr only upon
> successful execution (as requested by Frank). Also changed "pointer to
> return value" with "pointer to found values"
>
> drivers/of/property.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/of/property.c b/drivers/of/property.c
> index d7fa75e31f22..c1dd22ed03f3 100644
> --- a/drivers/of/property.c
> +++ b/drivers/of/property.c
> @@ -164,7 +164,7 @@ EXPORT_SYMBOL_GPL(of_property_read_u64_index);
> *
> * @np: device node from which the property value is to be read.
> * @propname: name of the property to be searched.
> - * @out_values: pointer to return value, modified only if return value is 0.
> + * @out_values: pointer to found values.
> * @sz_min: minimum number of array elements to read
> * @sz_max: maximum number of array elements to read, if zero there is no
> * upper limit on the number of elements in the dts entry but only
> @@ -212,7 +212,7 @@ EXPORT_SYMBOL_GPL(of_property_read_variable_u8_array);
> *
> * @np: device node from which the property value is to be read.
> * @propname: name of the property to be searched.
> - * @out_values: pointer to return value, modified only if return value is 0.
> + * @out_values: pointer to found values.
> * @sz_min: minimum number of array elements to read
> * @sz_max: maximum number of array elements to read, if zero there is no
> * upper limit on the number of elements in the dts entry but only
> @@ -260,7 +260,7 @@ EXPORT_SYMBOL_GPL(of_property_read_variable_u16_array);
> *
> * @np: device node from which the property value is to be read.
> * @propname: name of the property to be searched.
> - * @out_values: pointer to return value, modified only if return value is 0.
> + * @out_values: pointer to return found values.
> * @sz_min: minimum number of array elements to read
> * @sz_max: maximum number of array elements to read, if zero there is no
> * upper limit on the number of elements in the dts entry but only
> @@ -334,7 +334,7 @@ EXPORT_SYMBOL_GPL(of_property_read_u64);
> *
> * @np: device node from which the property value is to be read.
> * @propname: name of the property to be searched.
> - * @out_values: pointer to return value, modified only if return value is 0.
> + * @out_values: pointer to found values.
> * @sz_min: minimum number of array elements to read
> * @sz_max: maximum number of array elements to read, if zero there is no
> * upper limit on the number of elements in the dts entry but only
>
> base-commit: 31f4f5b495a62c9a8b15b1c3581acd5efeb9af8c
>
Reviewed-by: Frank Rowand <frowand.list@gmail.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] of: property: Fix documentation for out values
2019-11-13 6:43 [PATCH v2] of: property: Fix documentation for out values Matti Vaittinen
2019-11-13 22:24 ` Frank Rowand
@ 2019-11-14 22:31 ` Rob Herring
1 sibling, 0 replies; 3+ messages in thread
From: Rob Herring @ 2019-11-14 22:31 UTC (permalink / raw)
To: Matti Vaittinen
Cc: matti.vaittinen, mazziesaccount, Frank Rowand, devicetree, linux-kernel
On Wed, 13 Nov 2019 08:43:38 +0200, Matti Vaittinen wrote:
> Property fetching functions which return number of successfully fetched
> properties should not state that out-values are only modified if 0 is
> returned. Fix this. Also, "pointer to return value" is slightly suboptimal
> phrase as "return value" commonly refers to value function returns (not via
> arguments). Rather use "pointer to found values".
>
> Signed-off-by: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
> ---
>
> Changes from v1. Removed statement about modifying arg ptr only upon
> successful execution (as requested by Frank). Also changed "pointer to
> return value" with "pointer to found values"
>
> drivers/of/property.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
Applied, thanks.
Rob
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-11-14 22:31 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-13 6:43 [PATCH v2] of: property: Fix documentation for out values Matti Vaittinen
2019-11-13 22:24 ` Frank Rowand
2019-11-14 22:31 ` Rob Herring
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.