From: Devarsh Thakkar <devarsht@ti.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Jani Nikula <jani.nikula@intel.com>, <mchehab@kernel.org>,
<hverkuil-cisco@xs4all.nl>, <linux-media@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, <benjamin.gaignard@collabora.com>,
<sebastian.fricke@collabora.com>, <akpm@linux-foundation.org>,
<gregkh@linuxfoundation.org>, <adobriyan@gmail.com>,
<p.zabel@pengutronix.de>, <airlied@gmail.com>, <daniel@ffwll.ch>,
<dri-devel@lists.freedesktop.org>,
<laurent.pinchart@ideasonboard.com>, <praneeth@ti.com>,
<nm@ti.com>, <vigneshr@ti.com>, <a-bhatia1@ti.com>,
<j-luthra@ti.com>, <b-brnich@ti.com>, <detheridge@ti.com>,
<p-mantena@ti.com>, <vijayp@ti.com>, <andrzej.p@collabora.com>,
<nicolas@ndufresne.ca>
Subject: Re: [PATCH v7 6/8] math.h Add macros to round to closest specified power of 2
Date: Mon, 13 May 2024 18:34:19 +0530 [thread overview]
Message-ID: <d63ae19c-9316-3a4c-e9ed-1672ace068b6@ti.com> (raw)
In-Reply-To: <ZkIG0-01pz632l4R@smile.fi.intel.com>
Hi Andy,
On 13/05/24 17:55, Andy Shevchenko wrote:
> On Mon, May 13, 2024 at 04:55:58PM +0530, Devarsh Thakkar wrote:
>> On 13/05/24 14:29, Andy Shevchenko wrote:
>>> On Sat, May 11, 2024 at 11:11:14PM +0530, Devarsh Thakkar wrote:
>>>> On 10/05/24 20:45, Jani Nikula wrote:
>
> [...]
> - align naming (with the existing round*() macros)
I think round_closest_up/round_closest_down align already and inspired by the
existing naming convention used for round*() and DIV_ROUND_CLOSEST() macros in
math.h as explained below (copied from my previous reply [1])
"Coming back to naming, this is as per existing convention used for naming
round_up, round_down (notice the `_` being used for macros working with pow of
2) and DIV_ROUND_CLOSEST (notice the work `closest` used to specify the answer
to be nearest to specified value)"
But do let me know if you have any other suggestions for naming?
> - add examples into commit message of the math.h patch
Agreed
> - add test cases (you need to create lib/math_kunit.c for that)
Agreed.
> - elaborate in the commit message of the IPU3 change what you posted above
> (some kind of a summary)
Agreed.
[1]: https://lore.kernel.org/all/ZkIG0-01pz632l4R@smile.fi.intel.com/
Regards
Devarsh
next prev parent reply other threads:[~2024-05-13 13:04 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-09 18:39 [PATCH v7 6/8] math.h Add macros to round to closest specified power of 2 Devarsh Thakkar
2024-05-10 15:01 ` Andy Shevchenko
2024-05-10 15:15 ` Jani Nikula
2024-05-10 15:28 ` Andy Shevchenko
2024-05-11 17:41 ` Devarsh Thakkar
2024-05-13 8:59 ` Andy Shevchenko
2024-05-13 11:25 ` Devarsh Thakkar
2024-05-13 12:25 ` Andy Shevchenko
2024-05-13 13:04 ` Devarsh Thakkar [this message]
2024-05-13 13:14 ` Andy Shevchenko
2024-05-11 17:26 ` Devarsh Thakkar
2024-05-12 4:46 ` Alexey Dobriyan
2024-05-13 8:55 ` Andy Shevchenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d63ae19c-9316-3a4c-e9ed-1672ace068b6@ti.com \
--to=devarsht@ti.com \
--cc=a-bhatia1@ti.com \
--cc=adobriyan@gmail.com \
--cc=airlied@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=andrzej.p@collabora.com \
--cc=b-brnich@ti.com \
--cc=benjamin.gaignard@collabora.com \
--cc=daniel@ffwll.ch \
--cc=detheridge@ti.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=gregkh@linuxfoundation.org \
--cc=hverkuil-cisco@xs4all.nl \
--cc=j-luthra@ti.com \
--cc=jani.nikula@intel.com \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=nicolas@ndufresne.ca \
--cc=nm@ti.com \
--cc=p-mantena@ti.com \
--cc=p.zabel@pengutronix.de \
--cc=praneeth@ti.com \
--cc=sebastian.fricke@collabora.com \
--cc=vigneshr@ti.com \
--cc=vijayp@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).