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: <aQB55GjWQL3VD1MO@smile.fi.intel.com>
Date: Tue, 28 Oct 2025 10:08:04 +0200
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: David Laight <david.laight.linux@...il.com>
Cc: linux-iio@...r.kernel.org, chrome-platform@...ts.linux.dev,
	linux-kernel@...r.kernel.org, linux-media@...r.kernel.org,
	Jonathan Cameron <jic23@...nel.org>,
	David Lechner <dlechner@...libre.com>,
	Nuno Sá <nuno.sa@...log.com>,
	Andy Shevchenko <andy@...nel.org>,
	Benson Leung <bleung@...omium.org>,
	Guenter Roeck <groeck@...omium.org>,
	Lars-Peter Clausen <lars@...afoo.de>,
	Michael Hennerich <Michael.Hennerich@...log.com>,
	Mauro Carvalho Chehab <mchehab@...nel.org>,
	"Daniel W. S. Almeida" <dwlsalmeida@...il.com>
Subject: Re: [PATCH v1 2/6] units: Add value of π * 10⁹

On Mon, Oct 27, 2025 at 07:30:33PM +0000, David Laight wrote:
> On Mon, 27 Oct 2025 15:34:51 +0100
> Andy Shevchenko <andriy.shevchenko@...ux.intel.com> wrote:
> 
> > There are a few drivers that want to have this value, and at least one
> > known to come soon. Let's define a value for them.

> > +/* Value of π * 10⁹ */
> > +#define PI	3141592653LL
> 
> Is that the right value?
> IIRC the next digits are 58979 (I used to know the next few as well)
> which means it should be rounded up.

Right, today I have the same thought that actually ChromeOS driver has a
off-by-one issue there.

Btw, do you know if we can have compile-time divisions that can make 32-bit
constants out of the 64-bit input? DIV_ROUND_CLOSEST_ULL() doesn't seem allow
that.

-- 
With Best Regards,
Andy Shevchenko



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ