2021-08-18 11:13:02

by Miquel Raynal

[permalink] [raw]
Subject: [PATCH 02/16] iio: adc: max1027: Fix the number of max1X31 channels

The macro MAX1X29_CHANNELS() already calls MAX1X27_CHANNELS().
Calling MAX1X27_CHANNELS() before MAX1X29_CHANNELS() in the definition
of MAX1X31_CHANNELS() declares the first 8 channels twice. So drop this
extra call from the MAX1X31 channels list definition.

Fixes: 7af5257d8427 ("iio: adc: max1027: Prepare the introduction of different resolutions")
Cc: [email protected]
Signed-off-by: Miquel Raynal <[email protected]>
---
drivers/iio/adc/max1027.c | 1 -
1 file changed, 1 deletion(-)

diff --git a/drivers/iio/adc/max1027.c b/drivers/iio/adc/max1027.c
index 4a42d140a4b0..b753658bb41e 100644
--- a/drivers/iio/adc/max1027.c
+++ b/drivers/iio/adc/max1027.c
@@ -142,7 +142,6 @@ MODULE_DEVICE_TABLE(of, max1027_adc_dt_ids);
MAX1027_V_CHAN(11, depth)

#define MAX1X31_CHANNELS(depth) \
- MAX1X27_CHANNELS(depth), \
MAX1X29_CHANNELS(depth), \
MAX1027_V_CHAN(12, depth), \
MAX1027_V_CHAN(13, depth), \
--
2.27.0


2021-08-20 07:06:47

by Nuno Sa

[permalink] [raw]
Subject: RE: [PATCH 02/16] iio: adc: max1027: Fix the number of max1X31 channels



> -----Original Message-----
> From: Miquel Raynal <[email protected]>
> Sent: Wednesday, August 18, 2021 1:11 PM
> To: Jonathan Cameron <[email protected]>; Lars-Peter Clausen
> <[email protected]>
> Cc: Thomas Petazzoni <[email protected]>; linux-
> [email protected]; [email protected]; Miquel Raynal
> <[email protected]>; [email protected]
> Subject: [PATCH 02/16] iio: adc: max1027: Fix the number of max1X31
> channels
>
> [External]
>
> The macro MAX1X29_CHANNELS() already calls
> MAX1X27_CHANNELS().
> Calling MAX1X27_CHANNELS() before MAX1X29_CHANNELS() in the
> definition
> of MAX1X31_CHANNELS() declares the first 8 channels twice. So drop
> this
> extra call from the MAX1X31 channels list definition.
>
> Fixes: 7af5257d8427 ("iio: adc: max1027: Prepare the introduction of
> different resolutions")
> Cc: [email protected]
> Signed-off-by: Miquel Raynal <[email protected]>
> ---
> drivers/iio/adc/max1027.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/iio/adc/max1027.c b/drivers/iio/adc/max1027.c
> index 4a42d140a4b0..b753658bb41e 100644
> --- a/drivers/iio/adc/max1027.c
> +++ b/drivers/iio/adc/max1027.c
> @@ -142,7 +142,6 @@ MODULE_DEVICE_TABLE(of,
> max1027_adc_dt_ids);
> MAX1027_V_CHAN(11, depth)
>
> #define MAX1X31_CHANNELS(depth) \
> - MAX1X27_CHANNELS(depth), \
> MAX1X29_CHANNELS(depth), \
> MAX1027_V_CHAN(12, depth), \
> MAX1027_V_CHAN(13, depth), \
> --
> 2.27.0

Reviewed-by: Nuno Sá <[email protected]>

2021-08-30 09:57:57

by Jonathan Cameron

[permalink] [raw]
Subject: Re: [PATCH 02/16] iio: adc: max1027: Fix the number of max1X31 channels

On Fri, 20 Aug 2021 07:03:40 +0000
"Sa, Nuno" <[email protected]> wrote:

> > -----Original Message-----
> > From: Miquel Raynal <[email protected]>
> > Sent: Wednesday, August 18, 2021 1:11 PM
> > To: Jonathan Cameron <[email protected]>; Lars-Peter Clausen
> > <[email protected]>
> > Cc: Thomas Petazzoni <[email protected]>; linux-
> > [email protected]; [email protected]; Miquel Raynal
> > <[email protected]>; [email protected]
> > Subject: [PATCH 02/16] iio: adc: max1027: Fix the number of max1X31
> > channels
> >
> > [External]
> >
> > The macro MAX1X29_CHANNELS() already calls
> > MAX1X27_CHANNELS().
> > Calling MAX1X27_CHANNELS() before MAX1X29_CHANNELS() in the
> > definition
> > of MAX1X31_CHANNELS() declares the first 8 channels twice. So drop
> > this
> > extra call from the MAX1X31 channels list definition.
> >
> > Fixes: 7af5257d8427 ("iio: adc: max1027: Prepare the introduction of
> > different resolutions")
> > Cc: [email protected]
> > Signed-off-by: Miquel Raynal <[email protected]>
> > ---
> > drivers/iio/adc/max1027.c | 1 -
> > 1 file changed, 1 deletion(-)
> >
> > diff --git a/drivers/iio/adc/max1027.c b/drivers/iio/adc/max1027.c
> > index 4a42d140a4b0..b753658bb41e 100644
> > --- a/drivers/iio/adc/max1027.c
> > +++ b/drivers/iio/adc/max1027.c
> > @@ -142,7 +142,6 @@ MODULE_DEVICE_TABLE(of,
> > max1027_adc_dt_ids);
> > MAX1027_V_CHAN(11, depth)
> >
> > #define MAX1X31_CHANNELS(depth) \
> > - MAX1X27_CHANNELS(depth), \
> > MAX1X29_CHANNELS(depth), \
> > MAX1027_V_CHAN(12, depth), \
> > MAX1027_V_CHAN(13, depth), \
> > --
> > 2.27.0
>
> Reviewed-by: Nuno Sá <[email protected]>
>
I guess we don't have many users of these devices as I would have expected
this to blow up spectacularly. Ah well.

Applied to the fixes-togreg branch of iio.git

Thanks,

Jonathan