Re: [PATCH] staging: media: imx: imx7-media-csi: Fix parenthesis alignment

From: Laurent Pinchart
Date: Mon Oct 24 2022 - 12:36:57 EST


Hi Gabriel,

Thank you for the patch.

On Mon, Oct 24, 2022 at 12:07:44PM -0300, Gabriel Lima Luz wrote:
> Adhere to Linux kernel coding style.
>
> Reported by checkpatch:
>
> CHECK: Alignment should match open parenthesis
>
> Signed-off-by: Gabriel Lima Luz <lima.gabriel.luz@xxxxxxxxx>
> ---
> drivers/staging/media/imx/imx7-media-csi.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/media/imx/imx7-media-csi.c b/drivers/staging/media/imx/imx7-media-csi.c
> index cbc66ef0eda8..9ad7205a3f2f 100644
> --- a/drivers/staging/media/imx/imx7-media-csi.c
> +++ b/drivers/staging/media/imx/imx7-media-csi.c
> @@ -1704,7 +1704,7 @@ static int imx7_csi_init_cfg(struct v4l2_subdev *sd,
> mf->xfer_func = V4L2_MAP_XFER_FUNC_DEFAULT(mf->colorspace);
> mf->ycbcr_enc = V4L2_MAP_YCBCR_ENC_DEFAULT(mf->colorspace);
> mf->quantization = V4L2_MAP_QUANTIZATION_DEFAULT(!cc->yuv,
> - mf->colorspace, mf->ycbcr_enc);
> + mf->colorspace, mf->ycbcr_enc);

I think this is a valid exception to the coding style, to increase
readability by avoiding long lines. Otherwise, I'd wrap it as

mf->quantization = V4L2_MAP_QUANTIZATION_DEFAULT(!cc->yuv,
mf->colorspace,
mf->ycbcr_enc);

>
> csi->cc[i] = cc;
> }

--
Regards,

Laurent Pinchart