Skip to contentSkip to conversation

IIO: Tidy up inconsistent spacing in ID tables.

PATCH In review Jonathan Cameron 2 participants 34 messages Dec 30, 2021 – Jan 9, 2022

Subsystems (7)
lore
Share & tools
lore

Jonathan Cameron

author maintainer
#0 lore raw

cover IIO: Tidy up inconsistent spacing in ID tables.

From: Jonathan Cameron <[email protected]>

Andy's review of Gwendal's sx9324 patch included a comment on having a space before the } in id tables. It is a more general comment, but this series only addresses the id table cases where things are inconsistent. I said I would send a clean up set when I got bored. That happened sooner than expected (I blame tax returns).

Found using:
git grep -re "[0-9A-Za-z]}" drivers/iio/ | grep "{\ "

Note that the fact that we have a clump of these in proximity drivers suggests that copy and paste is leading to this odd bit of formatting getting copied into new drivers.

As ever, some of these don't have active driver maintainers so please take a quick look at the whole series if you have time.

Thanks,

Jonathan

Cc Matt Ranostay <[email protected]>
Cc Parthiban Nallathambi <[email protected]>
Cc Nikita Travkin <[email protected]>
Cc Maslov Dmitry <[email protected]>
Cc Andreas Klinger <[email protected]>
Cc Antoniu Miclaus <[email protected]>
Cc Zhiyong Tao <[email protected]>
Cc Hui Liu <[email protected]>
Cc Gwendal Grignou <[email protected]>
Cc Ivan Drobyshevskyi <[email protected]>

Jonathan Cameron (16):
iio:chemical:atlas: Trivial white space cleanup to add space before } iio:light:pa12203001: Tidy up white space change to add spaces after {

    and before }

iio:light:vcnl4035: Trivial whitespace cleanup to add space before } iio:light:us5182: White space cleanup of spacing around {} in id
tables
iio:light:ltr501: White space cleanup of spacing around {} in id
tables
iio:proximity:ping: White space cleanup of spacing around {} in id
tables
iio:proximity:rfd77402: White space cleanup of spacing around {} in id
tables
iio:proximity:srf04: White space cleanup of spacing around {} in id
tables
iio:proximity:srf08: White space cleanup of spacing around {} in id
tables
iio:frequency:admv1013: White space cleanup of spacing around {} in id
tables
iio:adc:mt6577_auxadc: Tidy up white space around {} in id tables iio:adc:hi8435: Tidy up white space around {} in id tables iio:adc:ti-adc084s021: Tidy up white space around {} iio:light:tsl2722: Fix inconsistent spacing before } in id table iio:proximity:vl53l0x: Tidy up white space around {} in id tables iio:accel:dmard09: Tidy up white space around {} in id table

 drivers/iio/accel/dmard09.c         |  2 +-
 drivers/iio/adc/hi8435.c            |  2 +-
 drivers/iio/adc/mt6577_auxadc.c     | 10 +++++-----
 drivers/iio/adc/ti-adc084s021.c     |  2 +-
 drivers/iio/chemical/atlas-sensor.c | 10 +++++-----
 drivers/iio/frequency/admv1013.c    |  2 +-
 drivers/iio/light/ltr501.c          | 14 +++++++-------
 drivers/iio/light/pa12203001.c      |  4 ++--
 drivers/iio/light/tsl2772.c         |  2 +-
 drivers/iio/light/us5182d.c         |  6 +++---
 drivers/iio/light/vcnl4035.c        |  2 +-
 drivers/iio/proximity/ping.c        |  4 ++--
 drivers/iio/proximity/rfd77402.c    |  2 +-
 drivers/iio/proximity/srf04.c       | 12 ++++++------
 drivers/iio/proximity/srf08.c       |  6 +++---
 drivers/iio/proximity/vl53l0x-i2c.c |  2 +-
 16 files changed, 41 insertions(+), 41 deletions(-)
Signature · 1 line
2.34.1
author maintainer
#1 lore raw

PATCH 1/16 iio:chemical:atlas: Trivial white space cleanup to add space before }

From: Jonathan Cameron <[email protected]>

Having a space after the { and not one before the } is inconsistent and good to remove examples that might get copied into new drivers.

---
 drivers/iio/chemical/atlas-sensor.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/iio/chemical/atlas-sensor.c +5 -5
index 04b44a327614..a8211dd20b35 100644
@@ -589,11 +589,11 @@ static const struct iio_info atlas_info = {
 };
 
 static const struct i2c_device_id atlas_id[] = {
-	{ "atlas-ph-sm", ATLAS_PH_SM},
-	{ "atlas-ec-sm", ATLAS_EC_SM},
-	{ "atlas-orp-sm", ATLAS_ORP_SM},
-	{ "atlas-do-sm", ATLAS_DO_SM},
-	{ "atlas-rtd-sm", ATLAS_RTD_SM},
+	{ "atlas-ph-sm", ATLAS_PH_SM },
+	{ "atlas-ec-sm", ATLAS_EC_SM },
+	{ "atlas-orp-sm", ATLAS_ORP_SM },
+	{ "atlas-do-sm", ATLAS_DO_SM },
+	{ "atlas-rtd-sm", ATLAS_RTD_SM },
 	{}
 };
 MODULE_DEVICE_TABLE(i2c, atlas_id);
Signature · 1 line
2.34.1
Reviewed-by on v1 1/16
#2 lore raw

Re: [PATCH 01/16] iio:chemical:atlas: Trivial white space cleanup to add space before }

Quoted 9 lines · Jonathan Cameron

From: Jonathan Cameron <[email protected]>

Having a space after the { and not one before the } is inconsistent and good to remove examples that might get copied into new drivers.

---

Quoted 27 lines
 drivers/iio/chemical/atlas-sensor.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/iio/chemical/atlas-sensor.c +5 -6
index 04b44a327614..a8211dd20b35 100644
@@ -589,11 +589,11 @@ static const struct iio_info atlas_info = {
 };
 
 static const struct i2c_device_id atlas_id[] = {
-       { "atlas-ph-sm", ATLAS_PH_SM},
-       { "atlas-ec-sm", ATLAS_EC_SM},
-       { "atlas-orp-sm", ATLAS_ORP_SM},
-       { "atlas-do-sm", ATLAS_DO_SM},
-       { "atlas-rtd-sm", ATLAS_RTD_SM},
+       { "atlas-ph-sm", ATLAS_PH_SM },
+       { "atlas-ec-sm", ATLAS_EC_SM },
+       { "atlas-orp-sm", ATLAS_ORP_SM },
+       { "atlas-do-sm", ATLAS_DO_SM },
+       { "atlas-rtd-sm", ATLAS_RTD_SM },
        {}
 };
 MODULE_DEVICE_TABLE(i2c, atlas_id);
--

2.34.1

author maintainer
#3 lore raw

PATCH 2/16 iio:light:pa12203001: Tidy up white space change to add spaces after { and before }

In reply to Jonathan Cameron

From: Jonathan Cameron <[email protected]>

One case in here was inconsistent and was main focus of this patch. In that case there was a space after the { and none before the }. The second case was then inconsistent in having now spaces. Change makes sure there are spaces.

---
 drivers/iio/light/pa12203001.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/iio/light/pa12203001.c +2 -2
index a52b2c788540..528fa5dd2b13 100644
@@ -452,14 +452,14 @@ static const struct dev_pm_ops pa12203001_pm_ops = {
 };
 
 static const struct acpi_device_id pa12203001_acpi_match[] = {
-	{ "TXCPA122", 0},
+	{ "TXCPA122", 0 },
 	{}
 };
 
 MODULE_DEVICE_TABLE(acpi, pa12203001_acpi_match);
 
 static const struct i2c_device_id pa12203001_id[] = {
-		{"txcpa122", 0},
+		{ "txcpa122", 0 },
 		{}
 };
 
Signature · 1 line
2.34.1
Reviewed-by on v1 2/16
#4 lore raw

Re: [PATCH 02/16] iio:light:pa12203001: Tidy up white space change to add spaces after { and before }

Quoted 10 lines · Jonathan Cameron

From: Jonathan Cameron <[email protected]>

One case in here was inconsistent and was main focus of this patch. In that case there was a space after the { and none before the }. The second case was then inconsistent in having now spaces. Change makes sure there are spaces.

---

Quoted 27 lines
 drivers/iio/light/pa12203001.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/iio/light/pa12203001.c +2 -3
index a52b2c788540..528fa5dd2b13 100644
@@ -452,14 +452,14 @@ static const struct dev_pm_ops pa12203001_pm_ops = {
 };
 
 static const struct acpi_device_id pa12203001_acpi_match[] = {
-       { "TXCPA122", 0},
+       { "TXCPA122", 0 },
        {}
 };
 
 MODULE_DEVICE_TABLE(acpi, pa12203001_acpi_match);
 
 static const struct i2c_device_id pa12203001_id[] = {
-               {"txcpa122", 0},
+               { "txcpa122", 0 },
                {}
 };
 
--

2.34.1

author maintainer
#5 lore raw

PATCH 3/16 iio:light:vcnl4035: Trivial whitespace cleanup to add space before }

In reply to Jonathan Cameron

From: Jonathan Cameron <[email protected]>

Having a space after the { and not one before the } is inconsistent and I'd rather not have examples of this that get copied into new drivers.

Cc Parthiban Nallathambi <[email protected]>
---
 drivers/iio/light/vcnl4035.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/light/vcnl4035.c +1 -1
index 0db306ee910e..da2bf622a67b 100644
@@ -651,7 +651,7 @@ static const struct dev_pm_ops vcnl4035_pm_ops = {
 };
 
 static const struct i2c_device_id vcnl4035_id[] = {
-	{ "vcnl4035", 0},
+	{ "vcnl4035", 0 },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, vcnl4035_id);
Signature · 1 line
2.34.1
Reviewed-by on v1 3/16
#6 lore raw

Re: [PATCH 03/16] iio:light:vcnl4035: Trivial whitespace cleanup to add space before }

Quoted 9 lines · Jonathan Cameron

From: Jonathan Cameron <[email protected]>

Having a space after the { and not one before the } is inconsistent and I'd rather not have examples of this that get copied into new drivers.

Cc Parthiban Nallathambi <[email protected]>

---

Quoted 19 lines
 drivers/iio/light/vcnl4035.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/light/vcnl4035.c +1 -2
index 0db306ee910e..da2bf622a67b 100644
@@ -651,7 +651,7 @@ static const struct dev_pm_ops vcnl4035_pm_ops = {
 };
 
 static const struct i2c_device_id vcnl4035_id[] = {
-       { "vcnl4035", 0},
+       { "vcnl4035", 0 },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, vcnl4035_id);
--

2.34.1

author maintainer
#7 lore raw

PATCH 4/16 iio:light:us5182: White space cleanup of spacing around {} in id tables

In reply to Jonathan Cameron

From: Jonathan Cameron <[email protected]>

The spacing in this driver was inconsistent so make sure we have a space after { and before } for the two id tables.

---
 drivers/iio/light/us5182d.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/iio/light/us5182d.c +3 -3
index 96e4a66ddf28..1492aaf8d84c 100644
@@ -947,15 +947,15 @@ static const struct dev_pm_ops us5182d_pm_ops = {
 };
 
 static const struct acpi_device_id us5182d_acpi_match[] = {
-	{ "USD5182", 0},
+	{ "USD5182", 0 },
 	{}
 };
 
 MODULE_DEVICE_TABLE(acpi, us5182d_acpi_match);
 
 static const struct i2c_device_id us5182d_id[] = {
-		{"usd5182", 0},
-		{}
+	{ "usd5182", 0 },
+	{}
 };
 
 MODULE_DEVICE_TABLE(i2c, us5182d_id);
Signature · 1 line
2.34.1
Reviewed-by on v1 4/16
#8 lore raw

Re: [PATCH 04/16] iio:light:us5182: White space cleanup of spacing around {} in id tables

Quoted 8 lines · Jonathan Cameron

From: Jonathan Cameron <[email protected]>

The spacing in this driver was inconsistent so make sure we have a space after { and before } for the two id tables.

---

Quoted 29 lines
 drivers/iio/light/us5182d.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/iio/light/us5182d.c +3 -4
index 96e4a66ddf28..1492aaf8d84c 100644
@@ -947,15 +947,15 @@ static const struct dev_pm_ops us5182d_pm_ops = {
 };
 
 static const struct acpi_device_id us5182d_acpi_match[] = {
-       { "USD5182", 0},
+       { "USD5182", 0 },
        {}
 };
 
 MODULE_DEVICE_TABLE(acpi, us5182d_acpi_match);
 
 static const struct i2c_device_id us5182d_id[] = {
-               {"usd5182", 0},
-               {}
+       { "usd5182", 0 },
+       {}
 };
 
 MODULE_DEVICE_TABLE(i2c, us5182d_id);
--

2.34.1

author maintainer
#9 lore raw

PATCH 5/16 iio:light:ltr501: White space cleanup of spacing around {} in id tables

In reply to Jonathan Cameron

From: Jonathan Cameron <[email protected]>

The spacing in this driver was inconsistent so make sure we have a space after { and before } for the two id tables.
Part of aim is to avoid providing examples of this inconsistency that get copied into new drivers.

Cc Nikita Travkin <[email protected]>
Cc Maslov Dmitry <[email protected]>
---
 drivers/iio/light/ltr501.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
drivers/iio/light/ltr501.c +7 -7
index 47d61ec2bb50..d1532ef5f08b 100644
@@ -1632,18 +1632,18 @@ static int ltr501_resume(struct device *dev)
 static SIMPLE_DEV_PM_OPS(ltr501_pm_ops, ltr501_suspend, ltr501_resume);
 
 static const struct acpi_device_id ltr_acpi_match[] = {
-	{"LTER0501", ltr501},
-	{"LTER0559", ltr559},
-	{"LTER0301", ltr301},
+	{ "LTER0501", ltr501 },
+	{ "LTER0559", ltr559 },
+	{ "LTER0301", ltr301 },
 	{ },
 };
 MODULE_DEVICE_TABLE(acpi, ltr_acpi_match);
 
 static const struct i2c_device_id ltr501_id[] = {
-	{ "ltr501", ltr501},
-	{ "ltr559", ltr559},
-	{ "ltr301", ltr301},
-	{ "ltr303", ltr303},
+	{ "ltr501", ltr501 },
+	{ "ltr559", ltr559 },
+	{ "ltr301", ltr301 },
+	{ "ltr303", ltr303 },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, ltr501_id);
Signature · 1 line
2.34.1
Reviewed-by on v1 5/16
#10 lore raw

Re: [PATCH 05/16] iio:light:ltr501: White space cleanup of spacing around {} in id tables

Quoted 8 lines · Jonathan Cameron

From: Jonathan Cameron <[email protected]>

The spacing in this driver was inconsistent so make sure we have a space after { and before } for the two id tables.
Part of aim is to avoid providing examples of this inconsistency that get copied into new drivers.

Quoted 4 lines
Cc Nikita Travkin <[email protected]>
Cc Maslov Dmitry <[email protected]>

---

Quoted 36 lines
 drivers/iio/light/ltr501.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
drivers/iio/light/ltr501.c +7 -8
index 47d61ec2bb50..d1532ef5f08b 100644
@@ -1632,18 +1632,18 @@ static int ltr501_resume(struct device *dev)
 static SIMPLE_DEV_PM_OPS(ltr501_pm_ops, ltr501_suspend, ltr501_resume);
 
 static const struct acpi_device_id ltr_acpi_match[] = {
-       {"LTER0501", ltr501},
-       {"LTER0559", ltr559},
-       {"LTER0301", ltr301},
+       { "LTER0501", ltr501 },
+       { "LTER0559", ltr559 },
+       { "LTER0301", ltr301 },
        { },
 };
 MODULE_DEVICE_TABLE(acpi, ltr_acpi_match);
 
 static const struct i2c_device_id ltr501_id[] = {
-       { "ltr501", ltr501},
-       { "ltr559", ltr559},
-       { "ltr301", ltr301},
-       { "ltr303", ltr303},
+       { "ltr501", ltr501 },
+       { "ltr559", ltr559 },
+       { "ltr301", ltr301 },
+       { "ltr303", ltr303 },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, ltr501_id);
--

2.34.1

author maintainer
#11 lore raw

PATCH 6/16 iio:proximity:ping: White space cleanup of spacing around {} in id tables

In reply to Jonathan Cameron

From: Jonathan Cameron <[email protected]>

The spacing in this driver was inconsistent so make sure we have a space after { and before } for the two id tables.
Avoid providing examples of this inconsistency that get copied into new drivers.

---
 drivers/iio/proximity/ping.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/iio/proximity/ping.c +2 -2
index 1283ac1c2e03..24a97d41e115 100644
@@ -267,8 +267,8 @@ static const struct iio_chan_spec ping_chan_spec[] = {
 };
 
 static const struct of_device_id of_ping_match[] = {
-	{ .compatible = "parallax,ping", .data = &pa_ping_cfg},
-	{ .compatible = "parallax,laserping", .data = &pa_laser_ping_cfg},
+	{ .compatible = "parallax,ping", .data = &pa_ping_cfg },
+	{ .compatible = "parallax,laserping", .data = &pa_laser_ping_cfg },
 	{},
 };
 
Signature · 1 line
2.34.1
Reviewed-by on v1 6/16
#12 lore raw

Re: [PATCH 06/16] iio:proximity:ping: White space cleanup of spacing around {} in id tables

Quoted 11 lines · Jonathan Cameron

From: Jonathan Cameron <[email protected]>

The spacing in this driver was inconsistent so make sure we have a space after { and before } for the two id tables.
Avoid providing examples of this inconsistency that get copied into new drivers.

---

Quoted 21 lines
 drivers/iio/proximity/ping.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/iio/proximity/ping.c +2 -3
index 1283ac1c2e03..24a97d41e115 100644
@@ -267,8 +267,8 @@ static const struct iio_chan_spec ping_chan_spec[] = {
 };
 
 static const struct of_device_id of_ping_match[] = {
-       { .compatible = "parallax,ping", .data = &pa_ping_cfg},
-       { .compatible = "parallax,laserping", .data = &pa_laser_ping_cfg},
+       { .compatible = "parallax,ping", .data = &pa_ping_cfg },
+       { .compatible = "parallax,laserping", .data = &pa_laser_ping_cfg },
        {},
 };
 
--

2.34.1

author maintainer
#13 lore raw

PATCH 7/16 iio:proximity:rfd77402: White space cleanup of spacing around {} in id tables

In reply to Jonathan Cameron

From: Jonathan Cameron <[email protected]>

The spacing in this driver was inconsistent with a space after the { but not before the }. Tidy this up to avoid providing a bad example to copy into new drivers.

---
 drivers/iio/proximity/rfd77402.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/proximity/rfd77402.c +1 -1
index 8c06d02139b6..0ae91963b570 100644
@@ -310,7 +310,7 @@ static int rfd77402_resume(struct device *dev)
 static SIMPLE_DEV_PM_OPS(rfd77402_pm_ops, rfd77402_suspend, rfd77402_resume);
 
 static const struct i2c_device_id rfd77402_id[] = {
-	{ "rfd77402", 0},
+	{ "rfd77402", 0 },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, rfd77402_id);
Signature · 1 line
2.34.1
Reviewed-by on v1 7/16
#14 lore raw

Re: [PATCH 07/16] iio:proximity:rfd77402: White space cleanup of spacing around {} in id tables

Quoted 9 lines · Jonathan Cameron

From: Jonathan Cameron <[email protected]>

The spacing in this driver was inconsistent with a space after the { but not before the }. Tidy this up to avoid providing a bad example to copy into new drivers.

---

Quoted 19 lines
 drivers/iio/proximity/rfd77402.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/proximity/rfd77402.c +1 -2
index 8c06d02139b6..0ae91963b570 100644
@@ -310,7 +310,7 @@ static int rfd77402_resume(struct device *dev)
 static SIMPLE_DEV_PM_OPS(rfd77402_pm_ops, rfd77402_suspend, rfd77402_resume);
 
 static const struct i2c_device_id rfd77402_id[] = {
-       { "rfd77402", 0},
+       { "rfd77402", 0 },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, rfd77402_id);
--

2.34.1

author maintainer
#15 lore raw

PATCH 8/16 iio:proximity:srf04: White space cleanup of spacing around {} in id tables

In reply to Jonathan Cameron

From: Jonathan Cameron <[email protected]>

The spacing in this driver was inconsistent with a space after the { but not before the }. Tidy this up to avoid providing a bad example to copy into new drivers.

---
 drivers/iio/proximity/srf04.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/iio/proximity/srf04.c +6 -6
index fe88b2bb60bc..4e6286765f01 100644
@@ -235,12 +235,12 @@ static const struct iio_chan_spec srf04_chan_spec[] = {
 };
 
 static const struct of_device_id of_srf04_match[] = {
-	{ .compatible = "devantech,srf04", .data = &srf04_cfg},
-	{ .compatible = "maxbotix,mb1000", .data = &mb_lv_cfg},
-	{ .compatible = "maxbotix,mb1010", .data = &mb_lv_cfg},
-	{ .compatible = "maxbotix,mb1020", .data = &mb_lv_cfg},
-	{ .compatible = "maxbotix,mb1030", .data = &mb_lv_cfg},
-	{ .compatible = "maxbotix,mb1040", .data = &mb_lv_cfg},
+	{ .compatible = "devantech,srf04", .data = &srf04_cfg },
+	{ .compatible = "maxbotix,mb1000", .data = &mb_lv_cfg },
+	{ .compatible = "maxbotix,mb1010", .data = &mb_lv_cfg },
+	{ .compatible = "maxbotix,mb1020", .data = &mb_lv_cfg },
+	{ .compatible = "maxbotix,mb1030", .data = &mb_lv_cfg },
+	{ .compatible = "maxbotix,mb1040", .data = &mb_lv_cfg },
 	{},
 };
 
Signature · 1 line
2.34.1
Reviewed-by on v1 8/16
#16 lore raw

Re: [PATCH 08/16] iio:proximity:srf04: White space cleanup of spacing around {} in id tables

Quoted 10 lines · Jonathan Cameron

From: Jonathan Cameron <[email protected]>

The spacing in this driver was inconsistent with a space after the { but not before the }. Tidy this up to avoid providing a bad example to copy into new drivers.

---

Quoted 29 lines
 drivers/iio/proximity/srf04.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/iio/proximity/srf04.c +6 -7
index fe88b2bb60bc..4e6286765f01 100644
@@ -235,12 +235,12 @@ static const struct iio_chan_spec srf04_chan_spec[] = {
 };
 
 static const struct of_device_id of_srf04_match[] = {
-       { .compatible = "devantech,srf04", .data = &srf04_cfg},
-       { .compatible = "maxbotix,mb1000", .data = &mb_lv_cfg},
-       { .compatible = "maxbotix,mb1010", .data = &mb_lv_cfg},
-       { .compatible = "maxbotix,mb1020", .data = &mb_lv_cfg},
-       { .compatible = "maxbotix,mb1030", .data = &mb_lv_cfg},
-       { .compatible = "maxbotix,mb1040", .data = &mb_lv_cfg},
+       { .compatible = "devantech,srf04", .data = &srf04_cfg },
+       { .compatible = "maxbotix,mb1000", .data = &mb_lv_cfg },
+       { .compatible = "maxbotix,mb1010", .data = &mb_lv_cfg },
+       { .compatible = "maxbotix,mb1020", .data = &mb_lv_cfg },
+       { .compatible = "maxbotix,mb1030", .data = &mb_lv_cfg },
+       { .compatible = "maxbotix,mb1040", .data = &mb_lv_cfg },
        {},
 };
 
--

2.34.1

author maintainer
#17 lore raw

PATCH 9/16 iio:proximity:srf08: White space cleanup of spacing around {} in id tables

In reply to Jonathan Cameron

From: Jonathan Cameron <[email protected]>

The spacing in this driver was inconsistent with a space after the { but not before the }. Tidy this up to avoid providing a bad example to copy into new drivers.

---
 drivers/iio/proximity/srf08.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/iio/proximity/srf08.c +3 -3
index 9b0886760f76..ac1ab7e89d4e 100644
@@ -528,9 +528,9 @@ static int srf08_probe(struct i2c_client *client,
 }
 
 static const struct of_device_id of_srf08_match[] = {
-	{ .compatible = "devantech,srf02", (void *)SRF02},
-	{ .compatible = "devantech,srf08", (void *)SRF08},
-	{ .compatible = "devantech,srf10", (void *)SRF10},
+	{ .compatible = "devantech,srf02", (void *)SRF02 },
+	{ .compatible = "devantech,srf08", (void *)SRF08 },
+	{ .compatible = "devantech,srf10", (void *)SRF10 },
 	{},
 };
 
Signature · 1 line
2.34.1
Reviewed-by on v1 9/16
#18 lore raw

Re: [PATCH 09/16] iio:proximity:srf08: White space cleanup of spacing around {} in id tables

Quoted 10 lines · Jonathan Cameron

From: Jonathan Cameron <[email protected]>

The spacing in this driver was inconsistent with a space after the { but not before the }. Tidy this up to avoid providing a bad example to copy into new drivers.

---

Quoted 23 lines
 drivers/iio/proximity/srf08.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/iio/proximity/srf08.c +3 -4
index 9b0886760f76..ac1ab7e89d4e 100644
@@ -528,9 +528,9 @@ static int srf08_probe(struct i2c_client *client,
 }
 
 static const struct of_device_id of_srf08_match[] = {
-       { .compatible = "devantech,srf02", (void *)SRF02},
-       { .compatible = "devantech,srf08", (void *)SRF08},
-       { .compatible = "devantech,srf10", (void *)SRF10},
+       { .compatible = "devantech,srf02", (void *)SRF02 },
+       { .compatible = "devantech,srf08", (void *)SRF08 },
+       { .compatible = "devantech,srf10", (void *)SRF10 },
        {},
 };
 
--

2.34.1

author maintainer
#19 lore raw

PATCH 10/16 iio:frequency:admv1013: White space cleanup of spacing around {} in id tables

In reply to Jonathan Cameron

From: Jonathan Cameron <[email protected]>

The spacing was inconsistent with a space after the { but not before the }. Tidy this up to avoid providing a bad example to copy into new drivers.

---
 drivers/iio/frequency/admv1013.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/frequency/admv1013.c +1 -1
index 6cdeb50143af..849a9ea7ebe5 100644
@@ -630,7 +630,7 @@ static int admv1013_probe(struct spi_device *spi)
 }
 
 static const struct spi_device_id admv1013_id[] = {
-	{ "admv1013", 0},
+	{ "admv1013", 0 },
 	{}
 };
 MODULE_DEVICE_TABLE(spi, admv1013_id);
Signature · 1 line
2.34.1
Reviewed-by on v1 10/16
#20 lore raw

Re: [PATCH 10/16] iio:frequency:admv1013: White space cleanup of spacing around {} in id tables

Quoted 10 lines · Jonathan Cameron

From: Jonathan Cameron <[email protected]>

The spacing was inconsistent with a space after the { but not before the }. Tidy this up to avoid providing a bad example to copy into new drivers.

---

Quoted 19 lines
 drivers/iio/frequency/admv1013.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/frequency/admv1013.c +1 -2
index 6cdeb50143af..849a9ea7ebe5 100644
@@ -630,7 +630,7 @@ static int admv1013_probe(struct spi_device *spi)
 }
 
 static const struct spi_device_id admv1013_id[] = {
-       { "admv1013", 0},
+       { "admv1013", 0 },
        {}
 };
 MODULE_DEVICE_TABLE(spi, admv1013_id);
--

2.34.1

author maintainer
#21 lore raw

PATCH 11/16 iio:adc:mt6577_auxadc: Tidy up white space around {} in id tables

In reply to Jonathan Cameron

From: Jonathan Cameron <[email protected]>

Previously inconsistent with space after { and not before }. Tidy that up to avoid providing a bad example to copy into new drivers.

---
 drivers/iio/adc/mt6577_auxadc.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/iio/adc/mt6577_auxadc.c +5 -5
index d4fccd52ef08..327fff96c6c8 100644
@@ -330,11 +330,11 @@ static SIMPLE_DEV_PM_OPS(mt6577_auxadc_pm_ops,
 			 mt6577_auxadc_resume);
 
 static const struct of_device_id mt6577_auxadc_of_match[] = {
-	{ .compatible = "mediatek,mt2701-auxadc", .data = &mt8173_compat},
-	{ .compatible = "mediatek,mt2712-auxadc", .data = &mt8173_compat},
-	{ .compatible = "mediatek,mt7622-auxadc", .data = &mt8173_compat},
-	{ .compatible = "mediatek,mt8173-auxadc", .data = &mt8173_compat},
-	{ .compatible = "mediatek,mt6765-auxadc", .data = &mt6765_compat},
+	{ .compatible = "mediatek,mt2701-auxadc", .data = &mt8173_compat },
+	{ .compatible = "mediatek,mt2712-auxadc", .data = &mt8173_compat },
+	{ .compatible = "mediatek,mt7622-auxadc", .data = &mt8173_compat },
+	{ .compatible = "mediatek,mt8173-auxadc", .data = &mt8173_compat },
+	{ .compatible = "mediatek,mt6765-auxadc", .data = &mt6765_compat },
 	{ }
 };
 MODULE_DEVICE_TABLE(of, mt6577_auxadc_of_match);
Signature · 1 line
2.34.1
Reviewed-by on v1 11/16
#22 lore raw

Re: [PATCH 11/16] iio:adc:mt6577_auxadc: Tidy up white space around {} in id tables

Quoted 10 lines · Jonathan Cameron

From: Jonathan Cameron <[email protected]>

Previously inconsistent with space after { and not before }. Tidy that up to avoid providing a bad example to copy into new drivers.

---

Quoted 27 lines
 drivers/iio/adc/mt6577_auxadc.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/iio/adc/mt6577_auxadc.c +5 -6
index d4fccd52ef08..327fff96c6c8 100644
@@ -330,11 +330,11 @@ static SIMPLE_DEV_PM_OPS(mt6577_auxadc_pm_ops,
                         mt6577_auxadc_resume);
 
 static const struct of_device_id mt6577_auxadc_of_match[] = {
-       { .compatible = "mediatek,mt2701-auxadc", .data = &mt8173_compat},
-       { .compatible = "mediatek,mt2712-auxadc", .data = &mt8173_compat},
-       { .compatible = "mediatek,mt7622-auxadc", .data = &mt8173_compat},
-       { .compatible = "mediatek,mt8173-auxadc", .data = &mt8173_compat},
-       { .compatible = "mediatek,mt6765-auxadc", .data = &mt6765_compat},
+       { .compatible = "mediatek,mt2701-auxadc", .data = &mt8173_compat },
+       { .compatible = "mediatek,mt2712-auxadc", .data = &mt8173_compat },
+       { .compatible = "mediatek,mt7622-auxadc", .data = &mt8173_compat },
+       { .compatible = "mediatek,mt8173-auxadc", .data = &mt8173_compat },
+       { .compatible = "mediatek,mt6765-auxadc", .data = &mt6765_compat },
        { }
 };
 MODULE_DEVICE_TABLE(of, mt6577_auxadc_of_match);
--

2.34.1

author maintainer
#23 lore raw

PATCH 12/16 iio:adc:hi8435: Tidy up white space around {} in id tables

In reply to Jonathan Cameron

From: Jonathan Cameron <[email protected]>

Previously inconsistent with space after { but not before }. Tidy that up to avoid providing a bad example to copy into new drivers.

---
 drivers/iio/adc/hi8435.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/adc/hi8435.c +1 -1
index e665e14c6e54..8eb0140df133 100644
@@ -529,7 +529,7 @@ static const struct of_device_id hi8435_dt_ids[] = {
 MODULE_DEVICE_TABLE(of, hi8435_dt_ids);
 
 static const struct spi_device_id hi8435_id[] = {
-	{ "hi8435", 0},
+	{ "hi8435", 0 },
 	{ }
 };
 MODULE_DEVICE_TABLE(spi, hi8435_id);
Signature · 1 line
2.34.1
Reviewed-by on v1 12/16
#24 lore raw

Re: [PATCH 12/16] iio:adc:hi8435: Tidy up white space around {} in id tables

Quoted 8 lines · Jonathan Cameron

From: Jonathan Cameron <[email protected]>

Previously inconsistent with space after { but not before }. Tidy that up to avoid providing a bad example to copy into new drivers.

---

Quoted 19 lines
 drivers/iio/adc/hi8435.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/adc/hi8435.c +1 -2
index e665e14c6e54..8eb0140df133 100644
@@ -529,7 +529,7 @@ static const struct of_device_id hi8435_dt_ids[] = {
 MODULE_DEVICE_TABLE(of, hi8435_dt_ids);
 
 static const struct spi_device_id hi8435_id[] = {
-       { "hi8435", 0},
+       { "hi8435", 0 },
        { }
 };
 MODULE_DEVICE_TABLE(spi, hi8435_id);
--

2.34.1

author maintainer
#25 lore raw

PATCH 13/16 iio:adc:ti-adc084s021: Tidy up white space around {}

In reply to Jonathan Cameron

From: Jonathan Cameron <[email protected]>

Previously inconsistent with a space after { but not before }. Tidy that up to avoid providing an example to copy into new drivers.

---
 drivers/iio/adc/ti-adc084s021.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/adc/ti-adc084s021.c +1 -1
index ce3f5a3814f9..c9b5d9aec3dc 100644
@@ -248,7 +248,7 @@ static const struct of_device_id adc084s021_of_match[] = {
 MODULE_DEVICE_TABLE(of, adc084s021_of_match);
 
 static const struct spi_device_id adc084s021_id[] = {
-	{ ADC084S021_DRIVER_NAME, 0},
+	{ ADC084S021_DRIVER_NAME, 0 },
 	{}
 };
 MODULE_DEVICE_TABLE(spi, adc084s021_id);
Signature · 1 line
2.34.1
Reviewed-by on v1 13/16
#26 lore raw

Re: [PATCH 13/16] iio:adc:ti-adc084s021: Tidy up white space around {}

Quoted 9 lines · Jonathan Cameron

From: Jonathan Cameron <[email protected]>

Previously inconsistent with a space after { but not before }. Tidy that up to avoid providing an example to copy into new drivers.

---

Quoted 19 lines
 drivers/iio/adc/ti-adc084s021.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/adc/ti-adc084s021.c +1 -2
index ce3f5a3814f9..c9b5d9aec3dc 100644
@@ -248,7 +248,7 @@ static const struct of_device_id adc084s021_of_match[] = {
 MODULE_DEVICE_TABLE(of, adc084s021_of_match);
 
 static const struct spi_device_id adc084s021_id[] = {
-       { ADC084S021_DRIVER_NAME, 0},
+       { ADC084S021_DRIVER_NAME, 0 },
        {}
 };
 MODULE_DEVICE_TABLE(spi, adc084s021_id);
--

2.34.1

author maintainer
#27 lore raw

PATCH 14/16 iio:light:tsl2722: Fix inconsistent spacing before } in id table

In reply to Jonathan Cameron

From: Jonathan Cameron <[email protected]>

The final entry was missing a space. Tidy that up.

---
 drivers/iio/light/tsl2772.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/light/tsl2772.c +1 -1
index d79205361dfa..729f14d9f2a4 100644
@@ -1902,7 +1902,7 @@ static const struct i2c_device_id tsl2772_idtable[] = {
 	{ "tmd2672", tmd2672 },
 	{ "tsl2772", tsl2772 },
 	{ "tmd2772", tmd2772 },
-	{ "apds9930", apds9930},
+	{ "apds9930", apds9930 },
 	{}
 };
 
Signature · 1 line
2.34.1
Reviewed-by on v1 14/16
#28 lore raw

Re: [PATCH 14/16] iio:light:tsl2722: Fix inconsistent spacing before } in id table

Quoted 7 lines · Jonathan Cameron

From: Jonathan Cameron <[email protected]>

The final entry was missing a space. Tidy that up.

---

Quoted 19 lines
 drivers/iio/light/tsl2772.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/light/tsl2772.c +1 -2
index d79205361dfa..729f14d9f2a4 100644
@@ -1902,7 +1902,7 @@ static const struct i2c_device_id tsl2772_idtable[] = {
        { "tmd2672", tmd2672 },
        { "tsl2772", tsl2772 },
        { "tmd2772", tmd2772 },
-       { "apds9930", apds9930},
+       { "apds9930", apds9930 },
        {}
 };
 
--

2.34.1

author maintainer
#29 lore raw

PATCH 15/16 iio:proximity:vl53l0x: Tidy up white space around {} in id tables

In reply to Jonathan Cameron

From: Jonathan Cameron <[email protected]>

Previously inconsistent with a space after { but not before }. Tidy that up to avoid providing a bad example that might get copied into other drivers.

Cc Ivan Drobyshevskyi <[email protected]>
---
 drivers/iio/proximity/vl53l0x-i2c.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/proximity/vl53l0x-i2c.c +1 -1
index cf38144b6f95..661a79ea200d 100644
@@ -226,7 +226,7 @@ static int vl53l0x_probe(struct i2c_client *client)
 }
 
 static const struct i2c_device_id vl53l0x_id[] = {
-	{ "vl53l0x", 0},
+	{ "vl53l0x", 0 },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, vl53l0x_id);
Signature · 1 line
2.34.1
Reviewed-by on v1 15/16
#30 lore raw

Re: [PATCH 15/16] iio:proximity:vl53l0x: Tidy up white space around {} in id tables

Quoted 10 lines · Jonathan Cameron

From: Jonathan Cameron <[email protected]>

Previously inconsistent with a space after { but not before }. Tidy that up to avoid providing a bad example that might get copied into other drivers.

Cc Ivan Drobyshevskyi <[email protected]>

---

Quoted 19 lines
 drivers/iio/proximity/vl53l0x-i2c.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/proximity/vl53l0x-i2c.c +1 -2
index cf38144b6f95..661a79ea200d 100644
@@ -226,7 +226,7 @@ static int vl53l0x_probe(struct i2c_client *client)
 }
 
 static const struct i2c_device_id vl53l0x_id[] = {
-       { "vl53l0x", 0},
+       { "vl53l0x", 0 },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, vl53l0x_id);
--

2.34.1

author maintainer
#31 lore raw

PATCH 16/16 iio:accel:dmard09: Tidy up white space around {} in id table

In reply to Jonathan Cameron

From: Jonathan Cameron <[email protected]>

Previously inconsistent with a space after { but not before }. Tidy that up to avoid providing a bad example that might get copied into other drivers.

---
 drivers/iio/accel/dmard09.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/accel/dmard09.c +1 -1
index e6e28c964777..53ab6078cb7f 100644
@@ -126,7 +126,7 @@ static int dmard09_probe(struct i2c_client *client,
 }
 
 static const struct i2c_device_id dmard09_id[] = {
-	{ "dmard09", 0},
+	{ "dmard09", 0 },
 	{ },
 };
 
Signature · 1 line
2.34.1
Reviewed-by on v1 16/16
#32 lore raw

Re: [PATCH 16/16] iio:accel:dmard09: Tidy up white space around {} in id table

Quoted 9 lines · Jonathan Cameron

From: Jonathan Cameron <[email protected]>

Previously inconsistent with a space after { but not before }. Tidy that up to avoid providing a bad example that might get copied into other drivers.

---

Quoted 19 lines
 drivers/iio/accel/dmard09.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/accel/dmard09.c +1 -2
index e6e28c964777..53ab6078cb7f 100644
@@ -126,7 +126,7 @@ static int dmard09_probe(struct i2c_client *client,
 }
 
 static const struct i2c_device_id dmard09_id[] = {
-       { "dmard09", 0},
+       { "dmard09", 0 },
        { },
 };
 
--

2.34.1

author maintainer
#33 lore raw
In reply to Jonathan Cameron
Quoted 11 lines · On Thu, 30 Dec 2021 17:48:55 +0000 Jonathan Cameron <[email protected]> wrote:

From: Jonathan Cameron <[email protected]>

Andy's review of Gwendal's sx9324 patch included a comment on having a space before the } in id tables. It is a more general comment, but this series only addresses the id table cases where things are inconsistent. I said I would send a clean up set when I got bored. That happened sooner than expected (I blame tax returns).

Found using:
git grep -re "[0-9A-Za-z]}" drivers/iio/ | grep "{\ "

Quoted 6 lines

Note that the fact that we have a clump of these in proximity drivers suggests that copy and paste is leading to this odd bit of formatting getting copied into new drivers.

As ever, some of these don't have active driver maintainers so please take a quick look at the whole series if you have time.

Series applied to the togreg branch of iio.git, pushed out as testing for 0-day to poke at it until after the merge window.

Thanks,

Jonathan

Quoted 60 lines

Thanks,

Jonathan

Cc Matt Ranostay <[email protected]>
Cc Parthiban Nallathambi <[email protected]>
Cc Nikita Travkin <[email protected]>
Cc Maslov Dmitry <[email protected]>
Cc Andreas Klinger <[email protected]>
Cc Antoniu Miclaus <[email protected]>
Cc Zhiyong Tao <[email protected]>
Cc Hui Liu <[email protected]>
Cc Gwendal Grignou <[email protected]>
Cc Ivan Drobyshevskyi <[email protected]>

Jonathan Cameron (16):
iio:chemical:atlas: Trivial white space cleanup to add space before } iio:light:pa12203001: Tidy up white space change to add spaces after {

    and before }

iio:light:vcnl4035: Trivial whitespace cleanup to add space before } iio:light:us5182: White space cleanup of spacing around {} in id
tables
iio:light:ltr501: White space cleanup of spacing around {} in id
tables
iio:proximity:ping: White space cleanup of spacing around {} in id
tables
iio:proximity:rfd77402: White space cleanup of spacing around {} in id
tables
iio:proximity:srf04: White space cleanup of spacing around {} in id
tables
iio:proximity:srf08: White space cleanup of spacing around {} in id
tables
iio:frequency:admv1013: White space cleanup of spacing around {} in id
tables
iio:adc:mt6577_auxadc: Tidy up white space around {} in id tables iio:adc:hi8435: Tidy up white space around {} in id tables iio:adc:ti-adc084s021: Tidy up white space around {} iio:light:tsl2722: Fix inconsistent spacing before } in id table iio:proximity:vl53l0x: Tidy up white space around {} in id tables iio:accel:dmard09: Tidy up white space around {} in id table

 drivers/iio/accel/dmard09.c         |  2 +-
 drivers/iio/adc/hi8435.c            |  2 +-
 drivers/iio/adc/mt6577_auxadc.c     | 10 +++++-----
 drivers/iio/adc/ti-adc084s021.c     |  2 +-
 drivers/iio/chemical/atlas-sensor.c | 10 +++++-----
 drivers/iio/frequency/admv1013.c    |  2 +-
 drivers/iio/light/ltr501.c          | 14 +++++++-------
 drivers/iio/light/pa12203001.c      |  4 ++--
 drivers/iio/light/tsl2772.c         |  2 +-
 drivers/iio/light/us5182d.c         |  6 +++---
 drivers/iio/light/vcnl4035.c        |  2 +-
 drivers/iio/proximity/ping.c        |  4 ++--
 drivers/iio/proximity/rfd77402.c    |  2 +-
 drivers/iio/proximity/srf04.c       | 12 ++++++------
 drivers/iio/proximity/srf08.c       |  6 +++---
 drivers/iio/proximity/vl53l0x-i2c.c |  2 +-
 16 files changed, 41 insertions(+), 41 deletions(-)