public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Devarsh Thakkar <devarsht@ti.com>
Cc: 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,
	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,
	akpm@linux-foundation.org, gregkh@linuxfoundation.org,
	adobriyan@gmail.com, jani.nikula@intel.com
Subject: Re: [PATCH v7 8/8] gpu: ipu-v3: Use generic macro for rounding to nearest multiple
Date: Fri, 10 May 2024 18:03:52 +0300	[thread overview]
Message-ID: <Zj43WDlT1aFpgdVv@smile.fi.intel.com> (raw)
In-Reply-To: <20240509184010.4065359-1-devarsht@ti.com>

On Fri, May 10, 2024 at 12:10:10AM +0530, Devarsh Thakkar wrote:
> Use generic macro round_closest_up for rounding to nearest multiple instead

round_closest_up()

We refer to the functions as func().

> of using local function.

...

> @@ -565,7 +563,7 @@ static void find_best_seam(struct ipu_image_convert_ctx *ctx,
>  		 * The closest input sample position that we could actually
>  		 * start the input tile at, 19.13 fixed point.
>  		 */
> -		in_pos_aligned = round_closest(in_pos, 8192U * in_align);
> +		in_pos_aligned = round_closest_up(in_pos, 8192U * in_align);
>  		/* Convert 19.13 fixed point to integer */
>  		in_pos_rounded = in_pos_aligned / 8192U;

Oh, these seems to be better to use either ALIGN*(), or PFN_*() / PAGE_*()
families of macros. What the semantic of 8192 is?

-- 
With Best Regards,
Andy Shevchenko



  reply	other threads:[~2024-05-10 15:04 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-09 18:40 [PATCH v7 8/8] gpu: ipu-v3: Use generic macro for rounding to nearest multiple Devarsh Thakkar
2024-05-10 15:03 ` Andy Shevchenko [this message]
2024-05-10 15:16   ` Laurent Pinchart
2024-05-10 15:33     ` Andy Shevchenko
2024-05-11 17:49   ` Devarsh Thakkar

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=Zj43WDlT1aFpgdVv@smile.fi.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=a-bhatia1@ti.com \
    --cc=adobriyan@gmail.com \
    --cc=airlied@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=andrzej.p@collabora.com \
    --cc=b-brnich@ti.com \
    --cc=benjamin.gaignard@collabora.com \
    --cc=daniel@ffwll.ch \
    --cc=detheridge@ti.com \
    --cc=devarsht@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