[PATCH v2] iio: adc: ade9000: remove unused ADE9000_ST_ERROR macro

Giorgi Tchankvetadze posted 1 patch 1 month, 2 weeks ago
drivers/iio/adc/ade9000.c | 3 ---
1 file changed, 3 deletions(-)
[PATCH v2] iio: adc: ade9000: remove unused ADE9000_ST_ERROR macro
Posted by Giorgi Tchankvetadze 1 month, 2 weeks ago
The ADE9000_ST_ERROR macro references ADE9000_ST1_ERROR0
through ADE9000_ST1_ERROR3, but the actual defined symbols
use the BIT suffix. Since this macro is currently unused
in the driver, remove it entirely rather than fixing the names.
It can be reintroduced in a future patch when it is actually needed.

The individual error bit definitions (bits 28-31 of the STATUS1
register at 0x403) are retained as they follow the convention of
defining all register fields.

Reference: ADE9000 datasheet (Rev. B, Page 61), STATUS1 register
(0x403), bits 28-31 define ERROR0 through ERROR3 status flags.

Signed-off-by: Giorgi Tchankvetadze <giorgitchankvetadze1997@gmail.com>
---
v2:
 - Drop the unused macro entirely instead of fixing the references,
   as suggested by Andy Shevchenko and Jonathan Cameron.
 - Add datasheet reference to commit message.

 drivers/iio/adc/ade9000.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/iio/adc/ade9000.c b/drivers/iio/adc/ade9000.c
index 5dcc26a08970..7b0b1cbc880c 100644
--- a/drivers/iio/adc/ade9000.c
+++ b/drivers/iio/adc/ade9000.c
@@ -218,9 +218,6 @@
 #define ADE9000_ST1_ERROR1_BIT		BIT(29)
 #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)
 #define ADE9000_ST1_CROSSING_FIRST	6
 #define ADE9000_ST1_CROSSING_DEPTH	25
 
-- 
2.52.0
Re: [PATCH v2] iio: adc: ade9000: remove unused ADE9000_ST_ERROR macro
Posted by Andy Shevchenko 1 month, 2 weeks ago
On Mon, Mar 02, 2026 at 09:50:36AM +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 suffix. Since this macro is currently unused
> in the driver, remove it entirely rather than fixing the names.
> It can be reintroduced in a future patch when it is actually needed.
> 
> The individual error bit definitions (bits 28-31 of the STATUS1
> register at 0x403) are retained as they follow the convention of
> defining all register fields.
> 
> Reference: ADE9000 datasheet (Rev. B, Page 61), STATUS1 register
> (0x403), bits 28-31 define ERROR0 through ERROR3 status flags.

> v2:
>  - Drop the unused macro entirely instead of fixing the references,
>    as suggested by Andy Shevchenko and Jonathan Cameron.

Suggested-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>

-- 
With Best Regards,
Andy Shevchenko
Re: [PATCH v2] iio: adc: ade9000: remove unused ADE9000_ST_ERROR macro
Posted by Jonathan Cameron 1 month, 2 weeks ago
On Mon, 2 Mar 2026 09:50:09 +0200
Andy Shevchenko <andriy.shevchenko@intel.com> wrote:

> On Mon, Mar 02, 2026 at 09:50:36AM +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 suffix. Since this macro is currently unused
> > in the driver, remove it entirely rather than fixing the names.
> > It can be reintroduced in a future patch when it is actually needed.
> > 
> > The individual error bit definitions (bits 28-31 of the STATUS1
> > register at 0x403) are retained as they follow the convention of
> > defining all register fields.
> > 
> > Reference: ADE9000 datasheet (Rev. B, Page 61), STATUS1 register
> > (0x403), bits 28-31 define ERROR0 through ERROR3 status flags.  
> 
> > v2:
> >  - Drop the unused macro entirely instead of fixing the references,
> >    as suggested by Andy Shevchenko and Jonathan Cameron.  
> 
> Suggested-by: Andy Shevchenko <andriy.shevchenko@intel.com>
> Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
> 

Applied

Thanks,

J