* [PATCH 0/3] Code formatting clean up
@ 2019-03-17 20:53 Vladimir Petrigo
2019-03-17 20:53 ` [PATCH 1/3] staging: iio: ad7192: Fix style issue Vladimir Petrigo
` (2 more replies)
0 siblings, 3 replies; 10+ messages in thread
From: Vladimir Petrigo @ 2019-03-17 20:53 UTC (permalink / raw)
To: linux-iio
Cc: Jonathan Cameron, Hartmut Knaack, Lars-Peter Clausen,
Peter Meerwald-Stadler, Greg Kroah-Hartman, Stefan Popa,
Alexandru Ardelean, Slawomir Stepien, Nishad Kamdar,
Renato Lui Geh, devel, Vladimir Petrigo
Introduce small code formatting cleaning up in the staging AD drivers
Vladimir Petrigo (3):
staging: iio: ad7192: Fix style issue
staging: iio: ad7280a: Add parentheses to macros
staging: iio: ad7780: Add parentheses to macros
drivers/staging/iio/adc/ad7192.c | 2 +-
drivers/staging/iio/adc/ad7280a.c | 6 +++---
drivers/staging/iio/adc/ad7780.c | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
--
2.7.4
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 1/3] staging: iio: ad7192: Fix style issue
2019-03-17 20:53 [PATCH 0/3] Code formatting clean up Vladimir Petrigo
@ 2019-03-17 20:53 ` Vladimir Petrigo
2019-03-18 2:27 ` Phil Reid
2019-03-17 20:53 ` [PATCH 2/3] staging: iio: ad7280a: Add parentheses to macros Vladimir Petrigo
2019-03-17 20:53 ` [PATCH 3/3] staging: iio: ad7780: " Vladimir Petrigo
2 siblings, 1 reply; 10+ messages in thread
From: Vladimir Petrigo @ 2019-03-17 20:53 UTC (permalink / raw)
To: linux-iio
Cc: Jonathan Cameron, Hartmut Knaack, Lars-Peter Clausen,
Peter Meerwald-Stadler, Greg Kroah-Hartman, Stefan Popa,
Alexandru Ardelean, Slawomir Stepien, Nishad Kamdar,
Renato Lui Geh, devel, Vladimir Petrigo
Signed-off-by: Vladimir Petrigo <vladimir.petrigo@gmail.com>
---
drivers/staging/iio/adc/ad7192.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/iio/adc/ad7192.c b/drivers/staging/iio/adc/ad7192.c
index acdbc07..7c632cf 100644
--- a/drivers/staging/iio/adc/ad7192.c
+++ b/drivers/staging/iio/adc/ad7192.c
@@ -355,7 +355,7 @@ ad7192_show_scale_available(struct device *dev,
}
static IIO_DEVICE_ATTR_NAMED(in_v_m_v_scale_available,
- in_voltage-voltage_scale_available,
+ in_voltage - voltage_scale_available,
0444, ad7192_show_scale_available, NULL, 0);
static IIO_DEVICE_ATTR(in_voltage_scale_available, 0444,
--
2.7.4
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 2/3] staging: iio: ad7280a: Add parentheses to macros
2019-03-17 20:53 [PATCH 0/3] Code formatting clean up Vladimir Petrigo
2019-03-17 20:53 ` [PATCH 1/3] staging: iio: ad7192: Fix style issue Vladimir Petrigo
@ 2019-03-17 20:53 ` Vladimir Petrigo
2019-03-20 7:38 ` Dan Carpenter
2019-03-17 20:53 ` [PATCH 3/3] staging: iio: ad7780: " Vladimir Petrigo
2 siblings, 1 reply; 10+ messages in thread
From: Vladimir Petrigo @ 2019-03-17 20:53 UTC (permalink / raw)
To: linux-iio
Cc: Jonathan Cameron, Hartmut Knaack, Lars-Peter Clausen,
Peter Meerwald-Stadler, Greg Kroah-Hartman, Stefan Popa,
Alexandru Ardelean, Slawomir Stepien, Nishad Kamdar,
Renato Lui Geh, devel, Vladimir Petrigo
Fix CHECK Macro argument 'c' may be better as '(c)' to
avoid precedence issues
Signed-off-by: Vladimir Petrigo <vladimir.petrigo@gmail.com>
diff --git a/drivers/staging/iio/adc/ad7280a.c
b/drivers/staging/iio/adc/ad7280a.c index d9df126..98cf876
100644 --- a/drivers/staging/iio/adc/ad7280a.c +++
b/drivers/staging/iio/adc/ad7280a.c @@ -97,9 +97,9 @@
#define AD7280A_NUM_CH (AD7280A_AUX_ADC_6 - \
AD7280A_CELL_VOLTAGE_1
+ 1)
-#define AD7280A_CALC_VOLTAGE_CHAN_NUM(d, c) ((d *
AD7280A_CELLS_PER_DEV) + c) -#define
AD7280A_CALC_TEMP_CHAN_NUM(d, c) ((d *
AD7280A_CELLS_PER_DEV) + \ - c - AD7280A_CELLS_PER_DEV)
+#define AD7280A_CALC_VOLTAGE_CHAN_NUM(d, c) (((d) *
AD7280A_CELLS_PER_DEV) + (c)) +#define
AD7280A_CALC_TEMP_CHAN_NUM(d, c) (((d) *
AD7280A_CELLS_PER_DEV) + \ + (c) - AD7280A_CELLS_PER_DEV)
#define AD7280A_DEVADDR_MASTER 0 define
#AD7280A_DEVADDR_ALL 0x1F
---
drivers/staging/iio/adc/ad7280a.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/iio/adc/ad7280a.c b/drivers/staging/iio/adc/ad7280a.c
index d9df126..98cf876 100644
--- a/drivers/staging/iio/adc/ad7280a.c
+++ b/drivers/staging/iio/adc/ad7280a.c
@@ -97,9 +97,9 @@
#define AD7280A_NUM_CH (AD7280A_AUX_ADC_6 - \
AD7280A_CELL_VOLTAGE_1 + 1)
-#define AD7280A_CALC_VOLTAGE_CHAN_NUM(d, c) ((d * AD7280A_CELLS_PER_DEV) + c)
-#define AD7280A_CALC_TEMP_CHAN_NUM(d, c) ((d * AD7280A_CELLS_PER_DEV) + \
- c - AD7280A_CELLS_PER_DEV)
+#define AD7280A_CALC_VOLTAGE_CHAN_NUM(d, c) (((d) * AD7280A_CELLS_PER_DEV) + (c))
+#define AD7280A_CALC_TEMP_CHAN_NUM(d, c) (((d) * AD7280A_CELLS_PER_DEV) + \
+ (c) - AD7280A_CELLS_PER_DEV)
#define AD7280A_DEVADDR_MASTER 0
#define AD7280A_DEVADDR_ALL 0x1F
--
2.7.4
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 3/3] staging: iio: ad7780: Add parentheses to macros
2019-03-17 20:53 [PATCH 0/3] Code formatting clean up Vladimir Petrigo
2019-03-17 20:53 ` [PATCH 1/3] staging: iio: ad7192: Fix style issue Vladimir Petrigo
2019-03-17 20:53 ` [PATCH 2/3] staging: iio: ad7280a: Add parentheses to macros Vladimir Petrigo
@ 2019-03-17 20:53 ` Vladimir Petrigo
2019-03-20 7:42 ` Dan Carpenter
2 siblings, 1 reply; 10+ messages in thread
From: Vladimir Petrigo @ 2019-03-17 20:53 UTC (permalink / raw)
To: linux-iio
Cc: Jonathan Cameron, Hartmut Knaack, Lars-Peter Clausen,
Peter Meerwald-Stadler, Greg Kroah-Hartman, Stefan Popa,
Alexandru Ardelean, Slawomir Stepien, Nishad Kamdar,
Renato Lui Geh, devel, Vladimir Petrigo
- Fix CHECK Macro argument 'wordsize' may be better as '(wordsize)' to avoid precedence issues
- Fix CHECK Macro argument reuse 'bits' - possible side-effects?
Signed-off-by: Vladimir Petrigo <vladimir.petrigo@gmail.com>
---
drivers/staging/iio/adc/ad7780.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/iio/adc/ad7780.c b/drivers/staging/iio/adc/ad7780.c
index c4a8578..2dfd6f8 100644
--- a/drivers/staging/iio/adc/ad7780.c
+++ b/drivers/staging/iio/adc/ad7780.c
@@ -142,7 +142,7 @@ static const struct ad_sigma_delta_info ad7780_sigma_delta_info = {
};
#define AD7780_CHANNEL(bits, wordsize) \
- AD_SD_CHANNEL_NO_SAMP_FREQ(1, 0, 0, bits, 32, wordsize - bits)
+ AD_SD_CHANNEL_NO_SAMP_FREQ(1, 0, 0, (bits), 32, ((wordsize) - (bits)))
static const struct ad7780_chip_info ad7780_chip_info_tbl[] = {
[ID_AD7170] = {
--
2.7.4
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH 1/3] staging: iio: ad7192: Fix style issue
2019-03-17 20:53 ` [PATCH 1/3] staging: iio: ad7192: Fix style issue Vladimir Petrigo
@ 2019-03-18 2:27 ` Phil Reid
2019-03-19 8:14 ` Vladimir Petrigo
0 siblings, 1 reply; 10+ messages in thread
From: Phil Reid @ 2019-03-18 2:27 UTC (permalink / raw)
To: Vladimir Petrigo, linux-iio
Cc: Jonathan Cameron, Hartmut Knaack, Lars-Peter Clausen,
Peter Meerwald-Stadler, Greg Kroah-Hartman, Stefan Popa,
Alexandru Ardelean, Slawomir Stepien, Nishad Kamdar,
Renato Lui Geh, devel
On 18/03/2019 4:53 am, Vladimir Petrigo wrote:
> Signed-off-by: Vladimir Petrigo <vladimir.petrigo@gmail.com>
> ---
> drivers/staging/iio/adc/ad7192.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/iio/adc/ad7192.c b/drivers/staging/iio/adc/ad7192.c
> index acdbc07..7c632cf 100644
> --- a/drivers/staging/iio/adc/ad7192.c
> +++ b/drivers/staging/iio/adc/ad7192.c
> @@ -355,7 +355,7 @@ ad7192_show_scale_available(struct device *dev,
> }
>
> static IIO_DEVICE_ATTR_NAMED(in_v_m_v_scale_available,
> - in_voltage-voltage_scale_available,
> + in_voltage - voltage_scale_available,
> 0444, ad7192_show_scale_available, NULL, 0);
>
> static IIO_DEVICE_ATTR(in_voltage_scale_available, 0444,
>
G'day Vladimir ,
This is not a mathematical op.
It gets passed to __ATTR() macro and converted to a string.
--
Regards
Phil
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 1/3] staging: iio: ad7192: Fix style issue
2019-03-18 2:27 ` Phil Reid
@ 2019-03-19 8:14 ` Vladimir Petrigo
0 siblings, 0 replies; 10+ messages in thread
From: Vladimir Petrigo @ 2019-03-19 8:14 UTC (permalink / raw)
To: Phil Reid
Cc: linux-iio, Jonathan Cameron, Hartmut Knaack, Lars-Peter Clausen,
Peter Meerwald-Stadler, Greg Kroah-Hartman, Stefan Popa,
Alexandru Ardelean, Slawomir Stepien, Nishad Kamdar,
Renato Lui Geh, devel
On Mon, Mar 18, 2019 at 10:27:57AM +0800, Phil Reid wrote:
> On 18/03/2019 4:53 am, Vladimir Petrigo wrote:
> >Signed-off-by: Vladimir Petrigo <vladimir.petrigo@gmail.com>
> >---
> > drivers/staging/iio/adc/ad7192.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> >diff --git a/drivers/staging/iio/adc/ad7192.c b/drivers/staging/iio/adc/ad7192.c
> >index acdbc07..7c632cf 100644
> >--- a/drivers/staging/iio/adc/ad7192.c
> >+++ b/drivers/staging/iio/adc/ad7192.c
> >@@ -355,7 +355,7 @@ ad7192_show_scale_available(struct device *dev,
> > }
> > static IIO_DEVICE_ATTR_NAMED(in_v_m_v_scale_available,
> >- in_voltage-voltage_scale_available,
> >+ in_voltage - voltage_scale_available,
> > 0444, ad7192_show_scale_available, NULL, 0);
> > static IIO_DEVICE_ATTR(in_voltage_scale_available, 0444,
> >
> G'day Vladimir ,
>
> This is not a mathematical op.
> It gets passed to __ATTR() macro and converted to a string.
>
>
> --
> Regards
> Phil
Hello Phil,
Thank you for the prompt reply.
Should I remove that changes from the patchset v2 then?
--
Best regards,
Vladimir
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 2/3] staging: iio: ad7280a: Add parentheses to macros
2019-03-17 20:53 ` [PATCH 2/3] staging: iio: ad7280a: Add parentheses to macros Vladimir Petrigo
@ 2019-03-20 7:38 ` Dan Carpenter
2019-03-21 21:14 ` Vladimir Petrigo
0 siblings, 1 reply; 10+ messages in thread
From: Dan Carpenter @ 2019-03-20 7:38 UTC (permalink / raw)
To: Vladimir Petrigo
Cc: linux-iio, devel, Lars-Peter Clausen, Peter Meerwald-Stadler,
Nishad Kamdar, Greg Kroah-Hartman, Stefan Popa, Hartmut Knaack,
Renato Lui Geh, Alexandru Ardelean, Slawomir Stepien,
Jonathan Cameron
On Sun, Mar 17, 2019 at 11:53:11PM +0300, Vladimir Petrigo wrote:
> Fix CHECK Macro argument 'c' may be better as '(c)' to
> avoid precedence issues
>
> Signed-off-by: Vladimir Petrigo <vladimir.petrigo@gmail.com>
>
> diff --git a/drivers/staging/iio/adc/ad7280a.c
> b/drivers/staging/iio/adc/ad7280a.c index d9df126..98cf876
> 100644 --- a/drivers/staging/iio/adc/ad7280a.c +++
> b/drivers/staging/iio/adc/ad7280a.c @@ -97,9 +97,9 @@
> #define AD7280A_NUM_CH (AD7280A_AUX_ADC_6 - \
> AD7280A_CELL_VOLTAGE_1
> + 1)
>
> -#define AD7280A_CALC_VOLTAGE_CHAN_NUM(d, c) ((d *
> AD7280A_CELLS_PER_DEV) + c) -#define
> AD7280A_CALC_TEMP_CHAN_NUM(d, c) ((d *
> AD7280A_CELLS_PER_DEV) + \ - c - AD7280A_CELLS_PER_DEV)
> +#define AD7280A_CALC_VOLTAGE_CHAN_NUM(d, c) (((d) *
> AD7280A_CELLS_PER_DEV) + (c)) +#define
> AD7280A_CALC_TEMP_CHAN_NUM(d, c) (((d) *
> AD7280A_CELLS_PER_DEV) + \ + (c) - AD7280A_CELLS_PER_DEV)
>
> #define AD7280A_DEVADDR_MASTER 0 define
> #AD7280A_DEVADDR_ALL 0x1F
I don't know how this diff got added to the commit message, but
obviously we don't want that.
regards,
dan carpenter
> ---
> drivers/staging/iio/adc/ad7280a.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/staging/iio/adc/ad7280a.c b/drivers/staging/iio/adc/ad7280a.c
> index d9df126..98cf876 100644
> --- a/drivers/staging/iio/adc/ad7280a.c
> +++ b/drivers/staging/iio/adc/ad7280a.c
> @@ -97,9 +97,9 @@
> #define AD7280A_NUM_CH (AD7280A_AUX_ADC_6 - \
> AD7280A_CELL_VOLTAGE_1 + 1)
>
> -#define AD7280A_CALC_VOLTAGE_CHAN_NUM(d, c) ((d * AD7280A_CELLS_PER_DEV) + c)
> -#define AD7280A_CALC_TEMP_CHAN_NUM(d, c) ((d * AD7280A_CELLS_PER_DEV) + \
> - c - AD7280A_CELLS_PER_DEV)
> +#define AD7280A_CALC_VOLTAGE_CHAN_NUM(d, c) (((d) * AD7280A_CELLS_PER_DEV) + (c))
> +#define AD7280A_CALC_TEMP_CHAN_NUM(d, c) (((d) * AD7280A_CELLS_PER_DEV) + \
> + (c) - AD7280A_CELLS_PER_DEV)
>
> #define AD7280A_DEVADDR_MASTER 0
> #define AD7280A_DEVADDR_ALL 0x1F
> --
> 2.7.4
>
> _______________________________________________
> devel mailing list
> devel@linuxdriverproject.org
> http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 3/3] staging: iio: ad7780: Add parentheses to macros
2019-03-17 20:53 ` [PATCH 3/3] staging: iio: ad7780: " Vladimir Petrigo
@ 2019-03-20 7:42 ` Dan Carpenter
2019-03-21 21:12 ` Vladimir Petrigo
0 siblings, 1 reply; 10+ messages in thread
From: Dan Carpenter @ 2019-03-20 7:42 UTC (permalink / raw)
To: Vladimir Petrigo
Cc: linux-iio, devel, Lars-Peter Clausen, Peter Meerwald-Stadler,
Nishad Kamdar, Greg Kroah-Hartman, Stefan Popa, Hartmut Knaack,
Renato Lui Geh, Alexandru Ardelean, Slawomir Stepien,
Jonathan Cameron
On Sun, Mar 17, 2019 at 11:53:12PM +0300, Vladimir Petrigo wrote:
> - Fix CHECK Macro argument 'wordsize' may be better as '(wordsize)' to avoid precedence issues
> - Fix CHECK Macro argument reuse 'bits' - possible side-effects?
>
> Signed-off-by: Vladimir Petrigo <vladimir.petrigo@gmail.com>
> ---
> drivers/staging/iio/adc/ad7780.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/iio/adc/ad7780.c b/drivers/staging/iio/adc/ad7780.c
> index c4a8578..2dfd6f8 100644
> --- a/drivers/staging/iio/adc/ad7780.c
> +++ b/drivers/staging/iio/adc/ad7780.c
> @@ -142,7 +142,7 @@ static const struct ad_sigma_delta_info ad7780_sigma_delta_info = {
> };
>
> #define AD7780_CHANNEL(bits, wordsize) \
> - AD_SD_CHANNEL_NO_SAMP_FREQ(1, 0, 0, bits, 32, wordsize - bits)
> + AD_SD_CHANNEL_NO_SAMP_FREQ(1, 0, 0, (bits), 32, ((wordsize) - (bits)))
^^^^^^
These parentheses are not required.
This doesn't fix the "argument reuse" issue... It's not a reall issue
though, and it isn't like this a core macro so it doesn't really matter
too much.
regards,
dan carpenter
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 3/3] staging: iio: ad7780: Add parentheses to macros
2019-03-20 7:42 ` Dan Carpenter
@ 2019-03-21 21:12 ` Vladimir Petrigo
0 siblings, 0 replies; 10+ messages in thread
From: Vladimir Petrigo @ 2019-03-21 21:12 UTC (permalink / raw)
To: Dan Carpenter
Cc: linux-iio, devel, Lars-Peter Clausen, Peter Meerwald-Stadler,
Nishad Kamdar, Greg Kroah-Hartman, Stefan Popa, Hartmut Knaack,
Renato Lui Geh, Alexandru Ardelean, Slawomir Stepien,
Jonathan Cameron
On Wed, Mar 20, 2019 at 10:42:17AM +0300, Dan Carpenter wrote:
> On Sun, Mar 17, 2019 at 11:53:12PM +0300, Vladimir Petrigo wrote:
> > - Fix CHECK Macro argument 'wordsize' may be better as '(wordsize)' to avoid precedence issues
> > - Fix CHECK Macro argument reuse 'bits' - possible side-effects?
> >
> > Signed-off-by: Vladimir Petrigo <vladimir.petrigo@gmail.com>
> > ---
> > drivers/staging/iio/adc/ad7780.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/staging/iio/adc/ad7780.c b/drivers/staging/iio/adc/ad7780.c
> > index c4a8578..2dfd6f8 100644
> > --- a/drivers/staging/iio/adc/ad7780.c
> > +++ b/drivers/staging/iio/adc/ad7780.c
> > @@ -142,7 +142,7 @@ static const struct ad_sigma_delta_info ad7780_sigma_delta_info = {
> > };
> >
> > #define AD7780_CHANNEL(bits, wordsize) \
> > - AD_SD_CHANNEL_NO_SAMP_FREQ(1, 0, 0, bits, 32, wordsize - bits)
> > + AD_SD_CHANNEL_NO_SAMP_FREQ(1, 0, 0, (bits), 32, ((wordsize) - (bits)))
> ^^^^^^
> These parentheses are not required.
>
> This doesn't fix the "argument reuse" issue... It's not a reall issue
> though, and it isn't like this a core macro so it doesn't really matter
> too much.
>
> regards,
> dan carpenter
>
Thank you for the reply. I'll get rid of that parentheses in the v2
Best regards,
Vladimir Petrigo
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 2/3] staging: iio: ad7280a: Add parentheses to macros
2019-03-20 7:38 ` Dan Carpenter
@ 2019-03-21 21:14 ` Vladimir Petrigo
0 siblings, 0 replies; 10+ messages in thread
From: Vladimir Petrigo @ 2019-03-21 21:14 UTC (permalink / raw)
To: Dan Carpenter
Cc: linux-iio, devel, Lars-Peter Clausen, Peter Meerwald-Stadler,
Nishad Kamdar, Greg Kroah-Hartman, Stefan Popa, Hartmut Knaack,
Renato Lui Geh, Alexandru Ardelean, Slawomir Stepien,
Jonathan Cameron
On Wed, Mar 20, 2019 at 10:38:06AM +0300, Dan Carpenter wrote:
> On Sun, Mar 17, 2019 at 11:53:11PM +0300, Vladimir Petrigo wrote:
> > Fix CHECK Macro argument 'c' may be better as '(c)' to
> > avoid precedence issues
> >
> > Signed-off-by: Vladimir Petrigo <vladimir.petrigo@gmail.com>
> >
> > diff --git a/drivers/staging/iio/adc/ad7280a.c
> > b/drivers/staging/iio/adc/ad7280a.c index d9df126..98cf876
> > 100644 --- a/drivers/staging/iio/adc/ad7280a.c +++
> > b/drivers/staging/iio/adc/ad7280a.c @@ -97,9 +97,9 @@
> > #define AD7280A_NUM_CH (AD7280A_AUX_ADC_6 - \
> > AD7280A_CELL_VOLTAGE_1
> > + 1)
> >
> > -#define AD7280A_CALC_VOLTAGE_CHAN_NUM(d, c) ((d *
> > AD7280A_CELLS_PER_DEV) + c) -#define
> > AD7280A_CALC_TEMP_CHAN_NUM(d, c) ((d *
> > AD7280A_CELLS_PER_DEV) + \ - c - AD7280A_CELLS_PER_DEV)
> > +#define AD7280A_CALC_VOLTAGE_CHAN_NUM(d, c) (((d) *
> > AD7280A_CELLS_PER_DEV) + (c)) +#define
> > AD7280A_CALC_TEMP_CHAN_NUM(d, c) (((d) *
> > AD7280A_CELLS_PER_DEV) + \ + (c) - AD7280A_CELLS_PER_DEV)
> >
> > #define AD7280A_DEVADDR_MASTER 0 define
> > #AD7280A_DEVADDR_ALL 0x1F
>
> I don't know how this diff got added to the commit message, but
> obviously we don't want that.
>
> regards,
> dan carpenter
>
> > ---
> > drivers/staging/iio/adc/ad7280a.c | 6 +++---
> > 1 file changed, 3 insertions(+), 3 deletions(-)
> >
> > diff --git a/drivers/staging/iio/adc/ad7280a.c b/drivers/staging/iio/adc/ad7280a.c
> > index d9df126..98cf876 100644
> > --- a/drivers/staging/iio/adc/ad7280a.c
> > +++ b/drivers/staging/iio/adc/ad7280a.c
> > @@ -97,9 +97,9 @@
> > #define AD7280A_NUM_CH (AD7280A_AUX_ADC_6 - \
> > AD7280A_CELL_VOLTAGE_1 + 1)
> >
> > -#define AD7280A_CALC_VOLTAGE_CHAN_NUM(d, c) ((d * AD7280A_CELLS_PER_DEV) + c)
> > -#define AD7280A_CALC_TEMP_CHAN_NUM(d, c) ((d * AD7280A_CELLS_PER_DEV) + \
> > - c - AD7280A_CELLS_PER_DEV)
> > +#define AD7280A_CALC_VOLTAGE_CHAN_NUM(d, c) (((d) * AD7280A_CELLS_PER_DEV) + (c))
> > +#define AD7280A_CALC_TEMP_CHAN_NUM(d, c) (((d) * AD7280A_CELLS_PER_DEV) + \
> > + (c) - AD7280A_CELLS_PER_DEV)
> >
> > #define AD7280A_DEVADDR_MASTER 0
> > #define AD7280A_DEVADDR_ALL 0x1F
> > --
> > 2.7.4
> >
> > _______________________________________________
> > devel mailing list
> > devel@linuxdriverproject.org
> > http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Yes, something went wrong, will fix that in the v2.
Best regards,
Vladimir Petrigo
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2019-03-21 21:14 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-17 20:53 [PATCH 0/3] Code formatting clean up Vladimir Petrigo
2019-03-17 20:53 ` [PATCH 1/3] staging: iio: ad7192: Fix style issue Vladimir Petrigo
2019-03-18 2:27 ` Phil Reid
2019-03-19 8:14 ` Vladimir Petrigo
2019-03-17 20:53 ` [PATCH 2/3] staging: iio: ad7280a: Add parentheses to macros Vladimir Petrigo
2019-03-20 7:38 ` Dan Carpenter
2019-03-21 21:14 ` Vladimir Petrigo
2019-03-17 20:53 ` [PATCH 3/3] staging: iio: ad7780: " Vladimir Petrigo
2019-03-20 7:42 ` Dan Carpenter
2019-03-21 21:12 ` Vladimir Petrigo
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).