lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Tue, 12 Nov 2019 18:32:18 -0600
From:   Frank Rowand <frowand.list@...il.com>
To:     Matti Vaittinen <matti.vaittinen@...rohmeurope.com>,
        mazziesaccount@...il.com
Cc:     Rob Herring <robh+dt@...nel.org>, devicetree@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] of: property: Fix documentation for out values

Hi Matti,

On 11/12/19 2:17 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.
> 
> Signed-off-by: Matti Vaittinen <matti.vaittinen@...rohmeurope.com>
> ---
>  drivers/of/property.c | 12 ++++++++----
>  1 file changed, 8 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/of/property.c b/drivers/of/property.c
> index d7fa75e31f22..4aae93cdc1ce 100644
> --- a/drivers/of/property.c
> +++ b/drivers/of/property.c
> @@ -164,7 +164,8 @@ 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 return value, modified only if return value is
> + *		greater than 0.
>   * @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 +213,8 @@ 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 return value, modified only if return value is
> + *		greater than 0.
>   * @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 +262,8 @@ 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 value, modified only if return value is
> + *		greater than 0.
>   * @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 +337,8 @@ 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 return value, modified only if return value is
> + *		greater than 0.
>   * @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
> 

Thanks for catching each of these cases of incorrect documentation.

Instead of correcting each of the descriptions, please just remove the incorrect
portion.  So for each case, remove ", modified only if return value is 0."

The reference to return value of 0 is a left over from another set of functions
which were modified to call the set of functions that you fix above.

Thanks,

Frank

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ