[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aFpkmjlc-14xxkn4@smile.fi.intel.com>
Date: Tue, 24 Jun 2025 11:40:58 +0300
From: Andy Shevchenko <andriy.shevchenko@...el.com>
To: Christian Marangi <ansuelsmth@...il.com>
Cc: Andy Shevchenko <andy.shevchenko@...il.com>,
Uwe Kleine-König <ukleinek@...nel.org>,
Lukas Wunner <lukas@...ner.de>,
AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>,
Herbert Xu <herbert@...dor.apana.org.au>,
Andy Shevchenko <andy@...nel.org>,
Jonathan Cameron <Jonathan.Cameron@...wei.com>,
linux-kernel@...r.kernel.org, linux-pwm@...r.kernel.org
Subject: Re: [PATCH v15 1/2] math.h: provide rounddown_ull variant for
rounddown MACRO
On Tue, Jun 24, 2025 at 09:45:08AM +0200, Christian Marangi wrote:
> On Tue, Jun 24, 2025 at 09:08:32AM +0300, Andy Shevchenko wrote:
> > On Tue, Jun 24, 2025 at 12:11 AM Christian Marangi <ansuelsmth@...il.com> wrote:
...
> > rounddown(),
>
> For this and the other... Is it correct to use () for MACRO?
> I assume () should be used only for functions.
When it takes argument, yes. When it doesn't then you don't put it.
...
> > rounddown_ull()
Btw, I don't like name for this, it's better to be in math64 with the u64 or similar suffixes like it's used for div/mul variants.
Also add a roundup to make the API symmetrical (yes, it's okay that it has no
users, it's a macro and doesn't consume memory at run-time).
...
> > > - Add this patch
> >
> > Why are math64 APIs not usable here?
>
> There isn't a rounddown API for math64.
Then implementing it there (in math64.h) looks to me natural thingy that will
implicitly suggest this.
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists