diff options
author | Julia Lawall <julia@diku.dk> | 2010-08-05 16:22:44 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-10-20 23:04:48 -0400 |
commit | 473d80247332b818caf6d25ed3eaaa10d3dfcfb7 (patch) | |
tree | cd2d42ef642b77b4709104791560948d29c94ca5 | |
parent | 6c2d4dd139de417d18151b98c157aa35387038a3 (diff) |
V4L/DVB: drivers/media/video: Adjust confusing if indentation
In cx23885/cx23885-video.c, cx88/cx88-video.c, davinci/vpif_capture.c, and
davinci/vpif_display.c, group the aligned code into a single if branch.
In saa7134/saa7134-video.c, outdent the code following the if.
The semantic match that finds this problem is as follows:
(http://coccinelle.lip6.fr/)
// <smpl>
@r disable braces4@
position p1,p2;
statement S1,S2;
@@
(
if (...) { ... }
|
if (...) S1@p1 S2@p2
)
@script:python@
p1 << r.p1;
p2 << r.p2;
@@
if (p1[0].column == p2[0].column):
cocci.print_main("branch",p1)
cocci.print_secs("after",p2)
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r-- | drivers/media/video/cx23885/cx23885-video.c | 3 | ||||
-rw-r--r-- | drivers/media/video/cx88/cx88-video.c | 3 | ||||
-rw-r--r-- | drivers/media/video/davinci/vpif_capture.c | 3 | ||||
-rw-r--r-- | drivers/media/video/davinci/vpif_display.c | 3 | ||||
-rw-r--r-- | drivers/media/video/saa7134/saa7134-video.c | 2 |
5 files changed, 9 insertions, 5 deletions
diff --git a/drivers/media/video/cx23885/cx23885-video.c b/drivers/media/video/cx23885/cx23885-video.c index da66e5f8d91d..5aadc1d1956e 100644 --- a/drivers/media/video/cx23885/cx23885-video.c +++ b/drivers/media/video/cx23885/cx23885-video.c | |||
@@ -1165,9 +1165,10 @@ static int cx23885_enum_input(struct cx23885_dev *dev, struct v4l2_input *i) | |||
1165 | i->type = V4L2_INPUT_TYPE_CAMERA; | 1165 | i->type = V4L2_INPUT_TYPE_CAMERA; |
1166 | strcpy(i->name, iname[INPUT(n)->type]); | 1166 | strcpy(i->name, iname[INPUT(n)->type]); |
1167 | if ((CX23885_VMUX_TELEVISION == INPUT(n)->type) || | 1167 | if ((CX23885_VMUX_TELEVISION == INPUT(n)->type) || |
1168 | (CX23885_VMUX_CABLE == INPUT(n)->type)) | 1168 | (CX23885_VMUX_CABLE == INPUT(n)->type)) { |
1169 | i->type = V4L2_INPUT_TYPE_TUNER; | 1169 | i->type = V4L2_INPUT_TYPE_TUNER; |
1170 | i->std = CX23885_NORMS; | 1170 | i->std = CX23885_NORMS; |
1171 | } | ||
1171 | return 0; | 1172 | return 0; |
1172 | } | 1173 | } |
1173 | 1174 | ||
diff --git a/drivers/media/video/cx88/cx88-video.c b/drivers/media/video/cx88/cx88-video.c index 0fab65c3ab39..4fba913edb1b 100644 --- a/drivers/media/video/cx88/cx88-video.c +++ b/drivers/media/video/cx88/cx88-video.c | |||
@@ -1267,9 +1267,10 @@ int cx88_enum_input (struct cx88_core *core,struct v4l2_input *i) | |||
1267 | i->type = V4L2_INPUT_TYPE_CAMERA; | 1267 | i->type = V4L2_INPUT_TYPE_CAMERA; |
1268 | strcpy(i->name,iname[INPUT(n).type]); | 1268 | strcpy(i->name,iname[INPUT(n).type]); |
1269 | if ((CX88_VMUX_TELEVISION == INPUT(n).type) || | 1269 | if ((CX88_VMUX_TELEVISION == INPUT(n).type) || |
1270 | (CX88_VMUX_CABLE == INPUT(n).type)) | 1270 | (CX88_VMUX_CABLE == INPUT(n).type)) { |
1271 | i->type = V4L2_INPUT_TYPE_TUNER; | 1271 | i->type = V4L2_INPUT_TYPE_TUNER; |
1272 | i->std = CX88_NORMS; | 1272 | i->std = CX88_NORMS; |
1273 | } | ||
1273 | return 0; | 1274 | return 0; |
1274 | } | 1275 | } |
1275 | EXPORT_SYMBOL(cx88_enum_input); | 1276 | EXPORT_SYMBOL(cx88_enum_input); |
diff --git a/drivers/media/video/davinci/vpif_capture.c b/drivers/media/video/davinci/vpif_capture.c index a7f48b53d3fc..2b424731f133 100644 --- a/drivers/media/video/davinci/vpif_capture.c +++ b/drivers/media/video/davinci/vpif_capture.c | |||
@@ -1030,9 +1030,10 @@ static int vpif_qbuf(struct file *file, void *priv, struct v4l2_buffer *buf) | |||
1030 | goto qbuf_exit; | 1030 | goto qbuf_exit; |
1031 | 1031 | ||
1032 | if ((VIDEOBUF_NEEDS_INIT != buf1->state) | 1032 | if ((VIDEOBUF_NEEDS_INIT != buf1->state) |
1033 | && (buf1->baddr != tbuf.m.userptr)) | 1033 | && (buf1->baddr != tbuf.m.userptr)) { |
1034 | vpif_buffer_release(&common->buffer_queue, buf1); | 1034 | vpif_buffer_release(&common->buffer_queue, buf1); |
1035 | buf1->baddr = tbuf.m.userptr; | 1035 | buf1->baddr = tbuf.m.userptr; |
1036 | } | ||
1036 | break; | 1037 | break; |
1037 | 1038 | ||
1038 | default: | 1039 | default: |
diff --git a/drivers/media/video/davinci/vpif_display.c b/drivers/media/video/davinci/vpif_display.c index da07607cbc55..4770fda3a199 100644 --- a/drivers/media/video/davinci/vpif_display.c +++ b/drivers/media/video/davinci/vpif_display.c | |||
@@ -935,9 +935,10 @@ static int vpif_qbuf(struct file *file, void *priv, struct v4l2_buffer *buf) | |||
935 | goto qbuf_exit; | 935 | goto qbuf_exit; |
936 | 936 | ||
937 | if ((VIDEOBUF_NEEDS_INIT != buf1->state) | 937 | if ((VIDEOBUF_NEEDS_INIT != buf1->state) |
938 | && (buf1->baddr != tbuf.m.userptr)) | 938 | && (buf1->baddr != tbuf.m.userptr)) { |
939 | vpif_buffer_release(&common->buffer_queue, buf1); | 939 | vpif_buffer_release(&common->buffer_queue, buf1); |
940 | buf1->baddr = tbuf.m.userptr; | 940 | buf1->baddr = tbuf.m.userptr; |
941 | } | ||
941 | break; | 942 | break; |
942 | 943 | ||
943 | default: | 944 | default: |
diff --git a/drivers/media/video/saa7134/saa7134-video.c b/drivers/media/video/saa7134/saa7134-video.c index 45f0ac8f3c0f..645224cfd887 100644 --- a/drivers/media/video/saa7134/saa7134-video.c +++ b/drivers/media/video/saa7134/saa7134-video.c | |||
@@ -1825,7 +1825,7 @@ static int saa7134_querycap(struct file *file, void *priv, | |||
1825 | 1825 | ||
1826 | if ((tuner_type == TUNER_ABSENT) || (tuner_type == UNSET)) | 1826 | if ((tuner_type == TUNER_ABSENT) || (tuner_type == UNSET)) |
1827 | cap->capabilities &= ~V4L2_CAP_TUNER; | 1827 | cap->capabilities &= ~V4L2_CAP_TUNER; |
1828 | return 0; | 1828 | return 0; |
1829 | } | 1829 | } |
1830 | 1830 | ||
1831 | int saa7134_s_std_internal(struct saa7134_dev *dev, struct saa7134_fh *fh, v4l2_std_id *id) | 1831 | int saa7134_s_std_internal(struct saa7134_dev *dev, struct saa7134_fh *fh, v4l2_std_id *id) |