Re: [PATCH] staging: media: meson: vdec: matched alignment with parenthesis

From: Hans Verkuil
Date: Fri Apr 09 2021 - 03:30:40 EST


On 09/04/2021 00:19, Mitali Borkar wrote:
> Matched alignment with open parenthesis to meet linux kernel coding
> style.
> Reported by checkpatch
>
> Signed-off-by: Mitali Borkar <mitaliborkar810@xxxxxxxxx>
> ---
> drivers/staging/media/meson/vdec/codec_mpeg12.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/media/meson/vdec/codec_mpeg12.c b/drivers/staging/media/meson/vdec/codec_mpeg12.c
> index 48869cc3d973..21e93a13356c 100644
> --- a/drivers/staging/media/meson/vdec/codec_mpeg12.c
> +++ b/drivers/staging/media/meson/vdec/codec_mpeg12.c
> @@ -81,7 +81,7 @@ static int codec_mpeg12_start(struct amvdec_session *sess)
> }
>
> ret = amvdec_set_canvases(sess, (u32[]){ AV_SCRATCH_0, 0 },
> - (u32[]){ 8, 0 });
> + (u32[]){ 8, 0 });

The alignment here is because the 2nd and 3rd arguments belong together, so
the alignment indicates that. In order to keep that I would add a newline
after 'sess,' as well. Same as is done in meson/vdec/codec_h264.c.

Regards,

Hans

> if (ret)
> goto free_workspace;
>
>