drivers/iio/adc/ade9000.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
The ADE9000_ST_ERROR macro references ADE9000_ST1_ERROR0 through
ADE9000_ST1_ERROR3, but the actual defined symbols use the _BIT
suffix. Fix the references to use the correct macro names.
Signed-off-by: Giorgi Tchankvetadze <giorgitchankvetadze1997@gmail.com>
---
drivers/iio/adc/ade9000.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/iio/adc/ade9000.c b/drivers/iio/adc/ade9000.c
index 5dcc26a08970..0dbfc079e115 100644
--- a/drivers/iio/adc/ade9000.c
+++ b/drivers/iio/adc/ade9000.c
@@ -219,8 +219,8 @@
#define ADE9000_ST1_ERROR2_BIT BIT(30)
#define ADE9000_ST1_ERROR3_BIT BIT(31)
#define ADE9000_ST_ERROR \
- (ADE9000_ST1_ERROR0 | ADE9000_ST1_ERROR1 | \
- ADE9000_ST1_ERROR2 | ADE9000_ST1_ERROR3)
+ (ADE9000_ST1_ERROR0_BIT | ADE9000_ST1_ERROR1_BIT | \
+ ADE9000_ST1_ERROR2_BIT | ADE9000_ST1_ERROR3_BIT)
#define ADE9000_ST1_CROSSING_FIRST 6
#define ADE9000_ST1_CROSSING_DEPTH 25
--
2.52.0
On Fri, Feb 27, 2026 at 02:09:01PM +0400, Giorgi Tchankvetadze wrote: > The ADE9000_ST_ERROR macro references ADE9000_ST1_ERROR0 through > ADE9000_ST1_ERROR3, but the actual defined symbols use the _BIT BIT (It's okay to drop "_" as "suffix" implies the position of the "BIT".) > suffix. Fix the references to use the correct macro names. What about the current code that uses it? Is it even in use currently? Please, elaborate more in the commit message that we clearly understand that you spent time and investigated code and/or datasheet before crafting this change. -- With Best Regards, Andy Shevchenko
On Fri, Feb 27, 2026 at 2:33 PM Andy Shevchenko <andriy.shevchenko@intel.com> wrote: > What about the current code that uses it? Is it even in use currently? >Please, elaborate more in the commit message that we clearly understand >that you spent time and investigated code and/or datasheet before crafting >this change. Hi Andy. Thanks for the feedback ! The macro is currently unused in the driver, so this does not cause a build failure. Reference: ADE9000 datasheet (Rev. B, Page 61), STATUS1 register (0x403), bits 28-31 define ERROR0 through ERROR3 status flags.
On Fri, Feb 27, 2026 at 02:52:45PM +0400, Giorgi Tchankvetadze wrote: > On Fri, Feb 27, 2026 at 2:33 PM Andy Shevchenko > <andriy.shevchenko@intel.com> wrote: > > > What about the current code that uses it? Is it even in use currently? > >Please, elaborate more in the commit message that we clearly understand > >that you spent time and investigated code and/or datasheet before crafting > >this change. > > Hi Andy. Thanks for the feedback ! > The macro is currently unused in the driver, so this does not cause > a build failure. Drop it then? > Reference: ADE9000 datasheet (Rev. B, Page 61), STATUS1 register (0x403), > bits 28-31 define ERROR0 through ERROR3 status flags. Yes, good, this should be in the commit message. -- With Best Regards, Andy Shevchenko
On Fri, 27 Feb 2026 16:44:47 +0200 Andy Shevchenko <andriy.shevchenko@intel.com> wrote: > On Fri, Feb 27, 2026 at 02:52:45PM +0400, Giorgi Tchankvetadze wrote: > > On Fri, Feb 27, 2026 at 2:33 PM Andy Shevchenko > > <andriy.shevchenko@intel.com> wrote: > > > > > What about the current code that uses it? Is it even in use currently? > > >Please, elaborate more in the commit message that we clearly understand > > >that you spent time and investigated code and/or datasheet before crafting > > >this change. > > > > Hi Andy. Thanks for the feedback ! > > The macro is currently unused in the driver, so this does not cause > > a build failure. > > Drop it then? Agreed. I'm generally in favour of complete definitions of the fields in a register if any of them are used. However, in this case it's a define of a mask covering multiple fields that we have no use for. So drop it for now. It can come back in a patch that uses it. Thanks, Jonathan > > > Reference: ADE9000 datasheet (Rev. B, Page 61), STATUS1 register (0x403), > > bits 28-31 define ERROR0 through ERROR3 status flags. > > Yes, good, this should be in the commit message. >
On Sat, Feb 28, 2026 at 4:08 PM Jonathan Cameron <jic23@kernel.org> wrote: >Agreed. I'm generally in favour of complete definitions of the fields in >a register if any of them are used. However, in this case it's a define >of a mask covering multiple fields that we have no use for. > So drop it for now. It can come back in a patch that uses it. > Thanks Jonathan ! I have removed the macro entirely and sent v2
© 2016 - 2026 Red Hat, Inc.