Subject: Re: [PATCH 2/4] media: mediatek: vcodec: Drop unnecessary variable

Il 13/11/23 13:26, Fei Shao ha scritto:
> It's unclear why only mem->size has local copies without particular
> usage in mtk_vcodec_mem_alloc() and mtk_vcodec_mem_free(), and they
> seem removable.
>
> Drop them to make the code visually consistent, and update printk format
> identifier accordingly.
>
> Signed-off-by: Fei Shao <[email protected]>

That's probably just about personal preferences, as mem->size is not expected
to change during the flow of those functions.

That said, as much as you, I prefer not having this local copy as it's using
(a very small amount of) memory for no real reason anyway, so:

Reviewed-by: AngeloGioacchino Del Regno <[email protected]>



2023-12-07 11:16:03

by Fei Shao

[permalink] [raw]
Subject: Re: [PATCH 2/4] media: mediatek: vcodec: Drop unnecessary variable

Hi Angelo,

On Wed, Dec 6, 2023 at 6:19 PM AngeloGioacchino Del Regno
<[email protected]> wrote:
>
> Il 13/11/23 13:26, Fei Shao ha scritto:
> > It's unclear why only mem->size has local copies without particular
> > usage in mtk_vcodec_mem_alloc() and mtk_vcodec_mem_free(), and they
> > seem removable.
> >
> > Drop them to make the code visually consistent, and update printk format
> > identifier accordingly.
> >
> > Signed-off-by: Fei Shao <[email protected]>
>
> That's probably just about personal preferences, as mem->size is not expected
> to change during the flow of those functions.
>
> That said, as much as you, I prefer not having this local copy as it's using
> (a very small amount of) memory for no real reason anyway, so:

Yes, and I think I should have mentioned this in the commit message...
I'll revise that in the next version.

Thanks,
Fei





>
> Reviewed-by: AngeloGioacchino Del Regno <[email protected]>
>
>