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] [thread-next>] [day] [month] [year] [list]
Message-ID: <67166adf-5a89-3283-8a16-9a0a9a57e770@kernel.org>
Date:   Sat, 12 Nov 2016 16:36:37 +0000
From:   Jonathan Cameron <jic23@...nel.org>
To:     Brian Masney <masneyb@...tation.org>, linux-iio@...r.kernel.org
Cc:     devel@...verdev.osuosl.org, gregkh@...uxfoundation.org,
        lars@...afoo.de, pmeerw@...erw.net, knaack.h@....de,
        linux-kernel@...r.kernel.org, Jon.Brenner@....com
Subject: Re: [PATCH v3 16/28] staging: iio: tsl2583: updated code comment to
 match what the code does

On 10/11/16 09:25, Brian Masney wrote:
> If channel 0 does not have any data, then the code sets the lux to zero.
> The corresponding comment says that the last value is returned. This
> updates the comment to correctly reflect what the code does.
> 
> Signed-off-by: Brian Masney <masneyb@...tation.org>
Better perhaps to just return an error, -EAGAIN perhaps?
I'm not sure why it would not give a value.
> ---
>  drivers/staging/iio/light/tsl2583.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/iio/light/tsl2583.c b/drivers/staging/iio/light/tsl2583.c
> index 52a39a6..390ff8b 100644
> --- a/drivers/staging/iio/light/tsl2583.c
> +++ b/drivers/staging/iio/light/tsl2583.c
> @@ -221,7 +221,7 @@ static int tsl2583_get_lux(struct iio_dev *indio_dev)
>  		goto return_max;
>  
>  	if (!ch0) {
> -		/* have no data, so return LAST VALUE */
> +		/* have no data, so return 0 */
>  		ret = 0;
>  		chip->als_cur_info.lux = 0;
>  		goto done;
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ