diff mbox series

[01/20] media: coda: use semicolons rather than commas to separate statements

Message ID 1601385283-26144-2-git-send-email-Julia.Lawall@inria.fr
State Accepted
Commit 67120129f95d90cc1b8875ed4f9bfaa21b914356
Headers show
Series [01/20] media: coda: use semicolons rather than commas to separate statements | expand

Commit Message

Julia Lawall Sept. 29, 2020, 1:14 p.m. UTC
Replace commas with semicolons.  Commas introduce unnecessary
variability in the code structure and are hard to see.  What is done
is essentially described by the following Coccinelle semantic patch
(http://coccinelle.lip6.fr/):

// <smpl>
@@ expression e1,e2; @@
e1
-,
+;
e2
... when any
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>

---
 drivers/media/platform/coda/coda-common.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Philipp Zabel Sept. 29, 2020, 2:06 p.m. UTC | #1
On Tue, 2020-09-29 at 15:14 +0200, Julia Lawall wrote:
> Replace commas with semicolons.  Commas introduce unnecessary

> variability in the code structure and are hard to see.  What is done

> is essentially described by the following Coccinelle semantic patch

> (http://coccinelle.lip6.fr/):

> 

> // <smpl>

> @@ expression e1,e2; @@

> e1

> -,

> +;

> e2

> ... when any

> // </smpl>

> 

> Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>

> 

> ---

>  drivers/media/platform/coda/coda-common.c |    2 +-

>  1 file changed, 1 insertion(+), 1 deletion(-)

> 

> diff --git a/drivers/media/platform/coda/coda-common.c b/drivers/media/platform/coda/coda-common.c

> index eeba6c060981..1bb16cc0a823 100644

> --- a/drivers/media/platform/coda/coda-common.c

> +++ b/drivers/media/platform/coda/coda-common.c

> @@ -2861,7 +2861,7 @@ static int coda_register_device(struct coda_dev *dev, int i)

>  	strscpy(vfd->name, dev->devtype->vdevs[i]->name, sizeof(vfd->name));

>  	vfd->fops	= &coda_fops;

>  	vfd->ioctl_ops	= &coda_ioctl_ops;

> -	vfd->release	= video_device_release_empty,

> +	vfd->release	= video_device_release_empty;

>  	vfd->lock	= &dev->dev_mutex;

>  	vfd->v4l2_dev	= &dev->v4l2_dev;

>  	vfd->vfl_dir	= VFL_DIR_M2M;

> 

> 


Thank you,

Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>


regards
Philipp
diff mbox series

Patch

diff --git a/drivers/media/platform/coda/coda-common.c b/drivers/media/platform/coda/coda-common.c
index eeba6c060981..1bb16cc0a823 100644
--- a/drivers/media/platform/coda/coda-common.c
+++ b/drivers/media/platform/coda/coda-common.c
@@ -2861,7 +2861,7 @@  static int coda_register_device(struct coda_dev *dev, int i)
 	strscpy(vfd->name, dev->devtype->vdevs[i]->name, sizeof(vfd->name));
 	vfd->fops	= &coda_fops;
 	vfd->ioctl_ops	= &coda_ioctl_ops;
-	vfd->release	= video_device_release_empty,
+	vfd->release	= video_device_release_empty;
 	vfd->lock	= &dev->dev_mutex;
 	vfd->v4l2_dev	= &dev->v4l2_dev;
 	vfd->vfl_dir	= VFL_DIR_M2M;