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: <b5aa553d-fed4-459e-bbe8-70b9b9b39cbd@gmail.com>
Date: Sun, 29 Dec 2024 08:53:58 +0200
From: Matti Vaittinen <mazziesaccount@...il.com>
To: Javier Carrasco <javier.carrasco.cruz@...il.com>,
 Jonathan Cameron <jic23@...nel.org>, Lars-Peter Clausen <lars@...afoo.de>
Cc: linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org,
 Jonathan Cameron <Jonathan.Cameron@...wei.com>
Subject: Re: [PATCH v2 4/4] iio: veml3235: fix scale to conform to ABI

On 24/12/2024 12:59, Javier Carrasco wrote:
> The current scale is not ABI-compliant as it is just the sensor gain
> instead of the value that acts as a multiplier to be applied to the raw
> value (there is no offset).
> 
> Use the iio-gts helpers to obtain the proper scale values according to
> the gain and integration time to match the resolution tables from the
> datasheet. When at it, use 'scale' instead of 'gain' consistently for
> the get/set functions to avoid misunderstandings.
> 
> Fixes: c5a23f80c164 ("iio: light: add support for veml3235")
> Signed-off-by: Javier Carrasco <javier.carrasco.cruz@...il.com>
> ---

This looks good to me, although I now think we made a mistake with the 
naming of the iio_gts_find_gain_sel_in_times().

The intended use is finding the gain and time (selector) for the new 
scale (while preferring keeping the time unchanged if possible), right?

So, in this regard it'd be better to use name which reflects the fact 
that the function finds gain and time for given scale.

I would now (after having to look the doc of this new function while 
reviewing the code 2 weeks after reviewing this new function :rolleyes:)
name it something like:

iio_gts_find_gain_time_sel_for_scale()

Well, it's not really in the scope of the review anymore, but I'd love 
to see a renaming patch while we have only one user... :)

Anyways:

Reviewed-by: Matti Vaittinen <mazziesaccount@...il.com>

Yours,
	-- Matti

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ