* [PATCH] staging: iio: meter: ade7758_ring: Match alignment with open parenthesis
@ 2016-09-19 12:22 Georgiana Rodica Chelu
2016-09-19 12:26 ` [Outreachy kernel] " Julia Lawall
0 siblings, 1 reply; 4+ messages in thread
From: Georgiana Rodica Chelu @ 2016-09-19 12:22 UTC (permalink / raw)
To: outreachy-kernel
This patch indents the lines to match alignment with the open parenthesis.
Also, it organizes the parameters on a single line, in case the
modifications do not break the rule of 80 characters per line.
Signed-off-by: Georgiana Rodica Chelu <georgiana.chelu93@gmail.com>
---
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,
- ®);
+ ret = ade7758_spi_read_reg_8(dev, ADE7758_WAVMODE, ®);
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] 4+ messages in thread
* Re: [Outreachy kernel] [PATCH] staging: iio: meter: ade7758_ring: Match alignment with open parenthesis
2016-09-19 12:22 [PATCH] staging: iio: meter: ade7758_ring: Match alignment with open parenthesis Georgiana Rodica Chelu
@ 2016-09-19 12:26 ` Julia Lawall
2016-09-19 13:07 ` Georgiana Chelu
0 siblings, 1 reply; 4+ messages in thread
From: Julia Lawall @ 2016-09-19 12:26 UTC (permalink / raw)
To: Georgiana Rodica Chelu; +Cc: outreachy-kernel
On Mon, 19 Sep 2016, Georgiana Rodica Chelu wrote:
> This patch indents the lines to match alignment with the open parenthesis.
> Also, it organizes the parameters on a single line, in case the
> modifications do not break the rule of 80 characters per line.
The patch looks like it improves the readability of the code. The commit
message could be more concise though. Use the imperative. It is not
necessary to say "This patch", since it is clear what is being discussed.
So the first sentence could be, for example, "Indent lines to match..."
Also, I guess there is some maintainer for this driver. You should send
patches to tha maintainer too. See the Submit a patch section of the
tutorial to see the suggested call to get_maintainer.pl to find who to
also send the patch to.
julia
>
> Signed-off-by: Georgiana Rodica Chelu <georgiana.chelu93@gmail.com>
> ---
> 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,
> - ®);
> + ret = ade7758_spi_read_reg_8(dev, ADE7758_WAVMODE, ®);
> 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/20160919122255.GA11414%40fireworks.
> For more options, visit https://groups.google.com/d/optout.
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Outreachy kernel] [PATCH] staging: iio: meter: ade7758_ring: Match alignment with open parenthesis
2016-09-19 12:26 ` [Outreachy kernel] " Julia Lawall
@ 2016-09-19 13:07 ` Georgiana Chelu
2016-09-19 13:11 ` Julia Lawall
0 siblings, 1 reply; 4+ messages in thread
From: Georgiana Chelu @ 2016-09-19 13:07 UTC (permalink / raw)
To: Julia Lawall; +Cc: outreachy-kernel
[-- Attachment #1: Type: text/plain, Size: 3198 bytes --]
Hi,
Thank you for your advice.
I used the script get_maintainer.pl and there are several
maintainers for this driver. It is enough to put a single
maintainer on cc, right?
Also, should I create a second version to make the
commit message clearer?
Georgiana
On 19 September 2016 at 15:26, Julia Lawall <julia.lawall@lip6.fr> wrote:
> On Mon, 19 Sep 2016, Georgiana Rodica Chelu wrote:
>
> > This patch indents the lines to match alignment with the open
> parenthesis.
> > Also, it organizes the parameters on a single line, in case the
> > modifications do not break the rule of 80 characters per line.
>
> The patch looks like it improves the readability of the code. The commit
> message could be more concise though. Use the imperative. It is not
> necessary to say "This patch", since it is clear what is being discussed.
> So the first sentence could be, for example, "Indent lines to match..."
>
> Also, I guess there is some maintainer for this driver. You should send
> patches to tha maintainer too. See the Submit a patch section of the
> tutorial to see the suggested call to get_maintainer.pl to find who to
> also send the patch to.
>
> julia
>
> >
> > Signed-off-by: Georgiana Rodica Chelu <georgiana.chelu93@gmail.com>
> > ---
> > 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,
> > - ®);
> > + ret = ade7758_spi_read_reg_8(dev, ADE7758_WAVMODE, ®);
> > 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/20160919122255.GA11414%40fireworks.
> > For more options, visit https://groups.google.com/d/optout.
> >
>
[-- Attachment #2: Type: text/html, Size: 4863 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Outreachy kernel] [PATCH] staging: iio: meter: ade7758_ring: Match alignment with open parenthesis
2016-09-19 13:07 ` Georgiana Chelu
@ 2016-09-19 13:11 ` Julia Lawall
0 siblings, 0 replies; 4+ messages in thread
From: Julia Lawall @ 2016-09-19 13:11 UTC (permalink / raw)
To: Georgiana Chelu; +Cc: outreachy-kernel
[-- Attachment #1: Type: TEXT/PLAIN, Size: 4333 bytes --]
On Mon, 19 Sep 2016, Georgiana Chelu wrote:
> Hi,
>
> Thank you for your advice.
>
> I used the script get_maintainer.pl and there are several
> maintainers for this driver. It is enough to put a single
> maintainer on cc, right?
No, if you used the command as it is in the Submit a patch section, then
you should put all of the names that are listed. There is none that is
more important than another.
If you just ran get_maintainer with no other arguments, then you get a lot
of information about people who have submitted patches on the code, but
are not actually maintainers. You should not send the patch to all of
those people.
> Also, should I create a second version to make the
> commit message clearer?
Yes, that would be perfect, thanks.
julia
>
> Georgiana
>
> On 19 September 2016 at 15:26, Julia Lawall <julia.lawall@lip6.fr> wrote:
> On Mon, 19 Sep 2016, Georgiana Rodica Chelu wrote:
>
> > This patch indents the lines to match alignment with the open
> parenthesis.
> > Also, it organizes the parameters on a single line, in case
> the
> > modifications do not break the rule of 80 characters per line.
>
> The patch looks like it improves the readability of the code.
> The commit
> message could be more concise though. Use the imperative. It
> is not
> necessary to say "This patch", since it is clear what is being
> discussed.
> So the first sentence could be, for example, "Indent lines to
> match..."
>
> Also, I guess there is some maintainer for this driver. You
> should send
> patches to tha maintainer too. See the Submit a patch section
> of the
> tutorial to see the suggested call to get_maintainer.pl to find
> who to
> also send the patch to.
>
> julia
>
> >
> > Signed-off-by: Georgiana Rodica Chelu
> <georgiana.chelu93@gmail.com>
> > ---
> > 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,
> > - ®);
> > + ret = ade7758_spi_read_reg_8(dev, ADE7758_WAVMODE,
> ®);
> > 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 visithttps://groups.google.com/d/msgid/outreachy-kernel/20160919122255.GA11414%4
> 0fireworks.
> > For more options, visit https://groups.google.com/d/optout.
> >
>
>
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-09-19 13:11 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-19 12:22 [PATCH] staging: iio: meter: ade7758_ring: Match alignment with open parenthesis Georgiana Rodica Chelu
2016-09-19 12:26 ` [Outreachy kernel] " Julia Lawall
2016-09-19 13:07 ` Georgiana Chelu
2016-09-19 13:11 ` 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.