Skip to contentSkip to conversation

staging: iio: use kernel preferred block commenting style

PATCH Superseded Alison Schofield 2 participants 3 messages Mar 17, 2016 – Mar 21, 2016

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: iio: use kernel preferred block commenting style

Use * on subsequent lines and trailing */ on a separate line in block comments.

---
 drivers/staging/iio/adc/ad7192.c                | 20 ++++++++++----------
 drivers/staging/iio/impedance-analyzer/ad5933.c |  5 +++--
 drivers/staging/iio/light/tsl2x7x_core.c        | 24 +++++++++++++++---------
 drivers/staging/iio/meter/ade7753.c             |  3 ++-
 drivers/staging/iio/meter/ade7754.c             |  3 ++-
 drivers/staging/iio/meter/ade7758_core.c        |  3 ++-
 drivers/staging/iio/meter/ade7759.c             |  3 ++-
 drivers/staging/iio/meter/ade7854.c             |  3 ++-
 8 files changed, 38 insertions(+), 26 deletions(-)
drivers/staging/iio/adc/ad7192.c +10 -10
index f843f19..f91468e 100644
@@ -35,10 +35,10 @@
 #define AD7192_REG_DATA		3 /* Data Register	     (RO, 24/32-bit) */
 #define AD7192_REG_ID		4 /* ID Register	     (RO, 8-bit) */
 #define AD7192_REG_GPOCON	5 /* GPOCON Register	     (RO, 8-bit) */
-#define AD7192_REG_OFFSET	6 /* Offset Register	     (RW, 16-bit
-				   * (AD7792)/24-bit (AD7192)) */
-#define AD7192_REG_FULLSALE	7 /* Full-Scale Register
-				   * (RW, 16-bit (AD7792)/24-bit (AD7192)) */
+#define AD7192_REG_OFFSET	6 /* Offset Register	     (RW, 16-bit */
+				  /* (AD7792)/24-bit (AD7192)) */
+#define AD7192_REG_FULLSALE	7 /* Full-Scale Register */
+				  /* (RW, 16-bit (AD7792)/24-bit (AD7192)) */
 
 /* Communications Register Bit Designations (AD7192_REG_COMM) */
 #define AD7192_COMM_WEN		BIT(7) /* Write Enable */
@@ -80,13 +80,13 @@
 #define AD7192_MODE_CAL_SYS_FULL	7 /* System Full-Scale Calibration */
 
 /* Mode Register: AD7192_MODE_CLKSRC options */
-#define AD7192_CLK_EXT_MCLK1_2		0 /* External 4.92 MHz Clock connected
-					   * from MCLK1 to MCLK2 */
+#define AD7192_CLK_EXT_MCLK1_2		0 /* External 4.92 MHz Clock connected*/
+					  /* from MCLK1 to MCLK2 */
 #define AD7192_CLK_EXT_MCLK2		1 /* External Clock applied to MCLK2 */
-#define AD7192_CLK_INT			2 /* Internal 4.92 MHz Clock not
-					   * available at the MCLK2 pin */
-#define AD7192_CLK_INT_CO		3 /* Internal 4.92 MHz Clock available
-					   * at the MCLK2 pin */
+#define AD7192_CLK_INT			2 /* Internal 4.92 MHz Clock not */
+					  /* available at the MCLK2 pin */
+#define AD7192_CLK_INT_CO		3 /* Internal 4.92 MHz Clock available*/
+					  /* at the MCLK2 pin */
 
 /* Configuration Register Bit Designations (AD7192_REG_CONF) */
 
drivers/staging/iio/impedance-analyzer/ad5933.c +3 -2
index d1218d8..e27b58b 100644
@@ -683,8 +683,9 @@ static void ad5933_work(struct work_struct *work)
 	}
 
 	if (status & AD5933_STAT_SWEEP_DONE) {
-		/* last sample received - power down do nothing until
-		 * the ring enable is toggled */
+		/* last sample received - power down do
+		 * nothing until the ring enable is toggled
+		 */
 		ad5933_cmd(st, AD5933_CTRL_POWER_DOWN);
 	} else {
 		/* we just received a valid datum, move on to the next */
drivers/staging/iio/light/tsl2x7x_core.c +15 -9
index 5f308ba..be78255 100644
@@ -187,9 +187,10 @@ struct tsl2X7X_chip {
 	const struct tsl2x7x_chip_info	*chip_info;
 	const struct iio_info *info;
 	s64 event_timestamp;
-	/* This structure is intentionally large to accommodate
-	 * updates via sysfs. */
-	/* Sized to 9 = max 8 segments + 1 termination segment */
+	/* This structure is intentionally large
+	 * to accommodate updates via sysfs.
+	 * Sized to 9 = max 8 segments + 1 termination segment
+	 */
 	struct tsl2x7x_lux tsl2x7x_device_lux[TSL2X7X_MAX_LUX_TABLE_SIZE];
 };
 
@@ -696,7 +697,8 @@ static int tsl2x7x_chip_on(struct iio_dev *indio_dev)
 	chip->als_time_scale = (als_time + 25) / 50;
 
 	/* TSL2X7X Specific power-on / adc enable sequence
-	 * Power on the device 1st. */
+	 * Power on the device 1st.
+	 */
 	utmp = TSL2X7X_CNTL_PWR_ON;
 	ret = i2c_smbus_write_byte_data(chip->client,
 		TSL2X7X_CMD_REG | TSL2X7X_CNTRL, utmp);
@@ -707,7 +709,8 @@ static int tsl2x7x_chip_on(struct iio_dev *indio_dev)
 	}
 
 	/* Use the following shadow copy for our delay before enabling ADC.
-	 * Write all the registers. */
+	 * Write all the registers.
+	 */
 	for (i = 0, dev_reg = chip->tsl2x7x_config;
 			i < TSL2X7X_MAX_CONFIG_REG; i++) {
 		ret = i2c_smbus_write_byte_data(chip->client,
@@ -722,7 +725,8 @@ static int tsl2x7x_chip_on(struct iio_dev *indio_dev)
 	mdelay(3);	/* Power-on settling time */
 
 	/* NOW enable the ADC
-	 * initialize the desired mode of operation */
+	 * initialize the desired mode of operation
+	 */
 	utmp = TSL2X7X_CNTL_PWR_ON |
 			TSL2X7X_CNTL_ADC_ENBL |
 			TSL2X7X_CNTL_PROX_DET_ENBL;
@@ -1147,7 +1151,8 @@ static ssize_t tsl2x7x_luxtable_show(struct device *dev,
 			chip->tsl2x7x_device_lux[i].ch1);
 		if (chip->tsl2x7x_device_lux[i].ratio == 0) {
 			/* We just printed the first "0" entry.
-			 * Now get rid of the extra "," and break. */
+			 * Now get rid of the extra "," and break.
+			 */
 			offset--;
 			break;
 		}
@@ -1892,8 +1897,9 @@ static int tsl2x7x_probe(struct i2c_client *clientp,
 		return ret;
 	}
 
-	/* ALS and PROX functions can be invoked via user space poll
-	 * or H/W interrupt. If busy return last sample. */
+	/* ALS and PROX functions can be invoked via user space
+	 * poll or H/W interrupt. If busy return last sample.
+	 */
 	mutex_init(&chip->als_mutex);
 	mutex_init(&chip->prox_mutex);
 
drivers/staging/iio/meter/ade7753.c +2 -1
index 6928710..1ff86c6 100644
@@ -333,7 +333,8 @@ static int ade7753_set_irq(struct device *dev, bool enable)
 
 	if (enable)
 		irqen |= BIT(3); /* Enables an interrupt when a data is
-				    present in the waveform register */
+				  * present in the waveform register
+				  */
 	else
 		irqen &= ~BIT(3);
 
drivers/staging/iio/meter/ade7754.c +2 -1
index f4188e1..bc28179 100644
@@ -351,7 +351,8 @@ static int ade7754_set_irq(struct device *dev, bool enable)
 
 	if (enable)
 		irqen |= BIT(14); /* Enables an interrupt when a data is
-				     present in the waveform register */
+				   * present in the waveform register
+				   */
 	else
 		irqen &= ~BIT(14);
 
drivers/staging/iio/meter/ade7758_core.c +2 -1
index 40f5afa..dcf27c3 100644
@@ -427,7 +427,8 @@ int ade7758_set_irq(struct device *dev, bool enable)
 
 	if (enable)
 		irqen |= BIT(16); /* Enables an interrupt when a data is
-				     present in the waveform register */
+				   * present in the waveform register
+				   */
 	else
 		irqen &= ~BIT(16);
 
drivers/staging/iio/meter/ade7759.c +2 -1
index 684e612..37d0fa8 100644
@@ -289,7 +289,8 @@ static int ade7759_set_irq(struct device *dev, bool enable)
 
 	if (enable)
 		irqen |= BIT(3); /* Enables an interrupt when a data is
-				    present in the waveform register */
+				  * present in the waveform register
+				  */
 	else
 		irqen &= ~BIT(3);
 
drivers/staging/iio/meter/ade7854.c +2 -1
index 9e439af..75e8685 100644
@@ -421,7 +421,8 @@ static int ade7854_set_irq(struct device *dev, bool enable)
 
 	if (enable)
 		irqen |= BIT(17); /* 1: interrupt enabled when all periodical
-				     (at 8 kHz rate) DSP computations finish. */
+				   * (at 8 kHz rate) DSP computations finish.
+				   */
 	else
 		irqen &= ~BIT(17);
 
Signature · 1 line
2.1.4
maintainer
#1 lore raw
Quoted 4 lines · Alison Schofield

Use * on subsequent lines and trailing */ on a separate line in block comments.

Quoted 10 lines
---
 drivers/staging/iio/adc/ad7192.c                | 20 ++++++++++----------
 drivers/staging/iio/impedance-analyzer/ad5933.c |  5 +++--
 drivers/staging/iio/light/tsl2x7x_core.c        | 24 +++++++++++++++---------
 drivers/staging/iio/meter/ade7753.c             |  3 ++-
 drivers/staging/iio/meter/ade7754.c             |  3 ++-
 drivers/staging/iio/meter/ade7758_core.c        |  3 ++-
 drivers/staging/iio/meter/ade7759.c             |  3 ++-
 drivers/staging/iio/meter/ade7854.c             |  3 ++-
 8 files changed, 38 insertions(+), 26 deletions(-)

Patch does not apply to my tree :(

#2 lore raw

PATCH v2 1/1 staging: iio: use kernel preferred block commenting style

In reply to Alison Schofield

Use * on subsequent lines and trailing */ on a separate line in block comments.

---
Changes in v2:
- remove tsl2x7x_core.c, it's already fixed
- rebase/rebuit

 drivers/staging/iio/adc/ad7192.c                | 20 ++++++++++----------
 drivers/staging/iio/impedance-analyzer/ad5933.c |  5 +++--
 drivers/staging/iio/meter/ade7753.c             |  3 ++-
 drivers/staging/iio/meter/ade7754.c             |  3 ++-
 drivers/staging/iio/meter/ade7758_core.c        |  3 ++-
 drivers/staging/iio/meter/ade7759.c             |  3 ++-
 drivers/staging/iio/meter/ade7854.c             |  3 ++-
 7 files changed, 23 insertions(+), 17 deletions(-)
drivers/staging/iio/adc/ad7192.c +10 -10
index f843f19..f91468e 100644
@@ -35,10 +35,10 @@
 #define AD7192_REG_DATA		3 /* Data Register	     (RO, 24/32-bit) */
 #define AD7192_REG_ID		4 /* ID Register	     (RO, 8-bit) */
 #define AD7192_REG_GPOCON	5 /* GPOCON Register	     (RO, 8-bit) */
-#define AD7192_REG_OFFSET	6 /* Offset Register	     (RW, 16-bit
-				   * (AD7792)/24-bit (AD7192)) */
-#define AD7192_REG_FULLSALE	7 /* Full-Scale Register
-				   * (RW, 16-bit (AD7792)/24-bit (AD7192)) */
+#define AD7192_REG_OFFSET	6 /* Offset Register	     (RW, 16-bit */
+				  /* (AD7792)/24-bit (AD7192)) */
+#define AD7192_REG_FULLSALE	7 /* Full-Scale Register */
+				  /* (RW, 16-bit (AD7792)/24-bit (AD7192)) */
 
 /* Communications Register Bit Designations (AD7192_REG_COMM) */
 #define AD7192_COMM_WEN		BIT(7) /* Write Enable */
@@ -80,13 +80,13 @@
 #define AD7192_MODE_CAL_SYS_FULL	7 /* System Full-Scale Calibration */
 
 /* Mode Register: AD7192_MODE_CLKSRC options */
-#define AD7192_CLK_EXT_MCLK1_2		0 /* External 4.92 MHz Clock connected
-					   * from MCLK1 to MCLK2 */
+#define AD7192_CLK_EXT_MCLK1_2		0 /* External 4.92 MHz Clock connected*/
+					  /* from MCLK1 to MCLK2 */
 #define AD7192_CLK_EXT_MCLK2		1 /* External Clock applied to MCLK2 */
-#define AD7192_CLK_INT			2 /* Internal 4.92 MHz Clock not
-					   * available at the MCLK2 pin */
-#define AD7192_CLK_INT_CO		3 /* Internal 4.92 MHz Clock available
-					   * at the MCLK2 pin */
+#define AD7192_CLK_INT			2 /* Internal 4.92 MHz Clock not */
+					  /* available at the MCLK2 pin */
+#define AD7192_CLK_INT_CO		3 /* Internal 4.92 MHz Clock available*/
+					  /* at the MCLK2 pin */
 
 /* Configuration Register Bit Designations (AD7192_REG_CONF) */
 
drivers/staging/iio/impedance-analyzer/ad5933.c +3 -2
index 620b33a..e6fdb3d 100644
@@ -691,8 +691,9 @@ static void ad5933_work(struct work_struct *work)
 	}
 
 	if (status & AD5933_STAT_SWEEP_DONE) {
-		/* last sample received - power down do nothing until
-		 * the ring enable is toggled */
+		/* last sample received - power down do
+		 * nothing until the ring enable is toggled
+		 */
 		ad5933_cmd(st, AD5933_CTRL_POWER_DOWN);
 	} else {
 		/* we just received a valid datum, move on to the next */
drivers/staging/iio/meter/ade7753.c +2 -1
index b0bc99a..4b5f05f 100644
@@ -333,7 +333,8 @@ static int ade7753_set_irq(struct device *dev, bool enable)
 
 	if (enable)
 		irqen |= BIT(3); /* Enables an interrupt when a data is
-				    present in the waveform register */
+				  * present in the waveform register
+				  */
 	else
 		irqen &= ~BIT(3);
 
drivers/staging/iio/meter/ade7754.c +2 -1
index fed1180..c46bef64 100644
@@ -351,7 +351,8 @@ static int ade7754_set_irq(struct device *dev, bool enable)
 
 	if (enable)
 		irqen |= BIT(14); /* Enables an interrupt when a data is
-				     present in the waveform register */
+				   * present in the waveform register
+				   */
 	else
 		irqen &= ~BIT(14);
 
drivers/staging/iio/meter/ade7758_core.c +2 -1
index 3102965..ebb8a19 100644
@@ -413,7 +413,8 @@ int ade7758_set_irq(struct device *dev, bool enable)
 
 	if (enable)
 		irqen |= BIT(16); /* Enables an interrupt when a data is
-				     present in the waveform register */
+				   * present in the waveform register
+				   */
 	else
 		irqen &= ~BIT(16);
 
drivers/staging/iio/meter/ade7759.c +2 -1
index c14892d..80144d4 100644
@@ -289,7 +289,8 @@ static int ade7759_set_irq(struct device *dev, bool enable)
 
 	if (enable)
 		irqen |= BIT(3); /* Enables an interrupt when a data is
-				    present in the waveform register */
+				  * present in the waveform register
+				  */
 	else
 		irqen &= ~BIT(3);
 
drivers/staging/iio/meter/ade7854.c +2 -1
index 9e439af..75e8685 100644
@@ -421,7 +421,8 @@ static int ade7854_set_irq(struct device *dev, bool enable)
 
 	if (enable)
 		irqen |= BIT(17); /* 1: interrupt enabled when all periodical
-				     (at 8 kHz rate) DSP computations finish. */
+				   * (at 8 kHz rate) DSP computations finish.
+				   */
 	else
 		irqen &= ~BIT(17);
 
Signature · 1 line
2.1.4