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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aQB6JdePRUuegGxn@smile.fi.intel.com>
Date: Tue, 28 Oct 2025 10:09:09 +0200
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: David Lechner <dlechner@...libre.com>
Cc: Jonathan Cameron <jic23@...nel.org>, linux-iio@...r.kernel.org,
	chrome-platform@...ts.linux.dev, linux-kernel@...r.kernel.org,
	linux-media@...r.kernel.org,
	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 09:59:10AM -0500, David Lechner wrote:
> On 10/27/25 9:52 AM, Jonathan Cameron 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.
> > 
> > Is there any way we can make the x10^9 bit obvious in the naming?  Or do
> > something a bit nasty like defining a macro along the lines of
> > 
> > PI(scale)?
> > e.g. PI(NANO), PI(10000) 
> > 
> This was my first thought when looking at this as well.
> 
> Or something like PI_x10(6).

We need a good macro that may _at compile-time_ convert 64-bit input to 32-bit
value that may be suitable for 32-bit arithmetics / architectures.


-- 
With Best Regards,
Andy Shevchenko



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ