Skip to contentSkip to conversation

staging: iio: meter: ade7758_ring: Match alignment with open parenthesis

PATCH Superseded Georgiana Rodica Chelu 2 participants 3 messages Sep 19, 2016 1 message not in the archive

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

PATCH v2 1/1 staging: iio: meter: ade7758_ring: Match alignment with open parenthesis

Organize the parameters on a single line to improve the readability of the code. Also, indent the line to match alignment with the open parenthesis. Ensure that the modifications do not break the rule of 80 characters per line.

Issues found by checkpatch.pl script.

---
Changes in v2:
- Make the commit message clearer.

drivers/staging/iio/meter/ade7758_ring.c | 10 +++-------

 1 file changed, 3 insertions(+), 7 deletions(-)
drivers/staging/iio/meter/ade7758_ring.c +3 -7
index a6b76d4..57c213d 100644
@@ -38,18 +38,14 @@ static int ade7758_write_waveform_type(struct device *dev, unsigned int type)
 	int ret;
 	u8 reg;
 
-	ret = ade7758_spi_read_reg_8(dev,
-			ADE7758_WAVMODE,
-			&reg);
+	ret = ade7758_spi_read_reg_8(dev, ADE7758_WAVMODE, &reg);
 	if (ret)
 		goto out;
 
 	reg &= ~0x1F;
 	reg |= type & 0x1F;
 
-	ret = ade7758_spi_write_reg_8(dev,
-			ADE7758_WAVMODE,
-			reg);
+	ret = ade7758_spi_write_reg_8(dev, ADE7758_WAVMODE, reg);
 out:
 	return ret;
 }
@@ -94,7 +90,7 @@ static int ade7758_ring_preenable(struct iio_dev *indio_dev)
 				 indio_dev->masklength);
 
 	ade7758_write_waveform_type(&indio_dev->dev,
-		indio_dev->channels[channel].address);
+				    indio_dev->channels[channel].address);
 
 	return 0;
 }
Signature · 1 line
2.7.4
Acked-by on v2 1/1
#1 lore raw
Quoted 8 lines · Georgiana Rodica Chelu

Organize the parameters on a single line to improve the readability of the code. Also, indent the line to match alignment with the open parenthesis. Ensure that the modifications do not break the rule of 80 characters per line.

Issues found by checkpatch.pl script.

Quoted 51 lines

---
Changes in v2:
- Make the commit message clearer.

drivers/staging/iio/meter/ade7758_ring.c | 10 +++-------

 1 file changed, 3 insertions(+), 7 deletions(-)
drivers/staging/iio/meter/ade7758_ring.c +3 -8
index a6b76d4..57c213d 100644
@@ -38,18 +38,14 @@ static int ade7758_write_waveform_type(struct device *dev, unsigned int type)
 	int ret;
 	u8 reg;
 
-	ret = ade7758_spi_read_reg_8(dev,
-			ADE7758_WAVMODE,
-			&reg);
+	ret = ade7758_spi_read_reg_8(dev, ADE7758_WAVMODE, &reg);
 	if (ret)
 		goto out;
 
 	reg &= ~0x1F;
 	reg |= type & 0x1F;
 
-	ret = ade7758_spi_write_reg_8(dev,
-			ADE7758_WAVMODE,
-			reg);
+	ret = ade7758_spi_write_reg_8(dev, ADE7758_WAVMODE, reg);
 out:
 	return ret;
 }
@@ -94,7 +90,7 @@ static int ade7758_ring_preenable(struct iio_dev *indio_dev)
 				 indio_dev->masklength);
 
 	ade7758_write_waveform_type(&indio_dev->dev,
-		indio_dev->channels[channel].address);
+				    indio_dev->channels[channel].address);
 
 	return 0;
 }
--

2.7.4

--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20160919154156.GA13797%40fireworks.
For more options, visit https://groups.google.com/d/optout.

#3 lore raw
In reply to a message not in the archive
Quoted 19 lines · Jonathan Cameron
Quoted 9 lines · Julia Lawall
Quoted 5 lines · Georgiana Rodica Chelu

Organize the parameters on a single line to improve the readability of the code. Also, indent the line to match alignment with the open parenthesis. Ensure that the modifications do not break the rule of 80 characters per line.

Quoted 5 lines
Quoted 3 lines

Issues found by checkpatch.pl script.

Nice clean patch. I've just sent Greg a pull request which will be the final one for this cycle for IIO drivers. I'll pick it up in a few days for the next merge window unless Greg grabs it directly.

Quoted 5 lines

One lesson to learn here Georgiana, keep an eye on us pesky maintainers, we sometimes loose patches under these sort of circumstances. Feel free to 'poke' me if I don't reply to say I've applied it by next week (mostly it's two weeks as a rule of thumb, but I tend to clear the decks most weekends so quicker pokes are fine with me).

Normally, Greg picks up the Outreachy patches directly. The maintainers are only in CC in case they want to object :)

thanks,
julia

Quoted 56 lines

Jonathan

Quoted 52 lines
Quoted 52 lines

---
Changes in v2:
- Make the commit message clearer.

drivers/staging/iio/meter/ade7758_ring.c | 10 +++-------

 1 file changed, 3 insertions(+), 7 deletions(-)
drivers/staging/iio/meter/ade7758_ring.c +3 -8
index a6b76d4..57c213d 100644
@@ -38,18 +38,14 @@ static int ade7758_write_waveform_type(struct device *dev, unsigned int type)
 	int ret;
 	u8 reg;
 
-	ret = ade7758_spi_read_reg_8(dev,
-			ADE7758_WAVMODE,
-			&reg);
+	ret = ade7758_spi_read_reg_8(dev, ADE7758_WAVMODE, &reg);
 	if (ret)
 		goto out;
 
 	reg &= ~0x1F;
 	reg |= type & 0x1F;
 
-	ret = ade7758_spi_write_reg_8(dev,
-			ADE7758_WAVMODE,
-			reg);
+	ret = ade7758_spi_write_reg_8(dev, ADE7758_WAVMODE, reg);
 out:
 	return ret;
 }
@@ -94,7 +90,7 @@ static int ade7758_ring_preenable(struct iio_dev *indio_dev)
 				 indio_dev->masklength);
 
 	ade7758_write_waveform_type(&indio_dev->dev,
-		indio_dev->channels[channel].address);
+				    indio_dev->channels[channel].address);
 
 	return 0;
 }
--

2.7.4

--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20160919154156.GA13797%40fireworks.
For more options, visit https://groups.google.com/d/optout.