aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/davinci
diff options
context:
space:
mode:
authorJulia Lawall <julia@diku.dk>2010-08-05 16:22:44 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-10-20 23:04:48 -0400
commit473d80247332b818caf6d25ed3eaaa10d3dfcfb7 (patch)
treecd2d42ef642b77b4709104791560948d29c94ca5 /drivers/media/video/davinci
parent6c2d4dd139de417d18151b98c157aa35387038a3 (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>
Diffstat (limited to 'drivers/media/video/davinci')
-rw-r--r--drivers/media/video/davinci/vpif_capture.c3
-rw-r--r--drivers/media/video/davinci/vpif_display.c3
2 files changed, 4 insertions, 2 deletions
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: