[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CADnq5_PKSPAPXxBjAw39fMXsDsvyd4sHWByAzmA4mb71=rnPcw@mail.gmail.com>
Date: Tue, 13 Jul 2021 09:20:59 -0400
From: Alex Deucher <alexdeucher@...il.com>
To: Salah Triki <salah.triki@...il.com>
Cc: Philipp Zabel <p.zabel@...gutronix.de>,
LKML <linux-kernel@...r.kernel.org>,
Maling list - DRI developers
<dri-devel@...ts.freedesktop.org>
Subject: Re: [PATCH] use swap()
On Tue, Jul 13, 2021 at 3:09 AM Salah Triki <salah.triki@...il.com> wrote:
>
> Use swap() instead of implementing it since it makes code more clean.
>
> Signed-off-by: Salah Triki <salah.triki@...il.com>
Patches for this driver generally have the following prefix in the subject:
gpu: ipu-v3:
Alex
> ---
> drivers/gpu/ipu-v3/ipu-image-convert.c | 7 ++-----
> 1 file changed, 2 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/ipu-v3/ipu-image-convert.c b/drivers/gpu/ipu-v3/ipu-image-convert.c
> index aa1d4b6d278f..5f730cd6009d 100644
> --- a/drivers/gpu/ipu-v3/ipu-image-convert.c
> +++ b/drivers/gpu/ipu-v3/ipu-image-convert.c
> @@ -1021,11 +1021,8 @@ static int calc_tile_offsets_planar(struct ipu_image_convert_ctx *ctx,
>
> u_off = y_size - y_off + uv_off;
> v_off = (fmt->uv_packed) ? 0 : u_off + uv_size;
> - if (fmt->uv_swapped) {
> - tmp = u_off;
> - u_off = v_off;
> - v_off = tmp;
> - }
> + if (fmt->uv_swapped)
> + swap(u_off, v_off);
>
> image->tile[tile].offset = y_off;
> image->tile[tile].u_off = u_off;
> --
> 2.25.1
>
Powered by blists - more mailing lists