Skip to contentSkip to conversation

staging: iio: adc: properly indent block comments

PATCH In review Ioana Ciornei 1 participant 2 messages Oct 17, 2015 1 message not in the archive

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

PATCH 1/1 staging: iio: adc: properly indent block comments

Rework block comments in order to follow
kernel coding style

---
 drivers/staging/iio/adc/ad7192.c | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)
drivers/staging/iio/adc/ad7192.c +10 -10
index bb76096..7d3714f 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)) */
+/* Offset Register	     (RW, 16-bit) (AD7792)/24-bit (AD7192)) */
+#define AD7192_REG_OFFSET	6
+/* Full-Scale Register (RW, 16-bit) (AD7792)/24-bit (AD7192)) */
+#define AD7192_REG_FULLSALE	7
 
 /* 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 */
+/* External 4.92 MHz Clock connected from MCLK1 to MCLK2 */
+#define AD7192_CLK_EXT_MCLK1_2		0
 #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 */
+/* Internal 4.92 MHz Clock not available at the MCLK2 pin */
+#define AD7192_CLK_INT			2
+/* Internal 4.92 MHz Clock available at the MCLK2 pin */
+#define AD7192_CLK_INT_CO		3
 
 /* Configuration Register Bit Designations (AD7192_REG_CONF) */
 
Signature · 1 line
2.1.4

A message that is not in the archive (sent off-list or not yet received): [email protected]

#2 lore raw
Quoted 28 lines · Greg KH
Quoted 14 lines · Ioana Ciornei

Rework block comments in order to follow
kernel coding style

---
 drivers/staging/iio/adc/ad7192.c | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)
drivers/staging/iio/adc/ad7192.c +0 -0
index bb76096..7d3714f 100644
@@ -35,10 +35,10 @@
 #define AD7192_REG_DATA              3 /* Data Register           (RO, 24/32-bit) */

drivers/staging/iio/adc/ad7192.c line 41

Quoted 10 lines
drivers/staging/iio/adc/ad7192.c +4 -4
 #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)) */
+/* Offset Register        (RW, 16-bit) (AD7792)/24-bit (AD7192)) */
+#define AD7192_REG_OFFSET    6
+/* Full-Scale Register (RW, 16-bit) (AD7792)/24-bit (AD7192)) */
+#define AD7192_REG_FULLSALE  7

Now things are not lined up with the other defines :(

Quoted 3 lines

What was wrong with the original code? It looked fine to me, please leave it as-is.

The reason I created this patch is the fact that the comment blocks are not properly indented and checkpatch complained about it. If it introduces other problems maybe it is better to not apply it.

Thanks,

Ioana