All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/20] media: use semicolons rather than commas to separate statements
@ 2020-09-29 13:14 ` Julia Lawall
  0 siblings, 0 replies; 67+ messages in thread
From: Julia Lawall @ 2020-09-29 13:14 UTC (permalink / raw)
  To: linux-samsung-soc
  Cc: Valdis Klētnieks, Joe Perches, Thomas Gleixner,
	kernel-janitors, Mauro Carvalho Chehab, linux-media,
	linux-kernel, linux-arm-kernel

These patches replace commas by semicolons.  This was done using the
Coccinelle semantic patch (http://coccinelle.lip6.fr/) shown below.

This semantic patch ensures that commas inside for loop headers will not be
transformed.  It also doesn't touch macro definitions.

Coccinelle ensures that braces are added as needed when a single-statement
branch turns into a multi-statement one.

This semantic patch has a few false positives, for variable delcarations
such as:

LIST_HEAD(x), *y;

The semantic patch could be improved to avoid these, but for the moment
they have been removed manually (2 occurrences).

// <smpl>
@initialize:ocaml@
@@

let infunction p =
  (* avoid macros *)
  (List.hd p).current_element <> "something_else"

let combined p1 p2 =
  (List.hd p1).line_end = (List.hd p2).line ||
  (((List.hd p1).line_end < (List.hd p2).line) &&
   ((List.hd p1).col < (List.hd p2).col))

@bad@
statement S;
declaration d;
position p;
@@

S@p
d

// special cases where newlines are needed (hope for no more than 5)
@@
expression e1,e2;
statement S;
position p != bad.p;
position p1;
position p2 :
    script:ocaml(p1) { infunction p1 && combined p1 p2 };
@@

- e1@p1,@S@p e2@p2;
+ e1; e2;

@@
expression e1,e2;
statement S;
position p != bad.p;
position p1;
position p2 :
    script:ocaml(p1) { infunction p1 && combined p1 p2 };
@@

- e1@p1,@S@p e2@p2;
+ e1; e2;

@@
expression e1,e2;
statement S;
position p != bad.p;
position p1;
position p2 :
    script:ocaml(p1) { infunction p1 && combined p1 p2 };
@@

- e1@p1,@S@p e2@p2;
+ e1; e2;

@@
expression e1,e2;
statement S;
position p != bad.p;
position p1;
position p2 :
    script:ocaml(p1) { infunction p1 && combined p1 p2 };
@@

- e1@p1,@S@p e2@p2;
+ e1; e2;

@@
expression e1,e2;
statement S;
position p != bad.p;
position p1;
position p2 :
    script:ocaml(p1) { infunction p1 && combined p1 p2 };
@@

- e1@p1,@S@p e2@p2;
+ e1; e2;

@r@
expression e1,e2;
statement S;
position p != bad.p;
@@

e1 ,@S@p e2;

@@
expression e1,e2;
position p1;
position p2 :
    script:ocaml(p1) { infunction p1 && not(combined p1 p2) };
statement S;
position r.p;
@@

e1@p1
-,@S@p
+;
e2@p2
... when any
// </smpl>

---

 drivers/media/dvb-frontends/m88ds3103.c             |    6 ++---
 drivers/media/dvb-frontends/rtl2832.c               |   14 ++++++------
 drivers/media/dvb-frontends/ts2020.c                |   10 ++++-----
 drivers/media/i2c/msp3400-kthreads.c                |   12 +++++++---
 drivers/media/pci/bt8xx/bttv-cards.c                |    6 +++--
 drivers/media/pci/saa7134/saa7134-video.c           |    7 ++++--
 drivers/media/platform/coda/coda-common.c           |    2 -
 drivers/media/platform/exynos4-is/fimc-core.c       |    6 +++--
 drivers/media/platform/s3c-camif/camif-core.c       |    6 +++--
 drivers/media/platform/sunxi/sun4i-csi/sun4i_v4l2.c |    2 -
 drivers/media/radio/radio-sf16fmr2.c                |    2 -
 drivers/media/tuners/mt2060.c                       |    2 -
 drivers/media/usb/au0828/au0828-video.c             |    2 -
 drivers/media/usb/dvb-usb-v2/dvbsky.c               |   22 ++++++++++----------
 drivers/media/usb/dvb-usb-v2/lmedm04.c              |    2 -
 drivers/media/usb/dvb-usb-v2/rtl28xxu.c             |    4 +--
 drivers/media/usb/dvb-usb/dib0700_devices.c         |    4 +--
 drivers/media/usb/em28xx/em28xx-audio.c             |   14 ++++++------
 drivers/media/usb/gspca/ov534.c                     |   12 +++++-----
 drivers/media/usb/pvrusb2/pvrusb2-devattr.c         |    2 -
 20 files changed, 75 insertions(+), 62 deletions(-)

^ permalink raw reply	[flat|nested] 67+ messages in thread

* [PATCH 00/20] media: use semicolons rather than commas to separate statements
@ 2020-09-29 13:14 ` Julia Lawall
  0 siblings, 0 replies; 67+ messages in thread
From: Julia Lawall @ 2020-09-29 13:14 UTC (permalink / raw)
  To: linux-samsung-soc
  Cc: Valdis Klētnieks, kernel-janitors, linux-kernel,
	Joe Perches, Thomas Gleixner, Mauro Carvalho Chehab,
	linux-arm-kernel, linux-media

These patches replace commas by semicolons.  This was done using the
Coccinelle semantic patch (http://coccinelle.lip6.fr/) shown below.

This semantic patch ensures that commas inside for loop headers will not be
transformed.  It also doesn't touch macro definitions.

Coccinelle ensures that braces are added as needed when a single-statement
branch turns into a multi-statement one.

This semantic patch has a few false positives, for variable delcarations
such as:

LIST_HEAD(x), *y;

The semantic patch could be improved to avoid these, but for the moment
they have been removed manually (2 occurrences).

// <smpl>
@initialize:ocaml@
@@

let infunction p   (* avoid macros *)
  (List.hd p).current_element <> "something_else"

let combined p1 p2   (List.hd p1).line_end = (List.hd p2).line ||
  (((List.hd p1).line_end < (List.hd p2).line) &&
   ((List.hd p1).col < (List.hd p2).col))

@bad@
statement S;
declaration d;
position p;
@@

S@p
d

// special cases where newlines are needed (hope for no more than 5)
@@
expression e1,e2;
statement S;
position p != bad.p;
position p1;
position p2 :
    script:ocaml(p1) { infunction p1 && combined p1 p2 };
@@

- e1@p1,@S@p e2@p2;
+ e1; e2;

@@
expression e1,e2;
statement S;
position p != bad.p;
position p1;
position p2 :
    script:ocaml(p1) { infunction p1 && combined p1 p2 };
@@

- e1@p1,@S@p e2@p2;
+ e1; e2;

@@
expression e1,e2;
statement S;
position p != bad.p;
position p1;
position p2 :
    script:ocaml(p1) { infunction p1 && combined p1 p2 };
@@

- e1@p1,@S@p e2@p2;
+ e1; e2;

@@
expression e1,e2;
statement S;
position p != bad.p;
position p1;
position p2 :
    script:ocaml(p1) { infunction p1 && combined p1 p2 };
@@

- e1@p1,@S@p e2@p2;
+ e1; e2;

@@
expression e1,e2;
statement S;
position p != bad.p;
position p1;
position p2 :
    script:ocaml(p1) { infunction p1 && combined p1 p2 };
@@

- e1@p1,@S@p e2@p2;
+ e1; e2;

@r@
expression e1,e2;
statement S;
position p != bad.p;
@@

e1 ,@S@p e2;

@@
expression e1,e2;
position p1;
position p2 :
    script:ocaml(p1) { infunction p1 && not(combined p1 p2) };
statement S;
position r.p;
@@

e1@p1
-,@S@p
+;
e2@p2
... when any
// </smpl>

---

 drivers/media/dvb-frontends/m88ds3103.c             |    6 ++---
 drivers/media/dvb-frontends/rtl2832.c               |   14 ++++++------
 drivers/media/dvb-frontends/ts2020.c                |   10 ++++-----
 drivers/media/i2c/msp3400-kthreads.c                |   12 +++++++---
 drivers/media/pci/bt8xx/bttv-cards.c                |    6 +++--
 drivers/media/pci/saa7134/saa7134-video.c           |    7 ++++--
 drivers/media/platform/coda/coda-common.c           |    2 -
 drivers/media/platform/exynos4-is/fimc-core.c       |    6 +++--
 drivers/media/platform/s3c-camif/camif-core.c       |    6 +++--
 drivers/media/platform/sunxi/sun4i-csi/sun4i_v4l2.c |    2 -
 drivers/media/radio/radio-sf16fmr2.c                |    2 -
 drivers/media/tuners/mt2060.c                       |    2 -
 drivers/media/usb/au0828/au0828-video.c             |    2 -
 drivers/media/usb/dvb-usb-v2/dvbsky.c               |   22 ++++++++++----------
 drivers/media/usb/dvb-usb-v2/lmedm04.c              |    2 -
 drivers/media/usb/dvb-usb-v2/rtl28xxu.c             |    4 +--
 drivers/media/usb/dvb-usb/dib0700_devices.c         |    4 +--
 drivers/media/usb/em28xx/em28xx-audio.c             |   14 ++++++------
 drivers/media/usb/gspca/ov534.c                     |   12 +++++-----
 drivers/media/usb/pvrusb2/pvrusb2-devattr.c         |    2 -
 20 files changed, 75 insertions(+), 62 deletions(-)

^ permalink raw reply	[flat|nested] 67+ messages in thread

* [PATCH 00/20] media: use semicolons rather than commas to separate statements
@ 2020-09-29 13:14 ` Julia Lawall
  0 siblings, 0 replies; 67+ messages in thread
From: Julia Lawall @ 2020-09-29 13:14 UTC (permalink / raw)
  To: linux-samsung-soc
  Cc: Valdis Klētnieks, kernel-janitors, linux-kernel,
	Joe Perches, Thomas Gleixner, Mauro Carvalho Chehab,
	linux-arm-kernel, linux-media

These patches replace commas by semicolons.  This was done using the
Coccinelle semantic patch (http://coccinelle.lip6.fr/) shown below.

This semantic patch ensures that commas inside for loop headers will not be
transformed.  It also doesn't touch macro definitions.

Coccinelle ensures that braces are added as needed when a single-statement
branch turns into a multi-statement one.

This semantic patch has a few false positives, for variable delcarations
such as:

LIST_HEAD(x), *y;

The semantic patch could be improved to avoid these, but for the moment
they have been removed manually (2 occurrences).

// <smpl>
@initialize:ocaml@
@@

let infunction p =
  (* avoid macros *)
  (List.hd p).current_element <> "something_else"

let combined p1 p2 =
  (List.hd p1).line_end = (List.hd p2).line ||
  (((List.hd p1).line_end < (List.hd p2).line) &&
   ((List.hd p1).col < (List.hd p2).col))

@bad@
statement S;
declaration d;
position p;
@@

S@p
d

// special cases where newlines are needed (hope for no more than 5)
@@
expression e1,e2;
statement S;
position p != bad.p;
position p1;
position p2 :
    script:ocaml(p1) { infunction p1 && combined p1 p2 };
@@

- e1@p1,@S@p e2@p2;
+ e1; e2;

@@
expression e1,e2;
statement S;
position p != bad.p;
position p1;
position p2 :
    script:ocaml(p1) { infunction p1 && combined p1 p2 };
@@

- e1@p1,@S@p e2@p2;
+ e1; e2;

@@
expression e1,e2;
statement S;
position p != bad.p;
position p1;
position p2 :
    script:ocaml(p1) { infunction p1 && combined p1 p2 };
@@

- e1@p1,@S@p e2@p2;
+ e1; e2;

@@
expression e1,e2;
statement S;
position p != bad.p;
position p1;
position p2 :
    script:ocaml(p1) { infunction p1 && combined p1 p2 };
@@

- e1@p1,@S@p e2@p2;
+ e1; e2;

@@
expression e1,e2;
statement S;
position p != bad.p;
position p1;
position p2 :
    script:ocaml(p1) { infunction p1 && combined p1 p2 };
@@

- e1@p1,@S@p e2@p2;
+ e1; e2;

@r@
expression e1,e2;
statement S;
position p != bad.p;
@@

e1 ,@S@p e2;

@@
expression e1,e2;
position p1;
position p2 :
    script:ocaml(p1) { infunction p1 && not(combined p1 p2) };
statement S;
position r.p;
@@

e1@p1
-,@S@p
+;
e2@p2
... when any
// </smpl>

---

 drivers/media/dvb-frontends/m88ds3103.c             |    6 ++---
 drivers/media/dvb-frontends/rtl2832.c               |   14 ++++++------
 drivers/media/dvb-frontends/ts2020.c                |   10 ++++-----
 drivers/media/i2c/msp3400-kthreads.c                |   12 +++++++---
 drivers/media/pci/bt8xx/bttv-cards.c                |    6 +++--
 drivers/media/pci/saa7134/saa7134-video.c           |    7 ++++--
 drivers/media/platform/coda/coda-common.c           |    2 -
 drivers/media/platform/exynos4-is/fimc-core.c       |    6 +++--
 drivers/media/platform/s3c-camif/camif-core.c       |    6 +++--
 drivers/media/platform/sunxi/sun4i-csi/sun4i_v4l2.c |    2 -
 drivers/media/radio/radio-sf16fmr2.c                |    2 -
 drivers/media/tuners/mt2060.c                       |    2 -
 drivers/media/usb/au0828/au0828-video.c             |    2 -
 drivers/media/usb/dvb-usb-v2/dvbsky.c               |   22 ++++++++++----------
 drivers/media/usb/dvb-usb-v2/lmedm04.c              |    2 -
 drivers/media/usb/dvb-usb-v2/rtl28xxu.c             |    4 +--
 drivers/media/usb/dvb-usb/dib0700_devices.c         |    4 +--
 drivers/media/usb/em28xx/em28xx-audio.c             |   14 ++++++------
 drivers/media/usb/gspca/ov534.c                     |   12 +++++-----
 drivers/media/usb/pvrusb2/pvrusb2-devattr.c         |    2 -
 20 files changed, 75 insertions(+), 62 deletions(-)

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 67+ messages in thread

* [PATCH 01/20] media: coda: use semicolons rather than commas to separate statements
  2020-09-29 13:14 ` Julia Lawall
@ 2020-09-29 13:14   ` Julia Lawall
  -1 siblings, 0 replies; 67+ messages in thread
From: Julia Lawall @ 2020-09-29 13:14 UTC (permalink / raw)
  To: Philipp Zabel
  Cc: Valdis Klētnieks, Joe Perches, Thomas Gleixner,
	kernel-janitors, Mauro Carvalho Chehab, linux-media,
	linux-kernel

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;


^ permalink raw reply related	[flat|nested] 67+ messages in thread

* [PATCH 01/20] media: coda: use semicolons rather than commas to separate statements
@ 2020-09-29 13:14   ` Julia Lawall
  0 siblings, 0 replies; 67+ messages in thread
From: Julia Lawall @ 2020-09-29 13:14 UTC (permalink / raw)
  To: Philipp Zabel
  Cc: Valdis Klētnieks, Joe Perches, Thomas Gleixner,
	kernel-janitors, Mauro Carvalho Chehab, linux-media,
	linux-kernel

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;

^ permalink raw reply related	[flat|nested] 67+ messages in thread

* [PATCH 02/20] media: em28xx-audio: use semicolons rather than commas to separate statements
  2020-09-29 13:14 ` Julia Lawall
@ 2020-09-29 13:14   ` Julia Lawall
  -1 siblings, 0 replies; 67+ messages in thread
From: Julia Lawall @ 2020-09-29 13:14 UTC (permalink / raw)
  To: Mauro Carvalho Chehab
  Cc: Valdis Klētnieks, Joe Perches, Thomas Gleixner,
	kernel-janitors, linux-media, linux-kernel

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/usb/em28xx/em28xx-audio.c |   14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/media/usb/em28xx/em28xx-audio.c b/drivers/media/usb/em28xx/em28xx-audio.c
index dc968fd5ace9..4d5ab1433b44 100644
--- a/drivers/media/usb/em28xx/em28xx-audio.c
+++ b/drivers/media/usb/em28xx/em28xx-audio.c
@@ -583,9 +583,9 @@ static int em28xx_cvol_new(struct snd_card *card, struct em28xx *dev,
 	struct snd_kcontrol_new tmp;
 
 	memset(&tmp, 0, sizeof(tmp));
-	tmp.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
-	tmp.private_value = id,
-	tmp.name  = ctl_name,
+	tmp.iface = SNDRV_CTL_ELEM_IFACE_MIXER;
+	tmp.private_value = id;
+	tmp.name  = ctl_name;
 
 	/* Add Mute Control */
 	sprintf(ctl_name, "%s Switch", name);
@@ -600,16 +600,16 @@ static int em28xx_cvol_new(struct snd_card *card, struct em28xx *dev,
 		ctl_name, id);
 
 	memset(&tmp, 0, sizeof(tmp));
-	tmp.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
-	tmp.private_value = id,
-	tmp.name  = ctl_name,
+	tmp.iface = SNDRV_CTL_ELEM_IFACE_MIXER;
+	tmp.private_value = id;
+	tmp.name  = ctl_name;
 
 	/* Add Volume Control */
 	sprintf(ctl_name, "%s Volume", name);
 	tmp.get   = em28xx_vol_get;
 	tmp.put   = em28xx_vol_put;
 	tmp.info  = em28xx_vol_info;
-	tmp.tlv.p = em28xx_db_scale,
+	tmp.tlv.p = em28xx_db_scale;
 	kctl = snd_ctl_new1(&tmp, dev);
 	err = snd_ctl_add(card, kctl);
 	if (err < 0)


^ permalink raw reply related	[flat|nested] 67+ messages in thread

* [PATCH 02/20] media: em28xx-audio: use semicolons rather than commas to separate statements
@ 2020-09-29 13:14   ` Julia Lawall
  0 siblings, 0 replies; 67+ messages in thread
From: Julia Lawall @ 2020-09-29 13:14 UTC (permalink / raw)
  To: Mauro Carvalho Chehab
  Cc: Valdis Klētnieks, Joe Perches, Thomas Gleixner,
	kernel-janitors, linux-media, linux-kernel

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/usb/em28xx/em28xx-audio.c |   14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/media/usb/em28xx/em28xx-audio.c b/drivers/media/usb/em28xx/em28xx-audio.c
index dc968fd5ace9..4d5ab1433b44 100644
--- a/drivers/media/usb/em28xx/em28xx-audio.c
+++ b/drivers/media/usb/em28xx/em28xx-audio.c
@@ -583,9 +583,9 @@ static int em28xx_cvol_new(struct snd_card *card, struct em28xx *dev,
 	struct snd_kcontrol_new tmp;
 
 	memset(&tmp, 0, sizeof(tmp));
-	tmp.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
-	tmp.private_value = id,
-	tmp.name  = ctl_name,
+	tmp.iface = SNDRV_CTL_ELEM_IFACE_MIXER;
+	tmp.private_value = id;
+	tmp.name  = ctl_name;
 
 	/* Add Mute Control */
 	sprintf(ctl_name, "%s Switch", name);
@@ -600,16 +600,16 @@ static int em28xx_cvol_new(struct snd_card *card, struct em28xx *dev,
 		ctl_name, id);
 
 	memset(&tmp, 0, sizeof(tmp));
-	tmp.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
-	tmp.private_value = id,
-	tmp.name  = ctl_name,
+	tmp.iface = SNDRV_CTL_ELEM_IFACE_MIXER;
+	tmp.private_value = id;
+	tmp.name  = ctl_name;
 
 	/* Add Volume Control */
 	sprintf(ctl_name, "%s Volume", name);
 	tmp.get   = em28xx_vol_get;
 	tmp.put   = em28xx_vol_put;
 	tmp.info  = em28xx_vol_info;
-	tmp.tlv.p = em28xx_db_scale,
+	tmp.tlv.p = em28xx_db_scale;
 	kctl = snd_ctl_new1(&tmp, dev);
 	err = snd_ctl_add(card, kctl);
 	if (err < 0)

^ permalink raw reply related	[flat|nested] 67+ messages in thread

* [PATCH 03/20] media: rtl28xxu: use semicolons rather than commas to separate statements
  2020-09-29 13:14 ` Julia Lawall
@ 2020-09-29 13:14   ` Julia Lawall
  -1 siblings, 0 replies; 67+ messages in thread
From: Julia Lawall @ 2020-09-29 13:14 UTC (permalink / raw)
  To: Antti Palosaari
  Cc: Valdis Klētnieks, Joe Perches, Thomas Gleixner,
	kernel-janitors, Mauro Carvalho Chehab, linux-media,
	linux-kernel

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/usb/dvb-usb-v2/rtl28xxu.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/media/usb/dvb-usb-v2/rtl28xxu.c b/drivers/media/usb/dvb-usb-v2/rtl28xxu.c
index 91460e4d0c30..3952cc534b4a 100644
--- a/drivers/media/usb/dvb-usb-v2/rtl28xxu.c
+++ b/drivers/media/usb/dvb-usb-v2/rtl28xxu.c
@@ -955,7 +955,7 @@ static int rtl2832u_frontend_attach(struct dvb_usb_adapter *adap)
 			struct mn88472_config mn88472_config = {};
 
 			mn88472_config.fe = &adap->fe[1];
-			mn88472_config.i2c_wr_max = 22,
+			mn88472_config.i2c_wr_max = 22;
 			strscpy(info.type, "mn88472", I2C_NAME_SIZE);
 			mn88472_config.xtal = 20500000;
 			mn88472_config.ts_mode = SERIAL_TS_MODE;
@@ -980,7 +980,7 @@ static int rtl2832u_frontend_attach(struct dvb_usb_adapter *adap)
 			struct mn88473_config mn88473_config = {};
 
 			mn88473_config.fe = &adap->fe[1];
-			mn88473_config.i2c_wr_max = 22,
+			mn88473_config.i2c_wr_max = 22;
 			strscpy(info.type, "mn88473", I2C_NAME_SIZE);
 			info.addr = 0x18;
 			info.platform_data = &mn88473_config;


^ permalink raw reply related	[flat|nested] 67+ messages in thread

* [PATCH 03/20] media: rtl28xxu: use semicolons rather than commas to separate statements
@ 2020-09-29 13:14   ` Julia Lawall
  0 siblings, 0 replies; 67+ messages in thread
From: Julia Lawall @ 2020-09-29 13:14 UTC (permalink / raw)
  To: Antti Palosaari
  Cc: Valdis Klētnieks, Joe Perches, Thomas Gleixner,
	kernel-janitors, Mauro Carvalho Chehab, linux-media,
	linux-kernel

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/usb/dvb-usb-v2/rtl28xxu.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/media/usb/dvb-usb-v2/rtl28xxu.c b/drivers/media/usb/dvb-usb-v2/rtl28xxu.c
index 91460e4d0c30..3952cc534b4a 100644
--- a/drivers/media/usb/dvb-usb-v2/rtl28xxu.c
+++ b/drivers/media/usb/dvb-usb-v2/rtl28xxu.c
@@ -955,7 +955,7 @@ static int rtl2832u_frontend_attach(struct dvb_usb_adapter *adap)
 			struct mn88472_config mn88472_config = {};
 
 			mn88472_config.fe = &adap->fe[1];
-			mn88472_config.i2c_wr_max = 22,
+			mn88472_config.i2c_wr_max = 22;
 			strscpy(info.type, "mn88472", I2C_NAME_SIZE);
 			mn88472_config.xtal = 20500000;
 			mn88472_config.ts_mode = SERIAL_TS_MODE;
@@ -980,7 +980,7 @@ static int rtl2832u_frontend_attach(struct dvb_usb_adapter *adap)
 			struct mn88473_config mn88473_config = {};
 
 			mn88473_config.fe = &adap->fe[1];
-			mn88473_config.i2c_wr_max = 22,
+			mn88473_config.i2c_wr_max = 22;
 			strscpy(info.type, "mn88473", I2C_NAME_SIZE);
 			info.addr = 0x18;
 			info.platform_data = &mn88473_config;

^ permalink raw reply related	[flat|nested] 67+ messages in thread

* [PATCH 04/20] media: saa7134: use semicolons rather than commas to separate statements
  2020-09-29 13:14 ` Julia Lawall
@ 2020-09-29 13:14   ` Julia Lawall
  -1 siblings, 0 replies; 67+ messages in thread
From: Julia Lawall @ 2020-09-29 13:14 UTC (permalink / raw)
  To: Mauro Carvalho Chehab
  Cc: Valdis Klētnieks, Joe Perches, Thomas Gleixner,
	kernel-janitors, linux-media, linux-kernel

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/pci/saa7134/saa7134-video.c |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/media/pci/saa7134/saa7134-video.c b/drivers/media/pci/saa7134/saa7134-video.c
index 9a6a6b68f8e3..2ca963b04b3f 100644
--- a/drivers/media/pci/saa7134/saa7134-video.c
+++ b/drivers/media/pci/saa7134/saa7134-video.c
@@ -868,8 +868,11 @@ static int buffer_activate(struct saa7134_dev *dev,
 		lines_uv = dev->height >> dev->fmt->vshift;
 		base2    = base + bpl * dev->height;
 		base3    = base2 + bpl_uv * lines_uv;
-		if (dev->fmt->uvswap)
-			tmp = base2, base2 = base3, base3 = tmp;
+		if (dev->fmt->uvswap) {
+			tmp = base2;
+			base2 = base3;
+			base3 = tmp;
+		}
 		video_dbg("uv: bpl=%ld lines=%ld base2/3=%ld/%ld\n",
 			bpl_uv,lines_uv,base2,base3);
 		if (V4L2_FIELD_HAS_BOTH(dev->field)) {


^ permalink raw reply related	[flat|nested] 67+ messages in thread

* [PATCH 04/20] media: saa7134: use semicolons rather than commas to separate statements
@ 2020-09-29 13:14   ` Julia Lawall
  0 siblings, 0 replies; 67+ messages in thread
From: Julia Lawall @ 2020-09-29 13:14 UTC (permalink / raw)
  To: Mauro Carvalho Chehab
  Cc: Valdis Klētnieks, Joe Perches, Thomas Gleixner,
	kernel-janitors, linux-media, linux-kernel

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/pci/saa7134/saa7134-video.c |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/media/pci/saa7134/saa7134-video.c b/drivers/media/pci/saa7134/saa7134-video.c
index 9a6a6b68f8e3..2ca963b04b3f 100644
--- a/drivers/media/pci/saa7134/saa7134-video.c
+++ b/drivers/media/pci/saa7134/saa7134-video.c
@@ -868,8 +868,11 @@ static int buffer_activate(struct saa7134_dev *dev,
 		lines_uv = dev->height >> dev->fmt->vshift;
 		base2    = base + bpl * dev->height;
 		base3    = base2 + bpl_uv * lines_uv;
-		if (dev->fmt->uvswap)
-			tmp = base2, base2 = base3, base3 = tmp;
+		if (dev->fmt->uvswap) {
+			tmp = base2;
+			base2 = base3;
+			base3 = tmp;
+		}
 		video_dbg("uv: bpl=%ld lines=%ld base2/3=%ld/%ld\n",
 			bpl_uv,lines_uv,base2,base3);
 		if (V4L2_FIELD_HAS_BOTH(dev->field)) {

^ permalink raw reply related	[flat|nested] 67+ messages in thread

* [PATCH 05/20] media: m88ds3103: use semicolons rather than commas to separate statements
  2020-09-29 13:14 ` Julia Lawall
@ 2020-09-29 13:14   ` Julia Lawall
  -1 siblings, 0 replies; 67+ messages in thread
From: Julia Lawall @ 2020-09-29 13:14 UTC (permalink / raw)
  To: Antti Palosaari
  Cc: Valdis Klētnieks, Joe Perches, Thomas Gleixner,
	kernel-janitors, Mauro Carvalho Chehab, linux-media,
	linux-kernel

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/dvb-frontends/m88ds3103.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/media/dvb-frontends/m88ds3103.c b/drivers/media/dvb-frontends/m88ds3103.c
index ad6d9d564a87..cfa4cdde99d8 100644
--- a/drivers/media/dvb-frontends/m88ds3103.c
+++ b/drivers/media/dvb-frontends/m88ds3103.c
@@ -1793,9 +1793,9 @@ static int m88ds3103_probe(struct i2c_client *client,
 	dev->config.lnb_en_pol = pdata->lnb_en_pol;
 	dev->cfg = &dev->config;
 	/* create regmap */
-	dev->regmap_config.reg_bits = 8,
-	dev->regmap_config.val_bits = 8,
-	dev->regmap_config.lock_arg = dev,
+	dev->regmap_config.reg_bits = 8;
+	dev->regmap_config.val_bits = 8;
+	dev->regmap_config.lock_arg = dev;
 	dev->regmap = devm_regmap_init_i2c(client, &dev->regmap_config);
 	if (IS_ERR(dev->regmap)) {
 		ret = PTR_ERR(dev->regmap);


^ permalink raw reply related	[flat|nested] 67+ messages in thread

* [PATCH 05/20] media: m88ds3103: use semicolons rather than commas to separate statements
@ 2020-09-29 13:14   ` Julia Lawall
  0 siblings, 0 replies; 67+ messages in thread
From: Julia Lawall @ 2020-09-29 13:14 UTC (permalink / raw)
  To: Antti Palosaari
  Cc: Valdis Klētnieks, Joe Perches, Thomas Gleixner,
	kernel-janitors, Mauro Carvalho Chehab, linux-media,
	linux-kernel

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/dvb-frontends/m88ds3103.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/media/dvb-frontends/m88ds3103.c b/drivers/media/dvb-frontends/m88ds3103.c
index ad6d9d564a87..cfa4cdde99d8 100644
--- a/drivers/media/dvb-frontends/m88ds3103.c
+++ b/drivers/media/dvb-frontends/m88ds3103.c
@@ -1793,9 +1793,9 @@ static int m88ds3103_probe(struct i2c_client *client,
 	dev->config.lnb_en_pol = pdata->lnb_en_pol;
 	dev->cfg = &dev->config;
 	/* create regmap */
-	dev->regmap_config.reg_bits = 8,
-	dev->regmap_config.val_bits = 8,
-	dev->regmap_config.lock_arg = dev,
+	dev->regmap_config.reg_bits = 8;
+	dev->regmap_config.val_bits = 8;
+	dev->regmap_config.lock_arg = dev;
 	dev->regmap = devm_regmap_init_i2c(client, &dev->regmap_config);
 	if (IS_ERR(dev->regmap)) {
 		ret = PTR_ERR(dev->regmap);

^ permalink raw reply related	[flat|nested] 67+ messages in thread

* [PATCH 06/20] media: gspca: ov534-ov772x: use semicolons rather than commas to separate statements
  2020-09-29 13:14 ` Julia Lawall
@ 2020-09-29 13:14   ` Julia Lawall
  -1 siblings, 0 replies; 67+ messages in thread
From: Julia Lawall @ 2020-09-29 13:14 UTC (permalink / raw)
  To: Hans Verkuil
  Cc: Valdis Klētnieks, Joe Perches, Thomas Gleixner,
	kernel-janitors, Mauro Carvalho Chehab, linux-media,
	linux-kernel

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/usb/gspca/ov534.c |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/media/usb/gspca/ov534.c b/drivers/media/usb/gspca/ov534.c
index 9a11158f38da..8b6a57f170d0 100644
--- a/drivers/media/usb/gspca/ov534.c
+++ b/drivers/media/usb/gspca/ov534.c
@@ -1220,9 +1220,9 @@ static int sd_init_controls(struct gspca_dev *gspca_dev)
 	int hflip_def;
 
 	if (sd->sensor == SENSOR_OV767x) {
-		saturation_min = 0,
-		saturation_max = 6,
-		saturation_def = 3,
+		saturation_min = 0;
+		saturation_max = 6;
+		saturation_def = 3;
 		brightness_min = -127;
 		brightness_max = 127;
 		brightness_def = 0;
@@ -1233,9 +1233,9 @@ static int sd_init_controls(struct gspca_dev *gspca_dev)
 		exposure_def = 0x13;
 		hflip_def = 1;
 	} else {
-		saturation_min = 0,
-		saturation_max = 255,
-		saturation_def = 64,
+		saturation_min = 0;
+		saturation_max = 255;
+		saturation_def = 64;
 		brightness_min = 0;
 		brightness_max = 255;
 		brightness_def = 0;


^ permalink raw reply related	[flat|nested] 67+ messages in thread

* [PATCH 06/20] media: gspca: ov534-ov772x: use semicolons rather than commas to separate statements
@ 2020-09-29 13:14   ` Julia Lawall
  0 siblings, 0 replies; 67+ messages in thread
From: Julia Lawall @ 2020-09-29 13:14 UTC (permalink / raw)
  To: Hans Verkuil
  Cc: Valdis Klētnieks, Joe Perches, Thomas Gleixner,
	kernel-janitors, Mauro Carvalho Chehab, linux-media,
	linux-kernel

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/usb/gspca/ov534.c |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/media/usb/gspca/ov534.c b/drivers/media/usb/gspca/ov534.c
index 9a11158f38da..8b6a57f170d0 100644
--- a/drivers/media/usb/gspca/ov534.c
+++ b/drivers/media/usb/gspca/ov534.c
@@ -1220,9 +1220,9 @@ static int sd_init_controls(struct gspca_dev *gspca_dev)
 	int hflip_def;
 
 	if (sd->sensor = SENSOR_OV767x) {
-		saturation_min = 0,
-		saturation_max = 6,
-		saturation_def = 3,
+		saturation_min = 0;
+		saturation_max = 6;
+		saturation_def = 3;
 		brightness_min = -127;
 		brightness_max = 127;
 		brightness_def = 0;
@@ -1233,9 +1233,9 @@ static int sd_init_controls(struct gspca_dev *gspca_dev)
 		exposure_def = 0x13;
 		hflip_def = 1;
 	} else {
-		saturation_min = 0,
-		saturation_max = 255,
-		saturation_def = 64,
+		saturation_min = 0;
+		saturation_max = 255;
+		saturation_def = 64;
 		brightness_min = 0;
 		brightness_max = 255;
 		brightness_def = 0;

^ permalink raw reply related	[flat|nested] 67+ messages in thread

* [PATCH 07/20] media: s3c-camif: use semicolons rather than commas to separate statements
  2020-09-29 13:14 ` Julia Lawall
@ 2020-09-29 13:14   ` Julia Lawall
  -1 siblings, 0 replies; 67+ messages in thread
From: Julia Lawall @ 2020-09-29 13:14 UTC (permalink / raw)
  To: Sylwester Nawrocki
  Cc: Valdis Klētnieks, Joe Perches, Thomas Gleixner,
	kernel-janitors, Mauro Carvalho Chehab, linux-media,
	linux-samsung-soc, linux-kernel

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/s3c-camif/camif-core.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/media/platform/s3c-camif/camif-core.c b/drivers/media/platform/s3c-camif/camif-core.c
index 92f43c0cbc0c..02b5f933c411 100644
--- a/drivers/media/platform/s3c-camif/camif-core.c
+++ b/drivers/media/platform/s3c-camif/camif-core.c
@@ -131,11 +131,13 @@ static int camif_get_scaler_factor(u32 src, u32 tar, u32 *ratio, u32 *shift)
 	while (sh--) {
 		unsigned int tmp = 1 << sh;
 		if (src >= tar * tmp) {
-			*shift = sh, *ratio = tmp;
+			*shift = sh;
+			*ratio = tmp;
 			return 0;
 		}
 	}
-	*shift = 0, *ratio = 1;
+	*shift = 0;
+	*ratio = 1;
 	return 0;
 }
 


^ permalink raw reply related	[flat|nested] 67+ messages in thread

* [PATCH 07/20] media: s3c-camif: use semicolons rather than commas to separate statements
@ 2020-09-29 13:14   ` Julia Lawall
  0 siblings, 0 replies; 67+ messages in thread
From: Julia Lawall @ 2020-09-29 13:14 UTC (permalink / raw)
  To: Sylwester Nawrocki
  Cc: Valdis Klētnieks, Joe Perches, Thomas Gleixner,
	kernel-janitors, Mauro Carvalho Chehab, linux-media,
	linux-samsung-soc, linux-kernel

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/s3c-camif/camif-core.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/media/platform/s3c-camif/camif-core.c b/drivers/media/platform/s3c-camif/camif-core.c
index 92f43c0cbc0c..02b5f933c411 100644
--- a/drivers/media/platform/s3c-camif/camif-core.c
+++ b/drivers/media/platform/s3c-camif/camif-core.c
@@ -131,11 +131,13 @@ static int camif_get_scaler_factor(u32 src, u32 tar, u32 *ratio, u32 *shift)
 	while (sh--) {
 		unsigned int tmp = 1 << sh;
 		if (src >= tar * tmp) {
-			*shift = sh, *ratio = tmp;
+			*shift = sh;
+			*ratio = tmp;
 			return 0;
 		}
 	}
-	*shift = 0, *ratio = 1;
+	*shift = 0;
+	*ratio = 1;
 	return 0;
 }
 

^ permalink raw reply related	[flat|nested] 67+ messages in thread

* [PATCH 08/20] media: sun4i-csi: use semicolons rather than commas to separate statements
  2020-09-29 13:14 ` Julia Lawall
  (?)
@ 2020-09-29 13:14   ` Julia Lawall
  -1 siblings, 0 replies; 67+ messages in thread
From: Julia Lawall @ 2020-09-29 13:14 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Valdis Klētnieks, Joe Perches, Thomas Gleixner,
	kernel-janitors, Mauro Carvalho Chehab, Chen-Yu Tsai,
	linux-media, linux-arm-kernel, linux-kernel

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/sunxi/sun4i-csi/sun4i_v4l2.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/platform/sunxi/sun4i-csi/sun4i_v4l2.c b/drivers/media/platform/sunxi/sun4i-csi/sun4i_v4l2.c
index 8f4e254b6a41..1a2f65d83a6c 100644
--- a/drivers/media/platform/sunxi/sun4i-csi/sun4i_v4l2.c
+++ b/drivers/media/platform/sunxi/sun4i-csi/sun4i_v4l2.c
@@ -363,7 +363,7 @@ int sun4i_csi_v4l2_register(struct sun4i_csi *csi)
 	vdev->lock = &csi->lock;
 
 	/* Set a default format */
-	csi->fmt.pixelformat = sun4i_csi_formats[0].fourcc,
+	csi->fmt.pixelformat = sun4i_csi_formats[0].fourcc;
 	csi->fmt.width = CSI_DEFAULT_WIDTH;
 	csi->fmt.height = CSI_DEFAULT_HEIGHT;
 	_sun4i_csi_try_fmt(csi, &csi->fmt);


^ permalink raw reply related	[flat|nested] 67+ messages in thread

* [PATCH 08/20] media: sun4i-csi: use semicolons rather than commas to separate statements
@ 2020-09-29 13:14   ` Julia Lawall
  0 siblings, 0 replies; 67+ messages in thread
From: Julia Lawall @ 2020-09-29 13:14 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Valdis Klētnieks, kernel-janitors, linux-kernel,
	Chen-Yu Tsai, Joe Perches, Thomas Gleixner,
	Mauro Carvalho Chehab, linux-arm-kernel, linux-media

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/sunxi/sun4i-csi/sun4i_v4l2.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/platform/sunxi/sun4i-csi/sun4i_v4l2.c b/drivers/media/platform/sunxi/sun4i-csi/sun4i_v4l2.c
index 8f4e254b6a41..1a2f65d83a6c 100644
--- a/drivers/media/platform/sunxi/sun4i-csi/sun4i_v4l2.c
+++ b/drivers/media/platform/sunxi/sun4i-csi/sun4i_v4l2.c
@@ -363,7 +363,7 @@ int sun4i_csi_v4l2_register(struct sun4i_csi *csi)
 	vdev->lock = &csi->lock;
 
 	/* Set a default format */
-	csi->fmt.pixelformat = sun4i_csi_formats[0].fourcc,
+	csi->fmt.pixelformat = sun4i_csi_formats[0].fourcc;
 	csi->fmt.width = CSI_DEFAULT_WIDTH;
 	csi->fmt.height = CSI_DEFAULT_HEIGHT;
 	_sun4i_csi_try_fmt(csi, &csi->fmt);

^ permalink raw reply related	[flat|nested] 67+ messages in thread

* [PATCH 08/20] media: sun4i-csi: use semicolons rather than commas to separate statements
@ 2020-09-29 13:14   ` Julia Lawall
  0 siblings, 0 replies; 67+ messages in thread
From: Julia Lawall @ 2020-09-29 13:14 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Valdis Klētnieks, kernel-janitors, linux-kernel,
	Chen-Yu Tsai, Joe Perches, Thomas Gleixner,
	Mauro Carvalho Chehab, linux-arm-kernel, linux-media

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/sunxi/sun4i-csi/sun4i_v4l2.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/platform/sunxi/sun4i-csi/sun4i_v4l2.c b/drivers/media/platform/sunxi/sun4i-csi/sun4i_v4l2.c
index 8f4e254b6a41..1a2f65d83a6c 100644
--- a/drivers/media/platform/sunxi/sun4i-csi/sun4i_v4l2.c
+++ b/drivers/media/platform/sunxi/sun4i-csi/sun4i_v4l2.c
@@ -363,7 +363,7 @@ int sun4i_csi_v4l2_register(struct sun4i_csi *csi)
 	vdev->lock = &csi->lock;
 
 	/* Set a default format */
-	csi->fmt.pixelformat = sun4i_csi_formats[0].fourcc,
+	csi->fmt.pixelformat = sun4i_csi_formats[0].fourcc;
 	csi->fmt.width = CSI_DEFAULT_WIDTH;
 	csi->fmt.height = CSI_DEFAULT_HEIGHT;
 	_sun4i_csi_try_fmt(csi, &csi->fmt);


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 67+ messages in thread

* [PATCH 09/20] media: pvrusb2: use semicolons rather than commas to separate statements
  2020-09-29 13:14 ` Julia Lawall
@ 2020-09-29 13:14   ` Julia Lawall
  -1 siblings, 0 replies; 67+ messages in thread
From: Julia Lawall @ 2020-09-29 13:14 UTC (permalink / raw)
  To: Mike Isely
  Cc: Valdis Klētnieks, Joe Perches, Thomas Gleixner,
	kernel-janitors, Mauro Carvalho Chehab, linux-media,
	linux-kernel

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/usb/pvrusb2/pvrusb2-devattr.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/usb/pvrusb2/pvrusb2-devattr.c b/drivers/media/usb/pvrusb2/pvrusb2-devattr.c
index 1fcf63218885..d1b984ec757d 100644
--- a/drivers/media/usb/pvrusb2/pvrusb2-devattr.c
+++ b/drivers/media/usb/pvrusb2/pvrusb2-devattr.c
@@ -594,7 +594,7 @@ static int pvr2_lgdt3306a_attach(struct pvr2_dvb_adapter *adap)
 	lgdt3306a_config.mpeg_mode = LGDT3306A_MPEG_PARALLEL;
 	lgdt3306a_config.tpclk_edge = LGDT3306A_TPCLK_FALLING_EDGE;
 	lgdt3306a_config.tpvalid_polarity = LGDT3306A_TP_VALID_LOW;
-	lgdt3306a_config.xtalMHz = 25, /* demod clock MHz; 24/25 supported */
+	lgdt3306a_config.xtalMHz = 25; /* demod clock MHz; 24/25 supported */
 
 	adap->i2c_client_demod[0] = dvb_module_probe("lgdt3306a", NULL,
 						     &adap->channel.hdw->i2c_adap,


^ permalink raw reply related	[flat|nested] 67+ messages in thread

* [PATCH 09/20] media: pvrusb2: use semicolons rather than commas to separate statements
@ 2020-09-29 13:14   ` Julia Lawall
  0 siblings, 0 replies; 67+ messages in thread
From: Julia Lawall @ 2020-09-29 13:14 UTC (permalink / raw)
  To: Mike Isely
  Cc: Valdis Klētnieks, Joe Perches, Thomas Gleixner,
	kernel-janitors, Mauro Carvalho Chehab, linux-media,
	linux-kernel

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/usb/pvrusb2/pvrusb2-devattr.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/usb/pvrusb2/pvrusb2-devattr.c b/drivers/media/usb/pvrusb2/pvrusb2-devattr.c
index 1fcf63218885..d1b984ec757d 100644
--- a/drivers/media/usb/pvrusb2/pvrusb2-devattr.c
+++ b/drivers/media/usb/pvrusb2/pvrusb2-devattr.c
@@ -594,7 +594,7 @@ static int pvr2_lgdt3306a_attach(struct pvr2_dvb_adapter *adap)
 	lgdt3306a_config.mpeg_mode = LGDT3306A_MPEG_PARALLEL;
 	lgdt3306a_config.tpclk_edge = LGDT3306A_TPCLK_FALLING_EDGE;
 	lgdt3306a_config.tpvalid_polarity = LGDT3306A_TP_VALID_LOW;
-	lgdt3306a_config.xtalMHz = 25, /* demod clock MHz; 24/25 supported */
+	lgdt3306a_config.xtalMHz = 25; /* demod clock MHz; 24/25 supported */
 
 	adap->i2c_client_demod[0] = dvb_module_probe("lgdt3306a", NULL,
 						     &adap->channel.hdw->i2c_adap,

^ permalink raw reply related	[flat|nested] 67+ messages in thread

* [PATCH 10/20] media: lmedm04: use semicolons rather than commas to separate statements
  2020-09-29 13:14 ` Julia Lawall
@ 2020-09-29 13:14   ` Julia Lawall
  -1 siblings, 0 replies; 67+ messages in thread
From: Julia Lawall @ 2020-09-29 13:14 UTC (permalink / raw)
  To: Malcolm Priestley
  Cc: Valdis Klētnieks, Joe Perches, Thomas Gleixner,
	kernel-janitors, Mauro Carvalho Chehab, linux-media,
	linux-kernel

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/usb/dvb-usb-v2/lmedm04.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/usb/dvb-usb-v2/lmedm04.c b/drivers/media/usb/dvb-usb-v2/lmedm04.c
index 5a7a9522d46d..9ddda8d68ee0 100644
--- a/drivers/media/usb/dvb-usb-v2/lmedm04.c
+++ b/drivers/media/usb/dvb-usb-v2/lmedm04.c
@@ -391,7 +391,7 @@ static int lme2510_int_read(struct dvb_usb_adapter *adap)
 	ep = usb_pipe_endpoint(d->udev, lme_int->lme_urb->pipe);
 
 	if (usb_endpoint_type(&ep->desc) == USB_ENDPOINT_XFER_BULK)
-		lme_int->lme_urb->pipe = usb_rcvbulkpipe(d->udev, 0xa),
+		lme_int->lme_urb->pipe = usb_rcvbulkpipe(d->udev, 0xa);
 
 	usb_submit_urb(lme_int->lme_urb, GFP_ATOMIC);
 	info("INT Interrupt Service Started");


^ permalink raw reply related	[flat|nested] 67+ messages in thread

* [PATCH 10/20] media: lmedm04: use semicolons rather than commas to separate statements
@ 2020-09-29 13:14   ` Julia Lawall
  0 siblings, 0 replies; 67+ messages in thread
From: Julia Lawall @ 2020-09-29 13:14 UTC (permalink / raw)
  To: Malcolm Priestley
  Cc: Valdis Klētnieks, Joe Perches, Thomas Gleixner,
	kernel-janitors, Mauro Carvalho Chehab, linux-media,
	linux-kernel

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/usb/dvb-usb-v2/lmedm04.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/usb/dvb-usb-v2/lmedm04.c b/drivers/media/usb/dvb-usb-v2/lmedm04.c
index 5a7a9522d46d..9ddda8d68ee0 100644
--- a/drivers/media/usb/dvb-usb-v2/lmedm04.c
+++ b/drivers/media/usb/dvb-usb-v2/lmedm04.c
@@ -391,7 +391,7 @@ static int lme2510_int_read(struct dvb_usb_adapter *adap)
 	ep = usb_pipe_endpoint(d->udev, lme_int->lme_urb->pipe);
 
 	if (usb_endpoint_type(&ep->desc) = USB_ENDPOINT_XFER_BULK)
-		lme_int->lme_urb->pipe = usb_rcvbulkpipe(d->udev, 0xa),
+		lme_int->lme_urb->pipe = usb_rcvbulkpipe(d->udev, 0xa);
 
 	usb_submit_urb(lme_int->lme_urb, GFP_ATOMIC);
 	info("INT Interrupt Service Started");

^ permalink raw reply related	[flat|nested] 67+ messages in thread

* [PATCH 11/20] media: ts2020: use semicolons rather than commas to separate statements
  2020-09-29 13:14 ` Julia Lawall
@ 2020-09-29 13:14   ` Julia Lawall
  -1 siblings, 0 replies; 67+ messages in thread
From: Julia Lawall @ 2020-09-29 13:14 UTC (permalink / raw)
  To: Mauro Carvalho Chehab
  Cc: Valdis Klētnieks, Joe Perches, Thomas Gleixner,
	kernel-janitors, linux-media, linux-kernel

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/dvb-frontends/ts2020.c |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/media/dvb-frontends/ts2020.c b/drivers/media/dvb-frontends/ts2020.c
index 234607b02edb..3e383912bcfd 100644
--- a/drivers/media/dvb-frontends/ts2020.c
+++ b/drivers/media/dvb-frontends/ts2020.c
@@ -569,11 +569,11 @@ static int ts2020_probe(struct i2c_client *client,
 
 	/* create regmap */
 	mutex_init(&dev->regmap_mutex);
-	dev->regmap_config.reg_bits = 8,
-	dev->regmap_config.val_bits = 8,
-	dev->regmap_config.lock = ts2020_regmap_lock,
-	dev->regmap_config.unlock = ts2020_regmap_unlock,
-	dev->regmap_config.lock_arg = dev,
+	dev->regmap_config.reg_bits = 8;
+	dev->regmap_config.val_bits = 8;
+	dev->regmap_config.lock = ts2020_regmap_lock;
+	dev->regmap_config.unlock = ts2020_regmap_unlock;
+	dev->regmap_config.lock_arg = dev;
 	dev->regmap = regmap_init_i2c(client, &dev->regmap_config);
 	if (IS_ERR(dev->regmap)) {
 		ret = PTR_ERR(dev->regmap);


^ permalink raw reply related	[flat|nested] 67+ messages in thread

* [PATCH 11/20] media: ts2020: use semicolons rather than commas to separate statements
@ 2020-09-29 13:14   ` Julia Lawall
  0 siblings, 0 replies; 67+ messages in thread
From: Julia Lawall @ 2020-09-29 13:14 UTC (permalink / raw)
  To: Mauro Carvalho Chehab
  Cc: Valdis Klētnieks, Joe Perches, Thomas Gleixner,
	kernel-janitors, linux-media, linux-kernel

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/dvb-frontends/ts2020.c |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/media/dvb-frontends/ts2020.c b/drivers/media/dvb-frontends/ts2020.c
index 234607b02edb..3e383912bcfd 100644
--- a/drivers/media/dvb-frontends/ts2020.c
+++ b/drivers/media/dvb-frontends/ts2020.c
@@ -569,11 +569,11 @@ static int ts2020_probe(struct i2c_client *client,
 
 	/* create regmap */
 	mutex_init(&dev->regmap_mutex);
-	dev->regmap_config.reg_bits = 8,
-	dev->regmap_config.val_bits = 8,
-	dev->regmap_config.lock = ts2020_regmap_lock,
-	dev->regmap_config.unlock = ts2020_regmap_unlock,
-	dev->regmap_config.lock_arg = dev,
+	dev->regmap_config.reg_bits = 8;
+	dev->regmap_config.val_bits = 8;
+	dev->regmap_config.lock = ts2020_regmap_lock;
+	dev->regmap_config.unlock = ts2020_regmap_unlock;
+	dev->regmap_config.lock_arg = dev;
 	dev->regmap = regmap_init_i2c(client, &dev->regmap_config);
 	if (IS_ERR(dev->regmap)) {
 		ret = PTR_ERR(dev->regmap);

^ permalink raw reply related	[flat|nested] 67+ messages in thread

* [PATCH 12/20] media: msp3400: use semicolons rather than commas to separate statements
  2020-09-29 13:14 ` Julia Lawall
@ 2020-09-29 13:14   ` Julia Lawall
  -1 siblings, 0 replies; 67+ messages in thread
From: Julia Lawall @ 2020-09-29 13:14 UTC (permalink / raw)
  To: Mauro Carvalho Chehab
  Cc: Valdis Klētnieks, Joe Perches, Thomas Gleixner,
	kernel-janitors, linux-media, linux-kernel

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/i2c/msp3400-kthreads.c |   12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/media/i2c/msp3400-kthreads.c b/drivers/media/i2c/msp3400-kthreads.c
index 52e506f86de5..ecabc0e1d32e 100644
--- a/drivers/media/i2c/msp3400-kthreads.c
+++ b/drivers/media/i2c/msp3400-kthreads.c
@@ -549,8 +549,10 @@ int msp3400c_thread(void *data)
 			val = msp_read_dsp(client, 0x1b);
 			if (val > 32767)
 				val -= 65536;
-			if (val1 < val)
-				val1 = val, max1 = i;
+			if (val1 < val) {
+				val1 = val;
+				max1 = i;
+			}
 			dev_dbg_lvl(&client->dev, 1, msp_debug,
 				"carrier1 val: %5d / %s\n", val, cd[i].name);
 		}
@@ -586,8 +588,10 @@ int msp3400c_thread(void *data)
 			val = msp_read_dsp(client, 0x1b);
 			if (val > 32767)
 				val -= 65536;
-			if (val2 < val)
-				val2 = val, max2 = i;
+			if (val2 < val) {
+				val2 = val;
+				max2 = i;
+			}
 			dev_dbg_lvl(&client->dev, 1, msp_debug,
 				"carrier2 val: %5d / %s\n", val, cd[i].name);
 		}


^ permalink raw reply related	[flat|nested] 67+ messages in thread

* [PATCH 12/20] media: msp3400: use semicolons rather than commas to separate statements
@ 2020-09-29 13:14   ` Julia Lawall
  0 siblings, 0 replies; 67+ messages in thread
From: Julia Lawall @ 2020-09-29 13:14 UTC (permalink / raw)
  To: Mauro Carvalho Chehab
  Cc: Valdis Klētnieks, Joe Perches, Thomas Gleixner,
	kernel-janitors, linux-media, linux-kernel

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/i2c/msp3400-kthreads.c |   12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/media/i2c/msp3400-kthreads.c b/drivers/media/i2c/msp3400-kthreads.c
index 52e506f86de5..ecabc0e1d32e 100644
--- a/drivers/media/i2c/msp3400-kthreads.c
+++ b/drivers/media/i2c/msp3400-kthreads.c
@@ -549,8 +549,10 @@ int msp3400c_thread(void *data)
 			val = msp_read_dsp(client, 0x1b);
 			if (val > 32767)
 				val -= 65536;
-			if (val1 < val)
-				val1 = val, max1 = i;
+			if (val1 < val) {
+				val1 = val;
+				max1 = i;
+			}
 			dev_dbg_lvl(&client->dev, 1, msp_debug,
 				"carrier1 val: %5d / %s\n", val, cd[i].name);
 		}
@@ -586,8 +588,10 @@ int msp3400c_thread(void *data)
 			val = msp_read_dsp(client, 0x1b);
 			if (val > 32767)
 				val -= 65536;
-			if (val2 < val)
-				val2 = val, max2 = i;
+			if (val2 < val) {
+				val2 = val;
+				max2 = i;
+			}
 			dev_dbg_lvl(&client->dev, 1, msp_debug,
 				"carrier2 val: %5d / %s\n", val, cd[i].name);
 		}

^ permalink raw reply related	[flat|nested] 67+ messages in thread

* [PATCH 13/20] media: radio-sf16fmr2: use semicolons rather than commas to separate statements
  2020-09-29 13:14 ` Julia Lawall
@ 2020-09-29 13:14   ` Julia Lawall
  -1 siblings, 0 replies; 67+ messages in thread
From: Julia Lawall @ 2020-09-29 13:14 UTC (permalink / raw)
  To: Mauro Carvalho Chehab
  Cc: Valdis Klētnieks, Joe Perches, Thomas Gleixner,
	kernel-janitors, linux-media, linux-kernel

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/radio/radio-sf16fmr2.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/radio/radio-sf16fmr2.c b/drivers/media/radio/radio-sf16fmr2.c
index bd323e640f1a..0388894cfe41 100644
--- a/drivers/media/radio/radio-sf16fmr2.c
+++ b/drivers/media/radio/radio-sf16fmr2.c
@@ -215,7 +215,7 @@ static int fmr2_probe(struct fmr2 *fmr2, struct device *pdev, int io)
 			return -EBUSY;
 
 	strscpy(fmr2->v4l2_dev.name, "radio-sf16fmr2",
-		sizeof(fmr2->v4l2_dev.name)),
+		sizeof(fmr2->v4l2_dev.name));
 	fmr2->io = io;
 
 	if (!request_region(fmr2->io, 2, fmr2->v4l2_dev.name)) {


^ permalink raw reply related	[flat|nested] 67+ messages in thread

* [PATCH 13/20] media: radio-sf16fmr2: use semicolons rather than commas to separate statements
@ 2020-09-29 13:14   ` Julia Lawall
  0 siblings, 0 replies; 67+ messages in thread
From: Julia Lawall @ 2020-09-29 13:14 UTC (permalink / raw)
  To: Mauro Carvalho Chehab
  Cc: Valdis Klētnieks, Joe Perches, Thomas Gleixner,
	kernel-janitors, linux-media, linux-kernel

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/radio/radio-sf16fmr2.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/radio/radio-sf16fmr2.c b/drivers/media/radio/radio-sf16fmr2.c
index bd323e640f1a..0388894cfe41 100644
--- a/drivers/media/radio/radio-sf16fmr2.c
+++ b/drivers/media/radio/radio-sf16fmr2.c
@@ -215,7 +215,7 @@ static int fmr2_probe(struct fmr2 *fmr2, struct device *pdev, int io)
 			return -EBUSY;
 
 	strscpy(fmr2->v4l2_dev.name, "radio-sf16fmr2",
-		sizeof(fmr2->v4l2_dev.name)),
+		sizeof(fmr2->v4l2_dev.name));
 	fmr2->io = io;
 
 	if (!request_region(fmr2->io, 2, fmr2->v4l2_dev.name)) {

^ permalink raw reply related	[flat|nested] 67+ messages in thread

* [PATCH 14/20] media: mt2060: use semicolons rather than commas to separate statements
  2020-09-29 13:14 ` Julia Lawall
@ 2020-09-29 13:14   ` Julia Lawall
  -1 siblings, 0 replies; 67+ messages in thread
From: Julia Lawall @ 2020-09-29 13:14 UTC (permalink / raw)
  To: Mauro Carvalho Chehab
  Cc: Valdis Klētnieks, Joe Perches, Thomas Gleixner,
	kernel-janitors, linux-media, linux-kernel

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/tuners/mt2060.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/tuners/mt2060.c b/drivers/media/tuners/mt2060.c
index 0e7ac2b49990..204e6186bf71 100644
--- a/drivers/media/tuners/mt2060.c
+++ b/drivers/media/tuners/mt2060.c
@@ -215,7 +215,7 @@ static int mt2060_set_params(struct dvb_frontend *fe)
 	f_lo2 = f_lo1 - freq - IF2;
 	// From the Comtech datasheet, the step used is 50kHz. The tuner chip could be more precise
 	f_lo2 = ((f_lo2 + 25) / 50) * 50;
-	priv->frequency =  (f_lo1 - f_lo2 - IF2) * 1000,
+	priv->frequency =  (f_lo1 - f_lo2 - IF2) * 1000;
 
 #ifdef MT2060_SPURCHECK
 	// LO-related spurs detection and correction


^ permalink raw reply related	[flat|nested] 67+ messages in thread

* [PATCH 14/20] media: mt2060: use semicolons rather than commas to separate statements
@ 2020-09-29 13:14   ` Julia Lawall
  0 siblings, 0 replies; 67+ messages in thread
From: Julia Lawall @ 2020-09-29 13:14 UTC (permalink / raw)
  To: Mauro Carvalho Chehab
  Cc: Valdis Klētnieks, Joe Perches, Thomas Gleixner,
	kernel-janitors, linux-media, linux-kernel

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/tuners/mt2060.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/tuners/mt2060.c b/drivers/media/tuners/mt2060.c
index 0e7ac2b49990..204e6186bf71 100644
--- a/drivers/media/tuners/mt2060.c
+++ b/drivers/media/tuners/mt2060.c
@@ -215,7 +215,7 @@ static int mt2060_set_params(struct dvb_frontend *fe)
 	f_lo2 = f_lo1 - freq - IF2;
 	// From the Comtech datasheet, the step used is 50kHz. The tuner chip could be more precise
 	f_lo2 = ((f_lo2 + 25) / 50) * 50;
-	priv->frequency =  (f_lo1 - f_lo2 - IF2) * 1000,
+	priv->frequency =  (f_lo1 - f_lo2 - IF2) * 1000;
 
 #ifdef MT2060_SPURCHECK
 	// LO-related spurs detection and correction

^ permalink raw reply related	[flat|nested] 67+ messages in thread

* [PATCH 15/20] media: au0828: use semicolons rather than commas to separate statements
  2020-09-29 13:14 ` Julia Lawall
@ 2020-09-29 13:14   ` Julia Lawall
  -1 siblings, 0 replies; 67+ messages in thread
From: Julia Lawall @ 2020-09-29 13:14 UTC (permalink / raw)
  To: Mauro Carvalho Chehab
  Cc: Valdis Klētnieks, Joe Perches, Thomas Gleixner,
	kernel-janitors, linux-media, linux-kernel

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/usb/au0828/au0828-video.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/usb/au0828/au0828-video.c b/drivers/media/usb/au0828/au0828-video.c
index aa5bc6a2ae20..5c4bac5a4ec7 100644
--- a/drivers/media/usb/au0828/au0828-video.c
+++ b/drivers/media/usb/au0828/au0828-video.c
@@ -248,7 +248,7 @@ static int au0828_init_isoc(struct au0828_dev *dev, int max_packets,
 		memset(dev->isoc_ctl.transfer_buffer[i], 0, sb_size);
 
 		pipe = usb_rcvisocpipe(dev->usbdev,
-				       dev->isoc_in_endpointaddr),
+				       dev->isoc_in_endpointaddr);
 
 		usb_fill_int_urb(urb, dev->usbdev, pipe,
 				 dev->isoc_ctl.transfer_buffer[i], sb_size,


^ permalink raw reply related	[flat|nested] 67+ messages in thread

* [PATCH 15/20] media: au0828: use semicolons rather than commas to separate statements
@ 2020-09-29 13:14   ` Julia Lawall
  0 siblings, 0 replies; 67+ messages in thread
From: Julia Lawall @ 2020-09-29 13:14 UTC (permalink / raw)
  To: Mauro Carvalho Chehab
  Cc: Valdis Klētnieks, Joe Perches, Thomas Gleixner,
	kernel-janitors, linux-media, linux-kernel

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/usb/au0828/au0828-video.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/usb/au0828/au0828-video.c b/drivers/media/usb/au0828/au0828-video.c
index aa5bc6a2ae20..5c4bac5a4ec7 100644
--- a/drivers/media/usb/au0828/au0828-video.c
+++ b/drivers/media/usb/au0828/au0828-video.c
@@ -248,7 +248,7 @@ static int au0828_init_isoc(struct au0828_dev *dev, int max_packets,
 		memset(dev->isoc_ctl.transfer_buffer[i], 0, sb_size);
 
 		pipe = usb_rcvisocpipe(dev->usbdev,
-				       dev->isoc_in_endpointaddr),
+				       dev->isoc_in_endpointaddr);
 
 		usb_fill_int_urb(urb, dev->usbdev, pipe,
 				 dev->isoc_ctl.transfer_buffer[i], sb_size,

^ permalink raw reply related	[flat|nested] 67+ messages in thread

* [PATCH 16/20] media: dvbsky: use semicolons rather than commas to separate statements
  2020-09-29 13:14 ` Julia Lawall
@ 2020-09-29 13:14   ` Julia Lawall
  -1 siblings, 0 replies; 67+ messages in thread
From: Julia Lawall @ 2020-09-29 13:14 UTC (permalink / raw)
  To: Mauro Carvalho Chehab
  Cc: Valdis Klētnieks, Joe Perches, Thomas Gleixner,
	kernel-janitors, linux-media, linux-kernel

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/usb/dvb-usb-v2/dvbsky.c |   22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/drivers/media/usb/dvb-usb-v2/dvbsky.c b/drivers/media/usb/dvb-usb-v2/dvbsky.c
index 0d9657f7f29d..689829f1b52a 100644
--- a/drivers/media/usb/dvb-usb-v2/dvbsky.c
+++ b/drivers/media/usb/dvb-usb-v2/dvbsky.c
@@ -287,8 +287,8 @@ static int dvbsky_s960_attach(struct dvb_usb_adapter *adap)
 	m88ds3103_pdata.ts_clk = 16000;
 	m88ds3103_pdata.ts_clk_pol = 0;
 	m88ds3103_pdata.agc = 0x99;
-	m88ds3103_pdata.lnb_hv_pol = 1,
-	m88ds3103_pdata.lnb_en_pol = 1,
+	m88ds3103_pdata.lnb_hv_pol = 1;
+	m88ds3103_pdata.lnb_en_pol = 1;
 
 	state->i2c_client_demod = dvb_module_probe("m88ds3103", NULL,
 						   &d->i2c_adap,
@@ -383,15 +383,15 @@ static int dvbsky_s960c_attach(struct dvb_usb_adapter *adap)
 	struct sp2_config sp2_config = {};
 
 	/* attach demod */
-	m88ds3103_pdata.clk = 27000000,
-	m88ds3103_pdata.i2c_wr_max = 33,
-	m88ds3103_pdata.clk_out = 0,
-	m88ds3103_pdata.ts_mode = M88DS3103_TS_CI,
-	m88ds3103_pdata.ts_clk = 10000,
-	m88ds3103_pdata.ts_clk_pol = 1,
-	m88ds3103_pdata.agc = 0x99,
-	m88ds3103_pdata.lnb_hv_pol = 0,
-	m88ds3103_pdata.lnb_en_pol = 1,
+	m88ds3103_pdata.clk = 27000000;
+	m88ds3103_pdata.i2c_wr_max = 33;
+	m88ds3103_pdata.clk_out = 0;
+	m88ds3103_pdata.ts_mode = M88DS3103_TS_CI;
+	m88ds3103_pdata.ts_clk = 10000;
+	m88ds3103_pdata.ts_clk_pol = 1;
+	m88ds3103_pdata.agc = 0x99;
+	m88ds3103_pdata.lnb_hv_pol = 0;
+	m88ds3103_pdata.lnb_en_pol = 1;
 
 	state->i2c_client_demod = dvb_module_probe("m88ds3103", NULL,
 						   &d->i2c_adap,


^ permalink raw reply related	[flat|nested] 67+ messages in thread

* [PATCH 16/20] media: dvbsky: use semicolons rather than commas to separate statements
@ 2020-09-29 13:14   ` Julia Lawall
  0 siblings, 0 replies; 67+ messages in thread
From: Julia Lawall @ 2020-09-29 13:14 UTC (permalink / raw)
  To: Mauro Carvalho Chehab
  Cc: Valdis Klētnieks, Joe Perches, Thomas Gleixner,
	kernel-janitors, linux-media, linux-kernel

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/usb/dvb-usb-v2/dvbsky.c |   22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/drivers/media/usb/dvb-usb-v2/dvbsky.c b/drivers/media/usb/dvb-usb-v2/dvbsky.c
index 0d9657f7f29d..689829f1b52a 100644
--- a/drivers/media/usb/dvb-usb-v2/dvbsky.c
+++ b/drivers/media/usb/dvb-usb-v2/dvbsky.c
@@ -287,8 +287,8 @@ static int dvbsky_s960_attach(struct dvb_usb_adapter *adap)
 	m88ds3103_pdata.ts_clk = 16000;
 	m88ds3103_pdata.ts_clk_pol = 0;
 	m88ds3103_pdata.agc = 0x99;
-	m88ds3103_pdata.lnb_hv_pol = 1,
-	m88ds3103_pdata.lnb_en_pol = 1,
+	m88ds3103_pdata.lnb_hv_pol = 1;
+	m88ds3103_pdata.lnb_en_pol = 1;
 
 	state->i2c_client_demod = dvb_module_probe("m88ds3103", NULL,
 						   &d->i2c_adap,
@@ -383,15 +383,15 @@ static int dvbsky_s960c_attach(struct dvb_usb_adapter *adap)
 	struct sp2_config sp2_config = {};
 
 	/* attach demod */
-	m88ds3103_pdata.clk = 27000000,
-	m88ds3103_pdata.i2c_wr_max = 33,
-	m88ds3103_pdata.clk_out = 0,
-	m88ds3103_pdata.ts_mode = M88DS3103_TS_CI,
-	m88ds3103_pdata.ts_clk = 10000,
-	m88ds3103_pdata.ts_clk_pol = 1,
-	m88ds3103_pdata.agc = 0x99,
-	m88ds3103_pdata.lnb_hv_pol = 0,
-	m88ds3103_pdata.lnb_en_pol = 1,
+	m88ds3103_pdata.clk = 27000000;
+	m88ds3103_pdata.i2c_wr_max = 33;
+	m88ds3103_pdata.clk_out = 0;
+	m88ds3103_pdata.ts_mode = M88DS3103_TS_CI;
+	m88ds3103_pdata.ts_clk = 10000;
+	m88ds3103_pdata.ts_clk_pol = 1;
+	m88ds3103_pdata.agc = 0x99;
+	m88ds3103_pdata.lnb_hv_pol = 0;
+	m88ds3103_pdata.lnb_en_pol = 1;
 
 	state->i2c_client_demod = dvb_module_probe("m88ds3103", NULL,
 						   &d->i2c_adap,

^ permalink raw reply related	[flat|nested] 67+ messages in thread

* [PATCH 17/20] media: dib0700: use semicolons rather than commas to separate statements
  2020-09-29 13:14 ` Julia Lawall
@ 2020-09-29 13:14   ` Julia Lawall
  -1 siblings, 0 replies; 67+ messages in thread
From: Julia Lawall @ 2020-09-29 13:14 UTC (permalink / raw)
  To: Mauro Carvalho Chehab
  Cc: Valdis Klētnieks, Joe Perches, Thomas Gleixner,
	kernel-janitors, linux-media, linux-kernel

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/usb/dvb-usb/dib0700_devices.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/media/usb/dvb-usb/dib0700_devices.c b/drivers/media/usb/dvb-usb/dib0700_devices.c
index d3288c107906..710c1afe3e85 100644
--- a/drivers/media/usb/dvb-usb/dib0700_devices.c
+++ b/drivers/media/usb/dvb-usb/dib0700_devices.c
@@ -3074,8 +3074,8 @@ static int nim7090_tuner_attach(struct dvb_usb_adapter *adap)
 	struct dib0700_adapter_state *st = adap->priv;
 	struct i2c_adapter *tun_i2c = st->dib7000p_ops.get_i2c_tuner(adap->fe_adap[0].fe);
 
-	nim7090_dib0090_config.reset = st->dib7000p_ops.tuner_sleep,
-	nim7090_dib0090_config.sleep = st->dib7000p_ops.tuner_sleep,
+	nim7090_dib0090_config.reset = st->dib7000p_ops.tuner_sleep;
+	nim7090_dib0090_config.sleep = st->dib7000p_ops.tuner_sleep;
 	nim7090_dib0090_config.get_adc_power = st->dib7000p_ops.get_adc_power;
 
 	if (dvb_attach(dib0090_register, adap->fe_adap[0].fe, tun_i2c, &nim7090_dib0090_config) == NULL)


^ permalink raw reply related	[flat|nested] 67+ messages in thread

* [PATCH 17/20] media: dib0700: use semicolons rather than commas to separate statements
@ 2020-09-29 13:14   ` Julia Lawall
  0 siblings, 0 replies; 67+ messages in thread
From: Julia Lawall @ 2020-09-29 13:14 UTC (permalink / raw)
  To: Mauro Carvalho Chehab
  Cc: Valdis Klētnieks, Joe Perches, Thomas Gleixner,
	kernel-janitors, linux-media, linux-kernel

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/usb/dvb-usb/dib0700_devices.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/media/usb/dvb-usb/dib0700_devices.c b/drivers/media/usb/dvb-usb/dib0700_devices.c
index d3288c107906..710c1afe3e85 100644
--- a/drivers/media/usb/dvb-usb/dib0700_devices.c
+++ b/drivers/media/usb/dvb-usb/dib0700_devices.c
@@ -3074,8 +3074,8 @@ static int nim7090_tuner_attach(struct dvb_usb_adapter *adap)
 	struct dib0700_adapter_state *st = adap->priv;
 	struct i2c_adapter *tun_i2c = st->dib7000p_ops.get_i2c_tuner(adap->fe_adap[0].fe);
 
-	nim7090_dib0090_config.reset = st->dib7000p_ops.tuner_sleep,
-	nim7090_dib0090_config.sleep = st->dib7000p_ops.tuner_sleep,
+	nim7090_dib0090_config.reset = st->dib7000p_ops.tuner_sleep;
+	nim7090_dib0090_config.sleep = st->dib7000p_ops.tuner_sleep;
 	nim7090_dib0090_config.get_adc_power = st->dib7000p_ops.get_adc_power;
 
 	if (dvb_attach(dib0090_register, adap->fe_adap[0].fe, tun_i2c, &nim7090_dib0090_config) = NULL)

^ permalink raw reply related	[flat|nested] 67+ messages in thread

* [PATCH 18/20] media: rtl2832: use semicolons rather than commas to separate statements
  2020-09-29 13:14 ` Julia Lawall
@ 2020-09-29 13:14   ` Julia Lawall
  -1 siblings, 0 replies; 67+ messages in thread
From: Julia Lawall @ 2020-09-29 13:14 UTC (permalink / raw)
  To: Antti Palosaari
  Cc: Valdis Klētnieks, Joe Perches, Thomas Gleixner,
	kernel-janitors, Mauro Carvalho Chehab, linux-media,
	linux-kernel

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/dvb-frontends/rtl2832.c |   14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/media/dvb-frontends/rtl2832.c b/drivers/media/dvb-frontends/rtl2832.c
index e5bffaaeed38..01dcc7f1b9b2 100644
--- a/drivers/media/dvb-frontends/rtl2832.c
+++ b/drivers/media/dvb-frontends/rtl2832.c
@@ -1056,13 +1056,13 @@ static int rtl2832_probe(struct i2c_client *client,
 	dev->sleeping = true;
 	INIT_DELAYED_WORK(&dev->i2c_gate_work, rtl2832_i2c_gate_work);
 	/* create regmap */
-	dev->regmap_config.reg_bits =  8,
-	dev->regmap_config.val_bits =  8,
-	dev->regmap_config.volatile_reg = rtl2832_volatile_reg,
-	dev->regmap_config.max_register = 5 * 0x100,
-	dev->regmap_config.ranges = regmap_range_cfg,
-	dev->regmap_config.num_ranges = ARRAY_SIZE(regmap_range_cfg),
-	dev->regmap_config.cache_type = REGCACHE_NONE,
+	dev->regmap_config.reg_bits =  8;
+	dev->regmap_config.val_bits =  8;
+	dev->regmap_config.volatile_reg = rtl2832_volatile_reg;
+	dev->regmap_config.max_register = 5 * 0x100;
+	dev->regmap_config.ranges = regmap_range_cfg;
+	dev->regmap_config.num_ranges = ARRAY_SIZE(regmap_range_cfg);
+	dev->regmap_config.cache_type = REGCACHE_NONE;
 	dev->regmap = regmap_init_i2c(client, &dev->regmap_config);
 	if (IS_ERR(dev->regmap)) {
 		ret = PTR_ERR(dev->regmap);


^ permalink raw reply related	[flat|nested] 67+ messages in thread

* [PATCH 18/20] media: rtl2832: use semicolons rather than commas to separate statements
@ 2020-09-29 13:14   ` Julia Lawall
  0 siblings, 0 replies; 67+ messages in thread
From: Julia Lawall @ 2020-09-29 13:14 UTC (permalink / raw)
  To: Antti Palosaari
  Cc: Valdis Klētnieks, Joe Perches, Thomas Gleixner,
	kernel-janitors, Mauro Carvalho Chehab, linux-media,
	linux-kernel

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/dvb-frontends/rtl2832.c |   14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/media/dvb-frontends/rtl2832.c b/drivers/media/dvb-frontends/rtl2832.c
index e5bffaaeed38..01dcc7f1b9b2 100644
--- a/drivers/media/dvb-frontends/rtl2832.c
+++ b/drivers/media/dvb-frontends/rtl2832.c
@@ -1056,13 +1056,13 @@ static int rtl2832_probe(struct i2c_client *client,
 	dev->sleeping = true;
 	INIT_DELAYED_WORK(&dev->i2c_gate_work, rtl2832_i2c_gate_work);
 	/* create regmap */
-	dev->regmap_config.reg_bits =  8,
-	dev->regmap_config.val_bits =  8,
-	dev->regmap_config.volatile_reg = rtl2832_volatile_reg,
-	dev->regmap_config.max_register = 5 * 0x100,
-	dev->regmap_config.ranges = regmap_range_cfg,
-	dev->regmap_config.num_ranges = ARRAY_SIZE(regmap_range_cfg),
-	dev->regmap_config.cache_type = REGCACHE_NONE,
+	dev->regmap_config.reg_bits =  8;
+	dev->regmap_config.val_bits =  8;
+	dev->regmap_config.volatile_reg = rtl2832_volatile_reg;
+	dev->regmap_config.max_register = 5 * 0x100;
+	dev->regmap_config.ranges = regmap_range_cfg;
+	dev->regmap_config.num_ranges = ARRAY_SIZE(regmap_range_cfg);
+	dev->regmap_config.cache_type = REGCACHE_NONE;
 	dev->regmap = regmap_init_i2c(client, &dev->regmap_config);
 	if (IS_ERR(dev->regmap)) {
 		ret = PTR_ERR(dev->regmap);

^ permalink raw reply related	[flat|nested] 67+ messages in thread

* [PATCH 19/20] media: exynos4-is: use semicolons rather than commas to separate statements
  2020-09-29 13:14 ` Julia Lawall
  (?)
@ 2020-09-29 13:14   ` Julia Lawall
  -1 siblings, 0 replies; 67+ messages in thread
From: Julia Lawall @ 2020-09-29 13:14 UTC (permalink / raw)
  To: Kyungmin Park
  Cc: Valdis Klētnieks, Joe Perches, Thomas Gleixner,
	kernel-janitors, Sylwester Nawrocki, Mauro Carvalho Chehab,
	Kukjin Kim, Krzysztof Kozlowski, linux-media, linux-arm-kernel,
	linux-samsung-soc, linux-kernel

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/exynos4-is/fimc-core.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/media/platform/exynos4-is/fimc-core.c b/drivers/media/platform/exynos4-is/fimc-core.c
index 08d1f39a914c..db6e548fe08e 100644
--- a/drivers/media/platform/exynos4-is/fimc-core.c
+++ b/drivers/media/platform/exynos4-is/fimc-core.c
@@ -214,11 +214,13 @@ static int fimc_get_scaler_factor(u32 src, u32 tar, u32 *ratio, u32 *shift)
 	while (sh--) {
 		u32 tmp = 1 << sh;
 		if (src >= tar * tmp) {
-			*shift = sh, *ratio = tmp;
+			*shift = sh;
+			*ratio = tmp;
 			return 0;
 		}
 	}
-	*shift = 0, *ratio = 1;
+	*shift = 0;
+	*ratio = 1;
 	return 0;
 }
 


^ permalink raw reply related	[flat|nested] 67+ messages in thread

* [PATCH 19/20] media: exynos4-is: use semicolons rather than commas to separate statements
@ 2020-09-29 13:14   ` Julia Lawall
  0 siblings, 0 replies; 67+ messages in thread
From: Julia Lawall @ 2020-09-29 13:14 UTC (permalink / raw)
  To: Kyungmin Park
  Cc: linux-samsung-soc, Valdis Klētnieks, kernel-janitors,
	linux-kernel, Krzysztof Kozlowski, Kukjin Kim,
	Sylwester Nawrocki, Joe Perches, Thomas Gleixner,
	Mauro Carvalho Chehab, linux-arm-kernel, linux-media

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/exynos4-is/fimc-core.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/media/platform/exynos4-is/fimc-core.c b/drivers/media/platform/exynos4-is/fimc-core.c
index 08d1f39a914c..db6e548fe08e 100644
--- a/drivers/media/platform/exynos4-is/fimc-core.c
+++ b/drivers/media/platform/exynos4-is/fimc-core.c
@@ -214,11 +214,13 @@ static int fimc_get_scaler_factor(u32 src, u32 tar, u32 *ratio, u32 *shift)
 	while (sh--) {
 		u32 tmp = 1 << sh;
 		if (src >= tar * tmp) {
-			*shift = sh, *ratio = tmp;
+			*shift = sh;
+			*ratio = tmp;
 			return 0;
 		}
 	}
-	*shift = 0, *ratio = 1;
+	*shift = 0;
+	*ratio = 1;
 	return 0;
 }
 

^ permalink raw reply related	[flat|nested] 67+ messages in thread

* [PATCH 19/20] media: exynos4-is: use semicolons rather than commas to separate statements
@ 2020-09-29 13:14   ` Julia Lawall
  0 siblings, 0 replies; 67+ messages in thread
From: Julia Lawall @ 2020-09-29 13:14 UTC (permalink / raw)
  To: Kyungmin Park
  Cc: linux-samsung-soc, Valdis Klētnieks, kernel-janitors,
	linux-kernel, Krzysztof Kozlowski, Kukjin Kim,
	Sylwester Nawrocki, Joe Perches, Thomas Gleixner,
	Mauro Carvalho Chehab, linux-arm-kernel, linux-media

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/exynos4-is/fimc-core.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/media/platform/exynos4-is/fimc-core.c b/drivers/media/platform/exynos4-is/fimc-core.c
index 08d1f39a914c..db6e548fe08e 100644
--- a/drivers/media/platform/exynos4-is/fimc-core.c
+++ b/drivers/media/platform/exynos4-is/fimc-core.c
@@ -214,11 +214,13 @@ static int fimc_get_scaler_factor(u32 src, u32 tar, u32 *ratio, u32 *shift)
 	while (sh--) {
 		u32 tmp = 1 << sh;
 		if (src >= tar * tmp) {
-			*shift = sh, *ratio = tmp;
+			*shift = sh;
+			*ratio = tmp;
 			return 0;
 		}
 	}
-	*shift = 0, *ratio = 1;
+	*shift = 0;
+	*ratio = 1;
 	return 0;
 }
 


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 67+ messages in thread

* [PATCH 20/20] media: bttv: use semicolons rather than commas to separate statements
  2020-09-29 13:14 ` Julia Lawall
@ 2020-09-29 13:14   ` Julia Lawall
  -1 siblings, 0 replies; 67+ messages in thread
From: Julia Lawall @ 2020-09-29 13:14 UTC (permalink / raw)
  To: Mauro Carvalho Chehab
  Cc: Valdis Klētnieks, Joe Perches, Thomas Gleixner,
	kernel-janitors, linux-media, linux-kernel

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/pci/bt8xx/bttv-cards.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/media/pci/bt8xx/bttv-cards.c b/drivers/media/pci/bt8xx/bttv-cards.c
index 16148802dabb..ca20b806e82d 100644
--- a/drivers/media/pci/bt8xx/bttv-cards.c
+++ b/drivers/media/pci/bt8xx/bttv-cards.c
@@ -3934,8 +3934,10 @@ static void osprey_eeprom(struct bttv *btv, const u8 ee[256])
 			if (checksum != ee[21])
 				return;
 			cardid = BTTV_BOARD_OSPREY1x0_848;
-			for (i = 12; i < 21; i++)
-				serial *= 10, serial += ee[i] - '0';
+			for (i = 12; i < 21; i++) {
+				serial *= 10;
+				serial += ee[i] - '0';
+			}
 		}
 	} else {
 		unsigned short type;


^ permalink raw reply related	[flat|nested] 67+ messages in thread

* [PATCH 20/20] media: bttv: use semicolons rather than commas to separate statements
@ 2020-09-29 13:14   ` Julia Lawall
  0 siblings, 0 replies; 67+ messages in thread
From: Julia Lawall @ 2020-09-29 13:14 UTC (permalink / raw)
  To: Mauro Carvalho Chehab
  Cc: Valdis Klētnieks, Joe Perches, Thomas Gleixner,
	kernel-janitors, linux-media, linux-kernel

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/pci/bt8xx/bttv-cards.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/media/pci/bt8xx/bttv-cards.c b/drivers/media/pci/bt8xx/bttv-cards.c
index 16148802dabb..ca20b806e82d 100644
--- a/drivers/media/pci/bt8xx/bttv-cards.c
+++ b/drivers/media/pci/bt8xx/bttv-cards.c
@@ -3934,8 +3934,10 @@ static void osprey_eeprom(struct bttv *btv, const u8 ee[256])
 			if (checksum != ee[21])
 				return;
 			cardid = BTTV_BOARD_OSPREY1x0_848;
-			for (i = 12; i < 21; i++)
-				serial *= 10, serial += ee[i] - '0';
+			for (i = 12; i < 21; i++) {
+				serial *= 10;
+				serial += ee[i] - '0';
+			}
 		}
 	} else {
 		unsigned short type;

^ permalink raw reply related	[flat|nested] 67+ messages in thread

* Re: [PATCH 01/20] media: coda: use semicolons rather than commas to separate statements
  2020-09-29 13:14   ` Julia Lawall
@ 2020-09-29 14:06     ` Philipp Zabel
  -1 siblings, 0 replies; 67+ messages in thread
From: Philipp Zabel @ 2020-09-29 14:06 UTC (permalink / raw)
  To: Julia Lawall
  Cc: Valdis Klētnieks, Joe Perches, Thomas Gleixner,
	kernel-janitors, Mauro Carvalho Chehab, linux-media,
	linux-kernel

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

^ permalink raw reply	[flat|nested] 67+ messages in thread

* Re: [PATCH 01/20] media: coda: use semicolons rather than commas to separate statements
@ 2020-09-29 14:06     ` Philipp Zabel
  0 siblings, 0 replies; 67+ messages in thread
From: Philipp Zabel @ 2020-09-29 14:06 UTC (permalink / raw)
  To: Julia Lawall
  Cc: Valdis Klētnieks, Joe Perches, Thomas Gleixner,
	kernel-janitors, Mauro Carvalho Chehab, linux-media,
	linux-kernel

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

^ permalink raw reply	[flat|nested] 67+ messages in thread

* Re: [PATCH 04/20] media: saa7134: use semicolons rather than commas to separate statements
  2020-09-29 13:14   ` Julia Lawall
@ 2020-09-29 15:57     ` Christophe JAILLET
  -1 siblings, 0 replies; 67+ messages in thread
From: Christophe JAILLET @ 2020-09-29 15:57 UTC (permalink / raw)
  To: Julia Lawall, Mauro Carvalho Chehab
  Cc: Valdis Klētnieks, Joe Perches, Thomas Gleixner,
	kernel-janitors, linux-media, linux-kernel

Le 29/09/2020 à 15:14, Julia Lawall a écrit :
> 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/pci/saa7134/saa7134-video.c |    7 +++++--
>   1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/media/pci/saa7134/saa7134-video.c b/drivers/media/pci/saa7134/saa7134-video.c
> index 9a6a6b68f8e3..2ca963b04b3f 100644
> --- a/drivers/media/pci/saa7134/saa7134-video.c
> +++ b/drivers/media/pci/saa7134/saa7134-video.c
> @@ -868,8 +868,11 @@ static int buffer_activate(struct saa7134_dev *dev,
>   		lines_uv = dev->height >> dev->fmt->vshift;
>   		base2    = base + bpl * dev->height;
>   		base3    = base2 + bpl_uv * lines_uv;
> -		if (dev->fmt->uvswap)
> -			tmp = base2, base2 = base3, base3 = tmp;
> +		if (dev->fmt->uvswap) {
> +			tmp = base2;
> +			base2 = base3;
> +			base3 = tmp;
> +		}
>   		video_dbg("uv: bpl=%ld lines=%ld base2/3=%ld/%ld\n",
>   			bpl_uv,lines_uv,base2,base3);
>   		if (V4L2_FIELD_HAS_BOTH(dev->field)) {
> 
> 
Hi,
this could be turned into a simpler:
    swap(base2, base3);

CJ

^ permalink raw reply	[flat|nested] 67+ messages in thread

* Re: [PATCH 04/20] media: saa7134: use semicolons rather than commas to separate statements
@ 2020-09-29 15:57     ` Christophe JAILLET
  0 siblings, 0 replies; 67+ messages in thread
From: Christophe JAILLET @ 2020-09-29 15:57 UTC (permalink / raw)
  To: Julia Lawall, Mauro Carvalho Chehab
  Cc: Valdis Klētnieks, Joe Perches, Thomas Gleixner,
	kernel-janitors, linux-media, linux-kernel

Le 29/09/2020 à 15:14, Julia Lawall a écrit :
> 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/pci/saa7134/saa7134-video.c |    7 +++++--
>   1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/media/pci/saa7134/saa7134-video.c b/drivers/media/pci/saa7134/saa7134-video.c
> index 9a6a6b68f8e3..2ca963b04b3f 100644
> --- a/drivers/media/pci/saa7134/saa7134-video.c
> +++ b/drivers/media/pci/saa7134/saa7134-video.c
> @@ -868,8 +868,11 @@ static int buffer_activate(struct saa7134_dev *dev,
>   		lines_uv = dev->height >> dev->fmt->vshift;
>   		base2    = base + bpl * dev->height;
>   		base3    = base2 + bpl_uv * lines_uv;
> -		if (dev->fmt->uvswap)
> -			tmp = base2, base2 = base3, base3 = tmp;
> +		if (dev->fmt->uvswap) {
> +			tmp = base2;
> +			base2 = base3;
> +			base3 = tmp;
> +		}
>   		video_dbg("uv: bpl=%ld lines=%ld base2/3=%ld/%ld\n",
>   			bpl_uv,lines_uv,base2,base3);
>   		if (V4L2_FIELD_HAS_BOTH(dev->field)) {
> 
> 
Hi,
this could be turned into a simpler:
    swap(base2, base3);

CJ

^ permalink raw reply	[flat|nested] 67+ messages in thread

* Re: [PATCH 10/20] media: lmedm04: use semicolons rather than commas to separate statements
  2020-09-29 13:14   ` Julia Lawall
@ 2020-09-29 16:00     ` Christophe JAILLET
  -1 siblings, 0 replies; 67+ messages in thread
From: Christophe JAILLET @ 2020-09-29 16:00 UTC (permalink / raw)
  To: Julia Lawall, Malcolm Priestley
  Cc: Valdis Klētnieks, Joe Perches, Thomas Gleixner,
	kernel-janitors, Mauro Carvalho Chehab, linux-media,
	linux-kernel

Le 29/09/2020 à 15:14, Julia Lawall a écrit :
> 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/usb/dvb-usb-v2/lmedm04.c |    2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/media/usb/dvb-usb-v2/lmedm04.c b/drivers/media/usb/dvb-usb-v2/lmedm04.c
> index 5a7a9522d46d..9ddda8d68ee0 100644
> --- a/drivers/media/usb/dvb-usb-v2/lmedm04.c
> +++ b/drivers/media/usb/dvb-usb-v2/lmedm04.c
> @@ -391,7 +391,7 @@ static int lme2510_int_read(struct dvb_usb_adapter *adap)
>   	ep = usb_pipe_endpoint(d->udev, lme_int->lme_urb->pipe);
>   
>   	if (usb_endpoint_type(&ep->desc) == USB_ENDPOINT_XFER_BULK)
> -		lme_int->lme_urb->pipe = usb_rcvbulkpipe(d->udev, 0xa),
> +		lme_int->lme_urb->pipe = usb_rcvbulkpipe(d->udev, 0xa);
>   
>   	usb_submit_urb(lme_int->lme_urb, GFP_ATOMIC);
>   	info("INT Interrupt Service Started");
> 
> 
Ouch!

This one looks like a real issue!

CJ

^ permalink raw reply	[flat|nested] 67+ messages in thread

* Re: [PATCH 10/20] media: lmedm04: use semicolons rather than commas to separate statements
@ 2020-09-29 16:00     ` Christophe JAILLET
  0 siblings, 0 replies; 67+ messages in thread
From: Christophe JAILLET @ 2020-09-29 16:00 UTC (permalink / raw)
  To: Julia Lawall, Malcolm Priestley
  Cc: Valdis Klētnieks, Joe Perches, Thomas Gleixner,
	kernel-janitors, Mauro Carvalho Chehab, linux-media,
	linux-kernel

Le 29/09/2020 à 15:14, Julia Lawall a écrit :
> 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/usb/dvb-usb-v2/lmedm04.c |    2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/media/usb/dvb-usb-v2/lmedm04.c b/drivers/media/usb/dvb-usb-v2/lmedm04.c
> index 5a7a9522d46d..9ddda8d68ee0 100644
> --- a/drivers/media/usb/dvb-usb-v2/lmedm04.c
> +++ b/drivers/media/usb/dvb-usb-v2/lmedm04.c
> @@ -391,7 +391,7 @@ static int lme2510_int_read(struct dvb_usb_adapter *adap)
>   	ep = usb_pipe_endpoint(d->udev, lme_int->lme_urb->pipe);
>   
>   	if (usb_endpoint_type(&ep->desc) = USB_ENDPOINT_XFER_BULK)
> -		lme_int->lme_urb->pipe = usb_rcvbulkpipe(d->udev, 0xa),
> +		lme_int->lme_urb->pipe = usb_rcvbulkpipe(d->udev, 0xa);
>   
>   	usb_submit_urb(lme_int->lme_urb, GFP_ATOMIC);
>   	info("INT Interrupt Service Started");
> 
> 
Ouch!

This one looks like a real issue!

CJ

^ permalink raw reply	[flat|nested] 67+ messages in thread

* Re: [PATCH 10/20] media: lmedm04: use semicolons rather than commas to separate statements
  2020-09-29 16:00     ` Christophe JAILLET
@ 2020-09-29 16:42       ` Joe Perches
  -1 siblings, 0 replies; 67+ messages in thread
From: Joe Perches @ 2020-09-29 16:42 UTC (permalink / raw)
  To: Christophe JAILLET
  Cc: Julia Lawall, Malcolm Priestley, Valdis Klētnieks,
	Thomas Gleixner, kernel-janitors, Mauro Carvalho Chehab,
	linux-media, linux-kernel

On 2020-09-29 09:00, Christophe JAILLET wrote:
> Le 29/09/2020 à 15:14, Julia Lawall a écrit :
>> 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/usb/dvb-usb-v2/lmedm04.c |    2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>> 
>> diff --git a/drivers/media/usb/dvb-usb-v2/lmedm04.c 
>> b/drivers/media/usb/dvb-usb-v2/lmedm04.c
>> index 5a7a9522d46d..9ddda8d68ee0 100644
>> --- a/drivers/media/usb/dvb-usb-v2/lmedm04.c
>> +++ b/drivers/media/usb/dvb-usb-v2/lmedm04.c
>> @@ -391,7 +391,7 @@ static int lme2510_int_read(struct dvb_usb_adapter 
>> *adap)
>>   	ep = usb_pipe_endpoint(d->udev, lme_int->lme_urb->pipe);
>>     	if (usb_endpoint_type(&ep->desc) == USB_ENDPOINT_XFER_BULK)
>> -		lme_int->lme_urb->pipe = usb_rcvbulkpipe(d->udev, 0xa),
>> +		lme_int->lme_urb->pipe = usb_rcvbulkpipe(d->udev, 0xa);
>>     	usb_submit_urb(lme_int->lme_urb, GFP_ATOMIC);
>>   	info("INT Interrupt Service Started");
>> 
>> 
> Ouch!
> 
> This one looks like a real issue!


Julia?  Did you do this one by hand?  This actually changes logic which 
I did not expectthe cocci script to do.
> CJ

^ permalink raw reply	[flat|nested] 67+ messages in thread

* Re: [PATCH 10/20] media: lmedm04: use semicolons rather than commas to separate statements
@ 2020-09-29 16:42       ` Joe Perches
  0 siblings, 0 replies; 67+ messages in thread
From: Joe Perches @ 2020-09-29 16:42 UTC (permalink / raw)
  To: Christophe JAILLET
  Cc: Julia Lawall, Malcolm Priestley, Valdis Klētnieks,
	Thomas Gleixner, kernel-janitors, Mauro Carvalho Chehab,
	linux-media, linux-kernel

On 2020-09-29 09:00, Christophe JAILLET wrote:
> Le 29/09/2020 à 15:14, Julia Lawall a écrit :
>> 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/usb/dvb-usb-v2/lmedm04.c |    2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>> 
>> diff --git a/drivers/media/usb/dvb-usb-v2/lmedm04.c 
>> b/drivers/media/usb/dvb-usb-v2/lmedm04.c
>> index 5a7a9522d46d..9ddda8d68ee0 100644
>> --- a/drivers/media/usb/dvb-usb-v2/lmedm04.c
>> +++ b/drivers/media/usb/dvb-usb-v2/lmedm04.c
>> @@ -391,7 +391,7 @@ static int lme2510_int_read(struct dvb_usb_adapter 
>> *adap)
>>   	ep = usb_pipe_endpoint(d->udev, lme_int->lme_urb->pipe);
>>     	if (usb_endpoint_type(&ep->desc) = USB_ENDPOINT_XFER_BULK)
>> -		lme_int->lme_urb->pipe = usb_rcvbulkpipe(d->udev, 0xa),
>> +		lme_int->lme_urb->pipe = usb_rcvbulkpipe(d->udev, 0xa);
>>     	usb_submit_urb(lme_int->lme_urb, GFP_ATOMIC);
>>   	info("INT Interrupt Service Started");
>> 
>> 
> Ouch!
> 
> This one looks like a real issue!


Julia?  Did you do this one by hand?  This actually changes logic which 
I did not expectthe cocci script to do.
> CJ

^ permalink raw reply	[flat|nested] 67+ messages in thread

* Re: [PATCH 10/20] media: lmedm04: use semicolons rather than commas to separate statements
  2020-09-29 16:00     ` Christophe JAILLET
@ 2020-09-29 16:43       ` Julia Lawall
  -1 siblings, 0 replies; 67+ messages in thread
From: Julia Lawall @ 2020-09-29 16:43 UTC (permalink / raw)
  To: Christophe JAILLET
  Cc: Malcolm Priestley, Valdis Klētnieks, Joe Perches,
	Thomas Gleixner, kernel-janitors, Mauro Carvalho Chehab,
	linux-media, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1521 bytes --]



On Tue, 29 Sep 2020, Christophe JAILLET wrote:

> Le 29/09/2020 à 15:14, Julia Lawall a écrit :
> > 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/usb/dvb-usb-v2/lmedm04.c |    2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/media/usb/dvb-usb-v2/lmedm04.c
> > b/drivers/media/usb/dvb-usb-v2/lmedm04.c
> > index 5a7a9522d46d..9ddda8d68ee0 100644
> > --- a/drivers/media/usb/dvb-usb-v2/lmedm04.c
> > +++ b/drivers/media/usb/dvb-usb-v2/lmedm04.c
> > @@ -391,7 +391,7 @@ static int lme2510_int_read(struct dvb_usb_adapter
> > *adap)
> >   	ep = usb_pipe_endpoint(d->udev, lme_int->lme_urb->pipe);
> >     	if (usb_endpoint_type(&ep->desc) == USB_ENDPOINT_XFER_BULK)
> > -		lme_int->lme_urb->pipe = usb_rcvbulkpipe(d->udev, 0xa),
> > +		lme_int->lme_urb->pipe = usb_rcvbulkpipe(d->udev, 0xa);
> >     	usb_submit_urb(lme_int->lme_urb, GFP_ATOMIC);
> >   	info("INT Interrupt Service Started");
> >
> >
> Ouch!
>
> This one looks like a real issue!

Oops, yes, I meant to make a comment about it.

Joe may have sent this patch already.  At least he has sent a patch on an
issue like this.

julia

^ permalink raw reply	[flat|nested] 67+ messages in thread

* Re: [PATCH 10/20] media: lmedm04: use semicolons rather than commas to separate statements
@ 2020-09-29 16:43       ` Julia Lawall
  0 siblings, 0 replies; 67+ messages in thread
From: Julia Lawall @ 2020-09-29 16:43 UTC (permalink / raw)
  To: Christophe JAILLET
  Cc: Malcolm Priestley, Valdis Klētnieks, Joe Perches,
	Thomas Gleixner, kernel-janitors, Mauro Carvalho Chehab,
	linux-media, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1570 bytes --]



On Tue, 29 Sep 2020, Christophe JAILLET wrote:

> Le 29/09/2020 à 15:14, Julia Lawall a écrit :
> > 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/usb/dvb-usb-v2/lmedm04.c |    2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/media/usb/dvb-usb-v2/lmedm04.c
> > b/drivers/media/usb/dvb-usb-v2/lmedm04.c
> > index 5a7a9522d46d..9ddda8d68ee0 100644
> > --- a/drivers/media/usb/dvb-usb-v2/lmedm04.c
> > +++ b/drivers/media/usb/dvb-usb-v2/lmedm04.c
> > @@ -391,7 +391,7 @@ static int lme2510_int_read(struct dvb_usb_adapter
> > *adap)
> >   	ep = usb_pipe_endpoint(d->udev, lme_int->lme_urb->pipe);
> >     	if (usb_endpoint_type(&ep->desc) == USB_ENDPOINT_XFER_BULK)
> > -		lme_int->lme_urb->pipe = usb_rcvbulkpipe(d->udev, 0xa),
> > +		lme_int->lme_urb->pipe = usb_rcvbulkpipe(d->udev, 0xa);
> >     	usb_submit_urb(lme_int->lme_urb, GFP_ATOMIC);
> >   	info("INT Interrupt Service Started");
> >
> >
> Ouch!
>
> This one looks like a real issue!

Oops, yes, I meant to make a comment about it.

Joe may have sent this patch already.  At least he has sent a patch on an
issue like this.

julia

^ permalink raw reply	[flat|nested] 67+ messages in thread

* Re: [PATCH 10/20] media: lmedm04: use semicolons rather than commas to separate statements
  2020-09-29 16:42       ` Joe Perches
@ 2020-09-29 16:44         ` Julia Lawall
  -1 siblings, 0 replies; 67+ messages in thread
From: Julia Lawall @ 2020-09-29 16:44 UTC (permalink / raw)
  To: Joe Perches
  Cc: Christophe JAILLET, Malcolm Priestley, Valdis Klētnieks,
	Thomas Gleixner, kernel-janitors, Mauro Carvalho Chehab,
	linux-media, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1758 bytes --]



On Tue, 29 Sep 2020, Joe Perches wrote:

> On 2020-09-29 09:00, Christophe JAILLET wrote:
> > Le 29/09/2020 à 15:14, Julia Lawall a écrit :
> > > 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/usb/dvb-usb-v2/lmedm04.c |    2 +-
> > >   1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/drivers/media/usb/dvb-usb-v2/lmedm04.c
> > > b/drivers/media/usb/dvb-usb-v2/lmedm04.c
> > > index 5a7a9522d46d..9ddda8d68ee0 100644
> > > --- a/drivers/media/usb/dvb-usb-v2/lmedm04.c
> > > +++ b/drivers/media/usb/dvb-usb-v2/lmedm04.c
> > > @@ -391,7 +391,7 @@ static int lme2510_int_read(struct dvb_usb_adapter
> > > *adap)
> > >   	ep = usb_pipe_endpoint(d->udev, lme_int->lme_urb->pipe);
> > >     	if (usb_endpoint_type(&ep->desc) == USB_ENDPOINT_XFER_BULK)
> > > -		lme_int->lme_urb->pipe = usb_rcvbulkpipe(d->udev, 0xa),
> > > +		lme_int->lme_urb->pipe = usb_rcvbulkpipe(d->udev, 0xa);
> > >     	usb_submit_urb(lme_int->lme_urb, GFP_ATOMIC);
> > >   	info("INT Interrupt Service Started");
> > >
> > >
> > Ouch!
> >
> > This one looks like a real issue!
>
>
> Julia?  Did you do this one by hand?  This actually changes logic which I did
> not expectthe cocci script to do.

No, I didn't do it by hand.  Did you already send this one?  Maybe I
should resend it with a more informative log message.

julia

> > CJ
>

^ permalink raw reply	[flat|nested] 67+ messages in thread

* Re: [PATCH 10/20] media: lmedm04: use semicolons rather than commas to separate statements
@ 2020-09-29 16:44         ` Julia Lawall
  0 siblings, 0 replies; 67+ messages in thread
From: Julia Lawall @ 2020-09-29 16:44 UTC (permalink / raw)
  To: Joe Perches
  Cc: Christophe JAILLET, Malcolm Priestley, Valdis Klētnieks,
	Thomas Gleixner, kernel-janitors, Mauro Carvalho Chehab,
	linux-media, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1758 bytes --]



On Tue, 29 Sep 2020, Joe Perches wrote:

> On 2020-09-29 09:00, Christophe JAILLET wrote:
> > Le 29/09/2020 à 15:14, Julia Lawall a écrit :
> > > 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/usb/dvb-usb-v2/lmedm04.c |    2 +-
> > >   1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/drivers/media/usb/dvb-usb-v2/lmedm04.c
> > > b/drivers/media/usb/dvb-usb-v2/lmedm04.c
> > > index 5a7a9522d46d..9ddda8d68ee0 100644
> > > --- a/drivers/media/usb/dvb-usb-v2/lmedm04.c
> > > +++ b/drivers/media/usb/dvb-usb-v2/lmedm04.c
> > > @@ -391,7 +391,7 @@ static int lme2510_int_read(struct dvb_usb_adapter
> > > *adap)
> > >   	ep = usb_pipe_endpoint(d->udev, lme_int->lme_urb->pipe);
> > >     	if (usb_endpoint_type(&ep->desc) == USB_ENDPOINT_XFER_BULK)
> > > -		lme_int->lme_urb->pipe = usb_rcvbulkpipe(d->udev, 0xa),
> > > +		lme_int->lme_urb->pipe = usb_rcvbulkpipe(d->udev, 0xa);
> > >     	usb_submit_urb(lme_int->lme_urb, GFP_ATOMIC);
> > >   	info("INT Interrupt Service Started");
> > >
> > >
> > Ouch!
> >
> > This one looks like a real issue!
>
>
> Julia?  Did you do this one by hand?  This actually changes logic which I did
> not expectthe cocci script to do.

No, I didn't do it by hand.  Did you already send this one?  Maybe I
should resend it with a more informative log message.

julia

> > CJ
>

^ permalink raw reply	[flat|nested] 67+ messages in thread

* Re: [PATCH 04/20] media: saa7134: use semicolons rather than commas to separate statements
  2020-09-29 15:57     ` Christophe JAILLET
@ 2020-09-29 16:46       ` Julia Lawall
  -1 siblings, 0 replies; 67+ messages in thread
From: Julia Lawall @ 2020-09-29 16:46 UTC (permalink / raw)
  To: Christophe JAILLET
  Cc: Mauro Carvalho Chehab, Valdis Klētnieks, Joe Perches,
	Thomas Gleixner, kernel-janitors, linux-media, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1741 bytes --]



On Tue, 29 Sep 2020, Christophe JAILLET wrote:

> Le 29/09/2020 à 15:14, Julia Lawall a écrit :
> > 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/pci/saa7134/saa7134-video.c |    7 +++++--
> >   1 file changed, 5 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/media/pci/saa7134/saa7134-video.c
> > b/drivers/media/pci/saa7134/saa7134-video.c
> > index 9a6a6b68f8e3..2ca963b04b3f 100644
> > --- a/drivers/media/pci/saa7134/saa7134-video.c
> > +++ b/drivers/media/pci/saa7134/saa7134-video.c
> > @@ -868,8 +868,11 @@ static int buffer_activate(struct saa7134_dev *dev,
> >   		lines_uv = dev->height >> dev->fmt->vshift;
> >   		base2    = base + bpl * dev->height;
> >   		base3    = base2 + bpl_uv * lines_uv;
> > -		if (dev->fmt->uvswap)
> > -			tmp = base2, base2 = base3, base3 = tmp;
> > +		if (dev->fmt->uvswap) {
> > +			tmp = base2;
> > +			base2 = base3;
> > +			base3 = tmp;
> > +		}
> >   		video_dbg("uv: bpl=%ld lines=%ld base2/3=%ld/%ld\n",
> >   			bpl_uv,lines_uv,base2,base3);
> >   		if (V4L2_FIELD_HAS_BOTH(dev->field)) {
> >
> >
> Hi,
> this could be turned into a simpler:
>    swap(base2, base3);

Yes.  The conclusion is probably that it could be worth searching for swap
opportunities after this.  There are a lot of patches to send on these
commas, and I would rather not deviate to something else...

julia

^ permalink raw reply	[flat|nested] 67+ messages in thread

* Re: [PATCH 04/20] media: saa7134: use semicolons rather than commas to separate statements
@ 2020-09-29 16:46       ` Julia Lawall
  0 siblings, 0 replies; 67+ messages in thread
From: Julia Lawall @ 2020-09-29 16:46 UTC (permalink / raw)
  To: Christophe JAILLET
  Cc: Mauro Carvalho Chehab, Valdis Klētnieks, Joe Perches,
	Thomas Gleixner, kernel-janitors, linux-media, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1741 bytes --]



On Tue, 29 Sep 2020, Christophe JAILLET wrote:

> Le 29/09/2020 à 15:14, Julia Lawall a écrit :
> > 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/pci/saa7134/saa7134-video.c |    7 +++++--
> >   1 file changed, 5 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/media/pci/saa7134/saa7134-video.c
> > b/drivers/media/pci/saa7134/saa7134-video.c
> > index 9a6a6b68f8e3..2ca963b04b3f 100644
> > --- a/drivers/media/pci/saa7134/saa7134-video.c
> > +++ b/drivers/media/pci/saa7134/saa7134-video.c
> > @@ -868,8 +868,11 @@ static int buffer_activate(struct saa7134_dev *dev,
> >   		lines_uv = dev->height >> dev->fmt->vshift;
> >   		base2    = base + bpl * dev->height;
> >   		base3    = base2 + bpl_uv * lines_uv;
> > -		if (dev->fmt->uvswap)
> > -			tmp = base2, base2 = base3, base3 = tmp;
> > +		if (dev->fmt->uvswap) {
> > +			tmp = base2;
> > +			base2 = base3;
> > +			base3 = tmp;
> > +		}
> >   		video_dbg("uv: bpl=%ld lines=%ld base2/3=%ld/%ld\n",
> >   			bpl_uv,lines_uv,base2,base3);
> >   		if (V4L2_FIELD_HAS_BOTH(dev->field)) {
> >
> >
> Hi,
> this could be turned into a simpler:
>    swap(base2, base3);

Yes.  The conclusion is probably that it could be worth searching for swap
opportunities after this.  There are a lot of patches to send on these
commas, and I would rather not deviate to something else...

julia

^ permalink raw reply	[flat|nested] 67+ messages in thread

* Re: [PATCH 10/20] media: lmedm04: use semicolons rather than commas to separate statements
  2020-09-29 16:42       ` Joe Perches
@ 2020-09-29 16:56         ` Julia Lawall
  -1 siblings, 0 replies; 67+ messages in thread
From: Julia Lawall @ 2020-09-29 16:56 UTC (permalink / raw)
  To: Joe Perches
  Cc: Christophe JAILLET, Malcolm Priestley, Valdis Klētnieks,
	Thomas Gleixner, kernel-janitors, Mauro Carvalho Chehab,
	linux-media, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1724 bytes --]



On Tue, 29 Sep 2020, Joe Perches wrote:

> On 2020-09-29 09:00, Christophe JAILLET wrote:
> > Le 29/09/2020 à 15:14, Julia Lawall a écrit :
> > > 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/usb/dvb-usb-v2/lmedm04.c |    2 +-
> > >   1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/drivers/media/usb/dvb-usb-v2/lmedm04.c
> > > b/drivers/media/usb/dvb-usb-v2/lmedm04.c
> > > index 5a7a9522d46d..9ddda8d68ee0 100644
> > > --- a/drivers/media/usb/dvb-usb-v2/lmedm04.c
> > > +++ b/drivers/media/usb/dvb-usb-v2/lmedm04.c
> > > @@ -391,7 +391,7 @@ static int lme2510_int_read(struct dvb_usb_adapter
> > > *adap)
> > >   	ep = usb_pipe_endpoint(d->udev, lme_int->lme_urb->pipe);
> > >     	if (usb_endpoint_type(&ep->desc) == USB_ENDPOINT_XFER_BULK)
> > > -		lme_int->lme_urb->pipe = usb_rcvbulkpipe(d->udev, 0xa),
> > > +		lme_int->lme_urb->pipe = usb_rcvbulkpipe(d->udev, 0xa);
> > >     	usb_submit_urb(lme_int->lme_urb, GFP_ATOMIC);
> > >   	info("INT Interrupt Service Started");
> > >
> > >
> > Ouch!
> >
> > This one looks like a real issue!
>
>
> Julia?  Did you do this one by hand?  This actually changes logic which I did
> not expectthe cocci script to do.

Joe already submitted this patch so please ignore my version:

https://lkml.org/lkml/2020/8/23/178

julia

^ permalink raw reply	[flat|nested] 67+ messages in thread

* Re: [PATCH 10/20] media: lmedm04: use semicolons rather than commas to separate statements
@ 2020-09-29 16:56         ` Julia Lawall
  0 siblings, 0 replies; 67+ messages in thread
From: Julia Lawall @ 2020-09-29 16:56 UTC (permalink / raw)
  To: Joe Perches
  Cc: Christophe JAILLET, Malcolm Priestley, Valdis Klētnieks,
	Thomas Gleixner, kernel-janitors, Mauro Carvalho Chehab,
	linux-media, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1724 bytes --]



On Tue, 29 Sep 2020, Joe Perches wrote:

> On 2020-09-29 09:00, Christophe JAILLET wrote:
> > Le 29/09/2020 à 15:14, Julia Lawall a écrit :
> > > 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/usb/dvb-usb-v2/lmedm04.c |    2 +-
> > >   1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/drivers/media/usb/dvb-usb-v2/lmedm04.c
> > > b/drivers/media/usb/dvb-usb-v2/lmedm04.c
> > > index 5a7a9522d46d..9ddda8d68ee0 100644
> > > --- a/drivers/media/usb/dvb-usb-v2/lmedm04.c
> > > +++ b/drivers/media/usb/dvb-usb-v2/lmedm04.c
> > > @@ -391,7 +391,7 @@ static int lme2510_int_read(struct dvb_usb_adapter
> > > *adap)
> > >   	ep = usb_pipe_endpoint(d->udev, lme_int->lme_urb->pipe);
> > >     	if (usb_endpoint_type(&ep->desc) == USB_ENDPOINT_XFER_BULK)
> > > -		lme_int->lme_urb->pipe = usb_rcvbulkpipe(d->udev, 0xa),
> > > +		lme_int->lme_urb->pipe = usb_rcvbulkpipe(d->udev, 0xa);
> > >     	usb_submit_urb(lme_int->lme_urb, GFP_ATOMIC);
> > >   	info("INT Interrupt Service Started");
> > >
> > >
> > Ouch!
> >
> > This one looks like a real issue!
>
>
> Julia?  Did you do this one by hand?  This actually changes logic which I did
> not expectthe cocci script to do.

Joe already submitted this patch so please ignore my version:

https://lkml.org/lkml/2020/8/23/178

julia

^ permalink raw reply	[flat|nested] 67+ messages in thread

* Re: [PATCH 10/20] media: lmedm04: use semicolons rather than commas to separate statements
  2020-09-29 16:42       ` Joe Perches
@ 2020-09-29 18:43         ` Julia Lawall
  -1 siblings, 0 replies; 67+ messages in thread
From: Julia Lawall @ 2020-09-29 18:43 UTC (permalink / raw)
  To: Joe Perches
  Cc: Christophe JAILLET, Malcolm Priestley, Valdis Klētnieks,
	Thomas Gleixner, kernel-janitors, Mauro Carvalho Chehab,
	linux-media, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1919 bytes --]



On Tue, 29 Sep 2020, Joe Perches wrote:

> On 2020-09-29 09:00, Christophe JAILLET wrote:
> > Le 29/09/2020 à 15:14, Julia Lawall a écrit :
> > > 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/usb/dvb-usb-v2/lmedm04.c |    2 +-
> > >   1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/drivers/media/usb/dvb-usb-v2/lmedm04.c
> > > b/drivers/media/usb/dvb-usb-v2/lmedm04.c
> > > index 5a7a9522d46d..9ddda8d68ee0 100644
> > > --- a/drivers/media/usb/dvb-usb-v2/lmedm04.c
> > > +++ b/drivers/media/usb/dvb-usb-v2/lmedm04.c
> > > @@ -391,7 +391,7 @@ static int lme2510_int_read(struct dvb_usb_adapter
> > > *adap)
> > >   	ep = usb_pipe_endpoint(d->udev, lme_int->lme_urb->pipe);
> > >     	if (usb_endpoint_type(&ep->desc) == USB_ENDPOINT_XFER_BULK)
> > > -		lme_int->lme_urb->pipe = usb_rcvbulkpipe(d->udev, 0xa),
> > > +		lme_int->lme_urb->pipe = usb_rcvbulkpipe(d->udev, 0xa);
> > >     	usb_submit_urb(lme_int->lme_urb, GFP_ATOMIC);
> > >   	info("INT Interrupt Service Started");
> > >
> > >
> > Ouch!
> >
> > This one looks like a real issue!
>
>
> Julia?  Did you do this one by hand?  This actually changes logic which I did
> not expectthe cocci script to do.

I think that there is something wrong with the implementation of the rule
that considers the case where the two statements are not on the same line.
For some reason, it is not triggering the addition of {}.  I will have to
look into it.  Otherwise, all of the {}s were put there automatically.

julia

^ permalink raw reply	[flat|nested] 67+ messages in thread

* Re: [PATCH 10/20] media: lmedm04: use semicolons rather than commas to separate statements
@ 2020-09-29 18:43         ` Julia Lawall
  0 siblings, 0 replies; 67+ messages in thread
From: Julia Lawall @ 2020-09-29 18:43 UTC (permalink / raw)
  To: Joe Perches
  Cc: Christophe JAILLET, Malcolm Priestley, Valdis Klētnieks,
	Thomas Gleixner, kernel-janitors, Mauro Carvalho Chehab,
	linux-media, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1919 bytes --]



On Tue, 29 Sep 2020, Joe Perches wrote:

> On 2020-09-29 09:00, Christophe JAILLET wrote:
> > Le 29/09/2020 à 15:14, Julia Lawall a écrit :
> > > 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/usb/dvb-usb-v2/lmedm04.c |    2 +-
> > >   1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/drivers/media/usb/dvb-usb-v2/lmedm04.c
> > > b/drivers/media/usb/dvb-usb-v2/lmedm04.c
> > > index 5a7a9522d46d..9ddda8d68ee0 100644
> > > --- a/drivers/media/usb/dvb-usb-v2/lmedm04.c
> > > +++ b/drivers/media/usb/dvb-usb-v2/lmedm04.c
> > > @@ -391,7 +391,7 @@ static int lme2510_int_read(struct dvb_usb_adapter
> > > *adap)
> > >   	ep = usb_pipe_endpoint(d->udev, lme_int->lme_urb->pipe);
> > >     	if (usb_endpoint_type(&ep->desc) == USB_ENDPOINT_XFER_BULK)
> > > -		lme_int->lme_urb->pipe = usb_rcvbulkpipe(d->udev, 0xa),
> > > +		lme_int->lme_urb->pipe = usb_rcvbulkpipe(d->udev, 0xa);
> > >     	usb_submit_urb(lme_int->lme_urb, GFP_ATOMIC);
> > >   	info("INT Interrupt Service Started");
> > >
> > >
> > Ouch!
> >
> > This one looks like a real issue!
>
>
> Julia?  Did you do this one by hand?  This actually changes logic which I did
> not expectthe cocci script to do.

I think that there is something wrong with the implementation of the rule
that considers the case where the two statements are not on the same line.
For some reason, it is not triggering the addition of {}.  I will have to
look into it.  Otherwise, all of the {}s were put there automatically.

julia

^ permalink raw reply	[flat|nested] 67+ messages in thread

* Re: [PATCH 10/20] media: lmedm04: use semicolons rather than commas to separate statements
  2020-09-29 16:44         ` Julia Lawall
@ 2020-09-29 22:21           ` Joe Perches
  -1 siblings, 0 replies; 67+ messages in thread
From: Joe Perches @ 2020-09-29 22:21 UTC (permalink / raw)
  To: Julia Lawall
  Cc: Christophe JAILLET, Malcolm Priestley, Valdis Klētnieks,
	Thomas Gleixner, kernel-janitors, Mauro Carvalho Chehab,
	linux-media, linux-kernel

On Tue, 2020-09-29 at 18:44 +0200, Julia Lawall wrote:
> On Tue, 29 Sep 2020, Joe Perches wrote:
> > On 2020-09-29 09:00, Christophe JAILLET wrote:
> > > Le 29/09/2020 à 15:14, Julia Lawall a écrit :
> > > > 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/usb/dvb-usb-v2/lmedm04.c |    2 +-
> > > >   1 file changed, 1 insertion(+), 1 deletion(-)
> > > > 
> > > > diff --git a/drivers/media/usb/dvb-usb-v2/lmedm04.c
> > > > b/drivers/media/usb/dvb-usb-v2/lmedm04.c
> > > > index 5a7a9522d46d..9ddda8d68ee0 100644
> > > > --- a/drivers/media/usb/dvb-usb-v2/lmedm04.c
> > > > +++ b/drivers/media/usb/dvb-usb-v2/lmedm04.c
> > > > @@ -391,7 +391,7 @@ static int lme2510_int_read(struct dvb_usb_adapter
> > > > *adap)
> > > >   	ep = usb_pipe_endpoint(d->udev, lme_int->lme_urb->pipe);
> > > >     	if (usb_endpoint_type(&ep->desc) == USB_ENDPOINT_XFER_BULK)
> > > > -		lme_int->lme_urb->pipe = usb_rcvbulkpipe(d->udev, 0xa),
> > > > +		lme_int->lme_urb->pipe = usb_rcvbulkpipe(d->udev, 0xa);
> > > >     	usb_submit_urb(lme_int->lme_urb, GFP_ATOMIC);
> > > >   	info("INT Interrupt Service Started");
> > > > 
> > > > 
> > > Ouch!
> > > 
> > > This one looks like a real issue!
> > 
> > Julia?  Did you do this one by hand?  This actually changes logic which I did
> > not expectthe cocci script to do.
> 
> No, I didn't do it by hand.  Did you already send this one?  Maybe I
> should resend it with a more informative log message.

I did not send a patch for this one.

Yes, I think you should say you are fixing
a likely defect here.



^ permalink raw reply	[flat|nested] 67+ messages in thread

* Re: [PATCH 10/20] media: lmedm04: use semicolons rather than commas to separate statements
@ 2020-09-29 22:21           ` Joe Perches
  0 siblings, 0 replies; 67+ messages in thread
From: Joe Perches @ 2020-09-29 22:21 UTC (permalink / raw)
  To: Julia Lawall
  Cc: Christophe JAILLET, Malcolm Priestley, Valdis Klētnieks,
	Thomas Gleixner, kernel-janitors, Mauro Carvalho Chehab,
	linux-media, linux-kernel

On Tue, 2020-09-29 at 18:44 +0200, Julia Lawall wrote:
> On Tue, 29 Sep 2020, Joe Perches wrote:
> > On 2020-09-29 09:00, Christophe JAILLET wrote:
> > > Le 29/09/2020 à 15:14, Julia Lawall a écrit :
> > > > 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/usb/dvb-usb-v2/lmedm04.c |    2 +-
> > > >   1 file changed, 1 insertion(+), 1 deletion(-)
> > > > 
> > > > diff --git a/drivers/media/usb/dvb-usb-v2/lmedm04.c
> > > > b/drivers/media/usb/dvb-usb-v2/lmedm04.c
> > > > index 5a7a9522d46d..9ddda8d68ee0 100644
> > > > --- a/drivers/media/usb/dvb-usb-v2/lmedm04.c
> > > > +++ b/drivers/media/usb/dvb-usb-v2/lmedm04.c
> > > > @@ -391,7 +391,7 @@ static int lme2510_int_read(struct dvb_usb_adapter
> > > > *adap)
> > > >   	ep = usb_pipe_endpoint(d->udev, lme_int->lme_urb->pipe);
> > > >     	if (usb_endpoint_type(&ep->desc) = USB_ENDPOINT_XFER_BULK)
> > > > -		lme_int->lme_urb->pipe = usb_rcvbulkpipe(d->udev, 0xa),
> > > > +		lme_int->lme_urb->pipe = usb_rcvbulkpipe(d->udev, 0xa);
> > > >     	usb_submit_urb(lme_int->lme_urb, GFP_ATOMIC);
> > > >   	info("INT Interrupt Service Started");
> > > > 
> > > > 
> > > Ouch!
> > > 
> > > This one looks like a real issue!
> > 
> > Julia?  Did you do this one by hand?  This actually changes logic which I did
> > not expectthe cocci script to do.
> 
> No, I didn't do it by hand.  Did you already send this one?  Maybe I
> should resend it with a more informative log message.

I did not send a patch for this one.

Yes, I think you should say you are fixing
a likely defect here.

^ permalink raw reply	[flat|nested] 67+ messages in thread

* Re: [PATCH 10/20] media: lmedm04: use semicolons rather than commas to separate statements
  2020-09-29 22:21           ` Joe Perches
@ 2020-09-30  1:27             ` Joe Perches
  -1 siblings, 0 replies; 67+ messages in thread
From: Joe Perches @ 2020-09-30  1:27 UTC (permalink / raw)
  To: Julia Lawall
  Cc: Christophe JAILLET, Malcolm Priestley, Valdis Klētnieks,
	Thomas Gleixner, kernel-janitors, Mauro Carvalho Chehab,
	linux-media, linux-kernel

On Tue, 2020-09-29 at 15:21 -0700, Joe Perches wrote:
> I did not send a patch for this one.

Well, I guess I did and forgot.

I thought this was about the braces and semicolons
addition around multi-statement commas, and I
didn't send a patch for this file for that.

cheers, Joe



^ permalink raw reply	[flat|nested] 67+ messages in thread

* Re: [PATCH 10/20] media: lmedm04: use semicolons rather than commas to separate statements
@ 2020-09-30  1:27             ` Joe Perches
  0 siblings, 0 replies; 67+ messages in thread
From: Joe Perches @ 2020-09-30  1:27 UTC (permalink / raw)
  To: Julia Lawall
  Cc: Christophe JAILLET, Malcolm Priestley, Valdis Klētnieks,
	Thomas Gleixner, kernel-janitors, Mauro Carvalho Chehab,
	linux-media, linux-kernel

On Tue, 2020-09-29 at 15:21 -0700, Joe Perches wrote:
> I did not send a patch for this one.

Well, I guess I did and forgot.

I thought this was about the braces and semicolons
addition around multi-statement commas, and I
didn't send a patch for this file for that.

cheers, Joe

^ permalink raw reply	[flat|nested] 67+ messages in thread

end of thread, other threads:[~2020-09-30  1:27 UTC | newest]

Thread overview: 67+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-29 13:14 [PATCH 00/20] media: use semicolons rather than commas to separate statements Julia Lawall
2020-09-29 13:14 ` Julia Lawall
2020-09-29 13:14 ` Julia Lawall
2020-09-29 13:14 ` [PATCH 01/20] media: coda: " Julia Lawall
2020-09-29 13:14   ` Julia Lawall
2020-09-29 14:06   ` Philipp Zabel
2020-09-29 14:06     ` Philipp Zabel
2020-09-29 13:14 ` [PATCH 02/20] media: em28xx-audio: " Julia Lawall
2020-09-29 13:14   ` Julia Lawall
2020-09-29 13:14 ` [PATCH 03/20] media: rtl28xxu: " Julia Lawall
2020-09-29 13:14   ` Julia Lawall
2020-09-29 13:14 ` [PATCH 04/20] media: saa7134: " Julia Lawall
2020-09-29 13:14   ` Julia Lawall
2020-09-29 15:57   ` Christophe JAILLET
2020-09-29 15:57     ` Christophe JAILLET
2020-09-29 16:46     ` Julia Lawall
2020-09-29 16:46       ` Julia Lawall
2020-09-29 13:14 ` [PATCH 05/20] media: m88ds3103: " Julia Lawall
2020-09-29 13:14   ` Julia Lawall
2020-09-29 13:14 ` [PATCH 06/20] media: gspca: ov534-ov772x: " Julia Lawall
2020-09-29 13:14   ` Julia Lawall
2020-09-29 13:14 ` [PATCH 07/20] media: s3c-camif: " Julia Lawall
2020-09-29 13:14   ` Julia Lawall
2020-09-29 13:14 ` [PATCH 08/20] media: sun4i-csi: " Julia Lawall
2020-09-29 13:14   ` Julia Lawall
2020-09-29 13:14   ` Julia Lawall
2020-09-29 13:14 ` [PATCH 09/20] media: pvrusb2: " Julia Lawall
2020-09-29 13:14   ` Julia Lawall
2020-09-29 13:14 ` [PATCH 10/20] media: lmedm04: " Julia Lawall
2020-09-29 13:14   ` Julia Lawall
2020-09-29 16:00   ` Christophe JAILLET
2020-09-29 16:00     ` Christophe JAILLET
2020-09-29 16:42     ` Joe Perches
2020-09-29 16:42       ` Joe Perches
2020-09-29 16:44       ` Julia Lawall
2020-09-29 16:44         ` Julia Lawall
2020-09-29 22:21         ` Joe Perches
2020-09-29 22:21           ` Joe Perches
2020-09-30  1:27           ` Joe Perches
2020-09-30  1:27             ` Joe Perches
2020-09-29 16:56       ` Julia Lawall
2020-09-29 16:56         ` Julia Lawall
2020-09-29 18:43       ` Julia Lawall
2020-09-29 18:43         ` Julia Lawall
2020-09-29 16:43     ` Julia Lawall
2020-09-29 16:43       ` Julia Lawall
2020-09-29 13:14 ` [PATCH 11/20] media: ts2020: " Julia Lawall
2020-09-29 13:14   ` Julia Lawall
2020-09-29 13:14 ` [PATCH 12/20] media: msp3400: " Julia Lawall
2020-09-29 13:14   ` Julia Lawall
2020-09-29 13:14 ` [PATCH 13/20] media: radio-sf16fmr2: " Julia Lawall
2020-09-29 13:14   ` Julia Lawall
2020-09-29 13:14 ` [PATCH 14/20] media: mt2060: " Julia Lawall
2020-09-29 13:14   ` Julia Lawall
2020-09-29 13:14 ` [PATCH 15/20] media: au0828: " Julia Lawall
2020-09-29 13:14   ` Julia Lawall
2020-09-29 13:14 ` [PATCH 16/20] media: dvbsky: " Julia Lawall
2020-09-29 13:14   ` Julia Lawall
2020-09-29 13:14 ` [PATCH 17/20] media: dib0700: " Julia Lawall
2020-09-29 13:14   ` Julia Lawall
2020-09-29 13:14 ` [PATCH 18/20] media: rtl2832: " Julia Lawall
2020-09-29 13:14   ` Julia Lawall
2020-09-29 13:14 ` [PATCH 19/20] media: exynos4-is: " Julia Lawall
2020-09-29 13:14   ` Julia Lawall
2020-09-29 13:14   ` Julia Lawall
2020-09-29 13:14 ` [PATCH 20/20] media: bttv: " Julia Lawall
2020-09-29 13:14   ` Julia Lawall

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.