All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] staging: iio: meter: ade7758_ring: Match alignment with open parenthesis
@ 2016-09-19 15:41 Georgiana Rodica Chelu
  2016-09-19 15:46 ` [Outreachy kernel] " Julia Lawall
  0 siblings, 1 reply; 3+ messages in thread
From: Georgiana Rodica Chelu @ 2016-09-19 15:41 UTC (permalink / raw)
  To: outreachy-kernel; +Cc: lars, Michael.Hennerich, jic23, knaack.h, pmeerw, gregkh

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.

Signed-off-by: Georgiana Rodica Chelu <georgiana.chelu93@gmail.com>
---
Changes in v2:
  - Make the commit message clearer.

drivers/staging/iio/meter/ade7758_ring.c | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/iio/meter/ade7758_ring.c b/drivers/staging/iio/meter/ade7758_ring.c
index a6b76d4..57c213d 100644
--- a/drivers/staging/iio/meter/ade7758_ring.c
+++ b/drivers/staging/iio/meter/ade7758_ring.c
@@ -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



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

* Re: [Outreachy kernel] [PATCH v2] staging: iio: meter: ade7758_ring: Match alignment with open parenthesis
  2016-09-19 15:41 [PATCH v2] staging: iio: meter: ade7758_ring: Match alignment with open parenthesis Georgiana Rodica Chelu
@ 2016-09-19 15:46 ` Julia Lawall
       [not found]   ` <0677f227-2672-b576-4cac-3b2706a1df73@kernel.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Julia Lawall @ 2016-09-19 15:46 UTC (permalink / raw)
  To: Georgiana Rodica Chelu
  Cc: outreachy-kernel, lars, Michael.Hennerich, jic23, knaack.h,
	pmeerw, gregkh



On Mon, 19 Sep 2016, Georgiana Rodica Chelu wrote:

> 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.
>
> Signed-off-by: Georgiana Rodica Chelu <georgiana.chelu93@gmail.com>

Acked-by: Julia Lawall <julia.lawall@lip6.fr>

> ---
> Changes in v2:
>   - Make the commit message clearer.
>
> drivers/staging/iio/meter/ade7758_ring.c | 10 +++-------
>  1 file changed, 3 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/staging/iio/meter/ade7758_ring.c b/drivers/staging/iio/meter/ade7758_ring.c
> index a6b76d4..57c213d 100644
> --- a/drivers/staging/iio/meter/ade7758_ring.c
> +++ b/drivers/staging/iio/meter/ade7758_ring.c
> @@ -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 outreachy-kernel+unsubscribe@googlegroups.com.
> To post to this group, send email to outreachy-kernel@googlegroups.com.
> 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.
>


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

* Re: [Outreachy kernel] [PATCH v2] staging: iio: meter: ade7758_ring: Match alignment with open parenthesis
       [not found]   ` <0677f227-2672-b576-4cac-3b2706a1df73@kernel.org>
@ 2016-09-19 20:30     ` Julia Lawall
  0 siblings, 0 replies; 3+ messages in thread
From: Julia Lawall @ 2016-09-19 20:30 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: Georgiana Rodica Chelu, outreachy-kernel, lars,
	Michael.Hennerich, knaack.h, pmeerw, gregkh



On Mon, 19 Sep 2016, Jonathan Cameron wrote:

> On 19/09/16 16:46, Julia Lawall wrote:
> >
> >
> > On Mon, 19 Sep 2016, Georgiana Rodica Chelu wrote:
> >
> >> 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.
> >>
> >> Signed-off-by: Georgiana Rodica Chelu <georgiana.chelu93@gmail.com>
> >
> > Acked-by: Julia Lawall <julia.lawall@lip6.fr>
> 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.
>
> 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

>
> Jonathan
> >
> >> ---
> >> Changes in v2:
> >>   - Make the commit message clearer.
> >>
> >> drivers/staging/iio/meter/ade7758_ring.c | 10 +++-------
> >>  1 file changed, 3 insertions(+), 7 deletions(-)
> >>
> >> diff --git a/drivers/staging/iio/meter/ade7758_ring.c b/drivers/staging/iio/meter/ade7758_ring.c
> >> index a6b76d4..57c213d 100644
> >> --- a/drivers/staging/iio/meter/ade7758_ring.c
> >> +++ b/drivers/staging/iio/meter/ade7758_ring.c
> >> @@ -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 outreachy-kernel+unsubscribe@googlegroups.com.
> >> To post to this group, send email to outreachy-kernel@googlegroups.com.
> >> 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.
> >>
>
>


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

end of thread, other threads:[~2016-09-19 20:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-19 15:41 [PATCH v2] staging: iio: meter: ade7758_ring: Match alignment with open parenthesis Georgiana Rodica Chelu
2016-09-19 15:46 ` [Outreachy kernel] " Julia Lawall
     [not found]   ` <0677f227-2672-b576-4cac-3b2706a1df73@kernel.org>
2016-09-19 20:30     ` 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.