diff mbox series

staging: media: imx: imx7-media-csi: Fix parenthesis alignment

Message ID 20221024150744.72641-1-lima.gabriel.luz@gmail.com
State Superseded
Headers show
Series staging: media: imx: imx7-media-csi: Fix parenthesis alignment | expand

Commit Message

Gabriel Lima Luz Oct. 24, 2022, 3:07 p.m. UTC
Adhere to Linux kernel coding style.

Reported by checkpatch:

CHECK: Alignment should match open parenthesis

Signed-off-by: Gabriel Lima Luz <lima.gabriel.luz@gmail.com>
---
 drivers/staging/media/imx/imx7-media-csi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Laurent Pinchart Oct. 24, 2022, 3:12 p.m. UTC | #1
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@gmail.com>
> ---
>  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;
>  	}
diff mbox series

Patch

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);
 
 		csi->cc[i] = cc;
 	}