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]
Message-ID: <aLb9lDzilIvkF-oZ@smile.fi.intel.com>
Date: Tue, 2 Sep 2025 17:22:12 +0300
From: Andy Shevchenko <andriy.shevchenko@...el.com>
To: Dimitri Fedrau <dima.fedrau@...il.com>
Cc: dimitri.fedrau@...bherr.com,
	Javier Carrasco <javier.carrasco.cruz@...il.com>,
	Li peiyu <579lpy@...il.com>, Jonathan Cameron <jic23@...nel.org>,
	David Lechner <dlechner@...libre.com>,
	Nuno Sá <nuno.sa@...log.com>,
	Andy Shevchenko <andy@...nel.org>,
	Jonathan Cameron <Jonathan.Cameron@...wei.com>,
	linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org,
	Chris Lesiak <chris.lesiak@...orbio.com>
Subject: Re: [PATCH v2 2/2] iio: humditiy: hdc3020: fix units for thresholds
 and hysteresis

On Tue, Sep 02, 2025 at 03:54:04PM +0200, Dimitri Fedrau wrote:
> Am Tue, Sep 02, 2025 at 03:47:52PM +0300 schrieb Andy Shevchenko:
> > On Mon, Sep 01, 2025 at 07:51:59PM +0200, Dimitri Fedrau via B4 Relay wrote:

...

> The explicit formula in the datasheet:
> 
> T(degree celsius) = -45 + (175 * temp) / 65535
> 
> The formula before the patch:
> 
> T(degree celsius) * 65525 = -2949075 + (175 * temp)

Then embed it into the comment.

> Adding the PRE_SCALE into the formula doesn't improve readability from
> my perspective. I would prefer to just scale the result as it has been
> done before.

Up to you, it was just an idea. But in any case that 5 should be explicit (and
not hidden in the precalculated values).

-- 
With Best Regards,
Andy Shevchenko



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ