* [PATCH] staging: iio: adc: fix comment block coding style issue
@ 2015-10-03 18:32 Hugo Camboulive
2015-10-04 11:57 ` Lars-Peter Clausen
0 siblings, 1 reply; 4+ messages in thread
From: Hugo Camboulive @ 2015-10-03 18:32 UTC (permalink / raw)
To: lars, Michael.Hennerich, jic23, knaack.h, pmeerw, gregkh
Cc: linux-iio, devel, linux-kernel, Hugo Camboulive
This patch to ad7746.c makes the comment block end with a */
on a separate line.
Signed-off-by: Hugo Camboulive <hugo.camboulive@gmail.com>
---
drivers/staging/iio/cdc/ad7746.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/iio/cdc/ad7746.c b/drivers/staging/iio/cdc/ad7746.c
index 10fa372..8445ddd 100644
--- a/drivers/staging/iio/cdc/ad7746.c
+++ b/drivers/staging/iio/cdc/ad7746.c
@@ -531,7 +531,7 @@ static int ad7746_write_raw(struct iio_dev *indio_dev,
/* CAPDAC Scale = 21pF_typ / 127
* CIN Scale = 8.192pF / 2^24
* Offset Scale = CAPDAC Scale / CIN Scale = 338646
- * */
+ */
val /= 338646;
--
2.6.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] staging: iio: adc: fix comment block coding style issue
2015-10-03 18:32 [PATCH] staging: iio: adc: fix comment block coding style issue Hugo Camboulive
@ 2015-10-04 11:57 ` Lars-Peter Clausen
2015-10-04 16:30 ` [PATCH v2] " Hugo Camboulive
0 siblings, 1 reply; 4+ messages in thread
From: Lars-Peter Clausen @ 2015-10-04 11:57 UTC (permalink / raw)
To: Hugo Camboulive, Michael.Hennerich, jic23, knaack.h, pmeerw,
gregkh
Cc: linux-iio, devel, linux-kernel
On 10/03/2015 08:32 PM, Hugo Camboulive wrote:
> This patch to ad7746.c makes the comment block end with a */
> on a separate line.
>
> Signed-off-by: Hugo Camboulive <hugo.camboulive@gmail.com>
> ---
> drivers/staging/iio/cdc/ad7746.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/iio/cdc/ad7746.c b/drivers/staging/iio/cdc/ad7746.c
> index 10fa372..8445ddd 100644
> --- a/drivers/staging/iio/cdc/ad7746.c
> +++ b/drivers/staging/iio/cdc/ad7746.c
> @@ -531,7 +531,7 @@ static int ad7746_write_raw(struct iio_dev *indio_dev,
> /* CAPDAC Scale = 21pF_typ / 127
> * CIN Scale = 8.192pF / 2^24
> * Offset Scale = CAPDAC Scale / CIN Scale = 338646
> - * */
> + */
Looks good, but while you are at it please also fix the beginning of the
comment. Kernel style multi-line comments look like
/*
* text
* more text
*/
So the line with the /* should have any text.
Bonus points if you can also fix all other occurrences of this style error
in the same file.
- Lars
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v2] staging: iio: adc: fix comment block coding style issue
2015-10-04 11:57 ` Lars-Peter Clausen
@ 2015-10-04 16:30 ` Hugo Camboulive
2015-10-04 14:39 ` Jonathan Cameron
0 siblings, 1 reply; 4+ messages in thread
From: Hugo Camboulive @ 2015-10-04 16:30 UTC (permalink / raw)
To: lars, Michael.Hennerich, jic23, knaack.h, pmeerw, gregkh
Cc: linux-iio, devel, linux-kernel, Hugo Camboulive
This patch to ad7746.c makes the comment blocks end with a */
on a separate line, and start with a /* on an empty line.
Signed-off-by: Hugo Camboulive <hugo.camboulive@gmail.com>
---
drivers/staging/iio/cdc/ad7746.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/iio/cdc/ad7746.c b/drivers/staging/iio/cdc/ad7746.c
index 10fa372..e8eab25 100644
--- a/drivers/staging/iio/cdc/ad7746.c
+++ b/drivers/staging/iio/cdc/ad7746.c
@@ -528,10 +528,11 @@ static int ad7746_write_raw(struct iio_dev *indio_dev,
goto out;
}
- /* CAPDAC Scale = 21pF_typ / 127
+ /*
+ * CAPDAC Scale = 21pF_typ / 127
* CIN Scale = 8.192pF / 2^24
* Offset Scale = CAPDAC Scale / CIN Scale = 338646
- * */
+ */
val /= 338646;
@@ -600,7 +601,8 @@ static int ad7746_read_raw(struct iio_dev *indio_dev,
switch (chan->type) {
case IIO_TEMP:
- /* temperature in milli degrees Celsius
+ /*
+ * temperature in milli degrees Celsius
* T = ((*val / 2048) - 4096) * 1000
*/
*val = (*val * 125) / 256;
--
2.6.0
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH v2] staging: iio: adc: fix comment block coding style issue
2015-10-04 16:30 ` [PATCH v2] " Hugo Camboulive
@ 2015-10-04 14:39 ` Jonathan Cameron
0 siblings, 0 replies; 4+ messages in thread
From: Jonathan Cameron @ 2015-10-04 14:39 UTC (permalink / raw)
To: Hugo Camboulive, lars, Michael.Hennerich, knaack.h, pmeerw,
gregkh
Cc: linux-iio, devel, linux-kernel
On 04/10/15 17:30, Hugo Camboulive wrote:
> This patch to ad7746.c makes the comment blocks end with a */
> on a separate line, and start with a /* on an empty line.
>
> Signed-off-by: Hugo Camboulive <hugo.camboulive@gmail.com>
Thanks.
Applied to the togreg branch of iio.git - initially pushed out
as staging for the automated build testing to check it.
(obviously not really going to do much with this patch!)
Probably a good few more of these in the staging drivers if
you want to clear out a few more!
If not, take a look at the review I did of this driver the other
day for other bits that could do with cleaning up.
http://marc.info/?l=linux-iio&m=144277958123939&w=2
> ---
> drivers/staging/iio/cdc/ad7746.c | 8 +++++---
> 1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/staging/iio/cdc/ad7746.c b/drivers/staging/iio/cdc/ad7746.c
> index 10fa372..e8eab25 100644
> --- a/drivers/staging/iio/cdc/ad7746.c
> +++ b/drivers/staging/iio/cdc/ad7746.c
> @@ -528,10 +528,11 @@ static int ad7746_write_raw(struct iio_dev *indio_dev,
> goto out;
> }
>
> - /* CAPDAC Scale = 21pF_typ / 127
> + /*
> + * CAPDAC Scale = 21pF_typ / 127
> * CIN Scale = 8.192pF / 2^24
> * Offset Scale = CAPDAC Scale / CIN Scale = 338646
> - * */
> + */
>
> val /= 338646;
>
> @@ -600,7 +601,8 @@ static int ad7746_read_raw(struct iio_dev *indio_dev,
>
> switch (chan->type) {
> case IIO_TEMP:
> - /* temperature in milli degrees Celsius
> + /*
> + * temperature in milli degrees Celsius
> * T = ((*val / 2048) - 4096) * 1000
> */
> *val = (*val * 125) / 256;
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-10-04 16:30 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-03 18:32 [PATCH] staging: iio: adc: fix comment block coding style issue Hugo Camboulive
2015-10-04 11:57 ` Lars-Peter Clausen
2015-10-04 16:30 ` [PATCH v2] " Hugo Camboulive
2015-10-04 14:39 ` Jonathan Cameron
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).