Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

media: Fix indentation issues introduced by subdev-wide state struct

Commit 0d346d2a6f54 ("media: v4l2-subdev: add subdev-wide state struct")
applied a large media tree-wide change produced by coccinelle. It was so
large that a set of identical indentation issues went unnoticed during
review. Fix them.

While at it, and because it's easy to review both changes together, add
a trailing comma for the last (and only) struct member initialization of
the related structures, to avoid future changes should new fields need
to be initialized.

Fixes: 0d346d2a6f54 ("media: v4l2-subdev: add subdev-wide state struct")
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>

authored by

Laurent Pinchart and committed by
Hans Verkuil
a1e25987 a47a3ae5

+25 -25
+2 -2
drivers/media/pci/saa7134/saa7134-empress.c
··· 139 139 struct saa7134_dev *dev = video_drvdata(file); 140 140 struct v4l2_subdev_pad_config pad_cfg; 141 141 struct v4l2_subdev_state pad_state = { 142 - .pads = &pad_cfg 143 - }; 142 + .pads = &pad_cfg, 143 + }; 144 144 struct v4l2_subdev_format format = { 145 145 .which = V4L2_SUBDEV_FORMAT_TRY, 146 146 };
+2 -2
drivers/media/platform/atmel/atmel-isi.c
··· 587 587 struct v4l2_pix_format *pixfmt = &f->fmt.pix; 588 588 struct v4l2_subdev_pad_config pad_cfg = {}; 589 589 struct v4l2_subdev_state pad_state = { 590 - .pads = &pad_cfg 591 - }; 590 + .pads = &pad_cfg, 591 + }; 592 592 struct v4l2_subdev_format format = { 593 593 .which = V4L2_SUBDEV_FORMAT_TRY, 594 594 };
+2 -2
drivers/media/platform/intel/pxa_camera.c
··· 1794 1794 struct v4l2_pix_format *pix = &f->fmt.pix; 1795 1795 struct v4l2_subdev_pad_config pad_cfg; 1796 1796 struct v4l2_subdev_state pad_state = { 1797 - .pads = &pad_cfg 1798 - }; 1797 + .pads = &pad_cfg, 1798 + }; 1799 1799 struct v4l2_subdev_format format = { 1800 1800 .which = V4L2_SUBDEV_FORMAT_TRY, 1801 1801 };
+2 -2
drivers/media/platform/marvell/mcam-core.c
··· 1351 1351 struct v4l2_pix_format *pix = &fmt->fmt.pix; 1352 1352 struct v4l2_subdev_pad_config pad_cfg; 1353 1353 struct v4l2_subdev_state pad_state = { 1354 - .pads = &pad_cfg 1355 - }; 1354 + .pads = &pad_cfg, 1355 + }; 1356 1356 struct v4l2_subdev_format format = { 1357 1357 .which = V4L2_SUBDEV_FORMAT_TRY, 1358 1358 };
+2 -2
drivers/media/platform/renesas/renesas-ceu.c
··· 795 795 struct v4l2_subdev *v4l2_sd = ceu_sd->v4l2_sd; 796 796 struct v4l2_subdev_pad_config pad_cfg; 797 797 struct v4l2_subdev_state pad_state = { 798 - .pads = &pad_cfg 799 - }; 798 + .pads = &pad_cfg, 799 + }; 800 800 const struct ceu_fmt *ceu_fmt; 801 801 u32 mbus_code_old; 802 802 u32 mbus_code;
+7 -7
drivers/media/platform/rockchip/rkisp1/rkisp1-resizer.c
··· 123 123 unsigned int pad, u32 which) 124 124 { 125 125 struct v4l2_subdev_state state = { 126 - .pads = rsz->pad_cfg 127 - }; 126 + .pads = rsz->pad_cfg, 127 + }; 128 128 if (which == V4L2_SUBDEV_FORMAT_TRY) 129 129 return v4l2_subdev_get_try_format(&rsz->sd, sd_state, pad); 130 130 else ··· 137 137 unsigned int pad, u32 which) 138 138 { 139 139 struct v4l2_subdev_state state = { 140 - .pads = rsz->pad_cfg 141 - }; 140 + .pads = rsz->pad_cfg, 141 + }; 142 142 if (which == V4L2_SUBDEV_FORMAT_TRY) 143 143 return v4l2_subdev_get_try_crop(&rsz->sd, sd_state, pad); 144 144 else ··· 366 366 struct v4l2_subdev_pad_config dummy_cfg; 367 367 struct v4l2_subdev_state pad_state = { 368 368 .pads = &dummy_cfg 369 - }; 369 + }; 370 370 u32 pad = code->pad; 371 371 int ret; 372 372 ··· 733 733 static int rkisp1_rsz_register(struct rkisp1_resizer *rsz) 734 734 { 735 735 struct v4l2_subdev_state state = { 736 - .pads = rsz->pad_cfg 737 - }; 736 + .pads = rsz->pad_cfg, 737 + }; 738 738 static const char * const dev_names[] = { 739 739 RKISP1_RSZ_MP_DEV_NAME, 740 740 RKISP1_RSZ_SP_DEV_NAME
+2 -2
drivers/media/platform/via/via-camera.c
··· 845 845 int ret; 846 846 struct v4l2_subdev_pad_config pad_cfg; 847 847 struct v4l2_subdev_state pad_state = { 848 - .pads = &pad_cfg 849 - }; 848 + .pads = &pad_cfg, 849 + }; 850 850 struct v4l2_subdev_format format = { 851 851 .which = V4L2_SUBDEV_FORMAT_TRY, 852 852 };
+4 -4
drivers/staging/media/atomisp/pci/atomisp_cmd.c
··· 4254 4254 struct atomisp_sub_device *asd = atomisp_to_video_pipe(vdev)->asd; 4255 4255 struct v4l2_subdev_pad_config pad_cfg; 4256 4256 struct v4l2_subdev_state pad_state = { 4257 - .pads = &pad_cfg 4258 - }; 4257 + .pads = &pad_cfg, 4258 + }; 4259 4259 struct v4l2_subdev_format format = { 4260 4260 .which = V4L2_SUBDEV_FORMAT_TRY, 4261 4261 }; ··· 4882 4882 const struct atomisp_format_bridge *format; 4883 4883 struct v4l2_subdev_pad_config pad_cfg; 4884 4884 struct v4l2_subdev_state pad_state = { 4885 - .pads = &pad_cfg 4886 - }; 4885 + .pads = &pad_cfg, 4886 + }; 4887 4887 struct v4l2_subdev_format vformat = { 4888 4888 .which = V4L2_SUBDEV_FORMAT_TRY, 4889 4889 };
+2 -2
drivers/staging/media/deprecated/atmel/atmel-isc-base.c
··· 860 860 struct v4l2_pix_format *pixfmt = &f->fmt.pix; 861 861 struct v4l2_subdev_pad_config pad_cfg = {}; 862 862 struct v4l2_subdev_state pad_state = { 863 - .pads = &pad_cfg 864 - }; 863 + .pads = &pad_cfg, 864 + }; 865 865 struct v4l2_subdev_format format = { 866 866 .which = V4L2_SUBDEV_FORMAT_TRY, 867 867 };