[soc:board-remove 155/217] drivers/regulator/max8925-regulator.c:22:9: error: redeclaration of enumerator 'MAX8925_ID_SD1'

kernel test robot <[email protected]>
Newsgroups dev.linux.lists.oe-kbuild-all,org.infradead.lists.linux-arm-kernel
Message-ID <[email protected]>
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/soc/soc.git board-remove
head:   057394422bc04420585b2790b230d8a1f350ace8
commit: 12b07cd9224f59fd9924a86b2504c9caa0045206 [155/217] mfd: max8925: remove pdata probe support
config: alpha-allyesconfig (https://download.01.org/0day-ci/archive/20260817/[email protected]/config)
compiler: alpha-linux-gcc (GCC) 16.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260817/[email protected]/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

All errors (new ones prefixed by >>):

>> drivers/regulator/max8925-regulator.c:22:9: error: redeclaration of enumerator 'MAX8925_ID_SD1'
      22 |         MAX8925_ID_SD1,
         |         ^~~~~~~~~~~~~~
   In file included from drivers/regulator/max8925-regulator.c:16:
   include/linux/mfd/max8925.h:17:9: note: previous definition of 'MAX8925_ID_SD1' with type 'enum <anonymous>'
      17 |         MAX8925_ID_SD1,
         |         ^~~~~~~~~~~~~~
>> drivers/regulator/max8925-regulator.c:23:9: error: redeclaration of enumerator 'MAX8925_ID_SD2'
      23 |         MAX8925_ID_SD2,
         |         ^~~~~~~~~~~~~~
   include/linux/mfd/max8925.h:18:9: note: previous definition of 'MAX8925_ID_SD2' with type 'enum <anonymous>'
      18 |         MAX8925_ID_SD2,
         |         ^~~~~~~~~~~~~~
>> drivers/regulator/max8925-regulator.c:24:9: error: redeclaration of enumerator 'MAX8925_ID_SD3'
      24 |         MAX8925_ID_SD3,
         |         ^~~~~~~~~~~~~~
   include/linux/mfd/max8925.h:19:9: note: previous definition of 'MAX8925_ID_SD3' with type 'enum <anonymous>'
      19 |         MAX8925_ID_SD3,
         |         ^~~~~~~~~~~~~~
>> drivers/regulator/max8925-regulator.c:25:9: error: redeclaration of enumerator 'MAX8925_ID_LDO1'
      25 |         MAX8925_ID_LDO1,
         |         ^~~~~~~~~~~~~~~
   include/linux/mfd/max8925.h:20:9: note: previous definition of 'MAX8925_ID_LDO1' with type 'enum <anonymous>'
      20 |         MAX8925_ID_LDO1,
         |         ^~~~~~~~~~~~~~~
>> drivers/regulator/max8925-regulator.c:26:9: error: redeclaration of enumerator 'MAX8925_ID_LDO2'
      26 |         MAX8925_ID_LDO2,
         |         ^~~~~~~~~~~~~~~
   include/linux/mfd/max8925.h:21:9: note: previous definition of 'MAX8925_ID_LDO2' with type 'enum <anonymous>'
      21 |         MAX8925_ID_LDO2,
         |         ^~~~~~~~~~~~~~~
>> drivers/regulator/max8925-regulator.c:27:9: error: redeclaration of enumerator 'MAX8925_ID_LDO3'
      27 |         MAX8925_ID_LDO3,
         |         ^~~~~~~~~~~~~~~
   include/linux/mfd/max8925.h:22:9: note: previous definition of 'MAX8925_ID_LDO3' with type 'enum <anonymous>'
      22 |         MAX8925_ID_LDO3,
         |         ^~~~~~~~~~~~~~~
>> drivers/regulator/max8925-regulator.c:28:9: error: redeclaration of enumerator 'MAX8925_ID_LDO4'
      28 |         MAX8925_ID_LDO4,
         |         ^~~~~~~~~~~~~~~
   include/linux/mfd/max8925.h:23:9: note: previous definition of 'MAX8925_ID_LDO4' with type 'enum <anonymous>'
      23 |         MAX8925_ID_LDO4,
         |         ^~~~~~~~~~~~~~~
>> drivers/regulator/max8925-regulator.c:29:9: error: redeclaration of enumerator 'MAX8925_ID_LDO5'
      29 |         MAX8925_ID_LDO5,
         |         ^~~~~~~~~~~~~~~
   include/linux/mfd/max8925.h:24:9: note: previous definition of 'MAX8925_ID_LDO5' with type 'enum <anonymous>'
      24 |         MAX8925_ID_LDO5,
         |         ^~~~~~~~~~~~~~~
>> drivers/regulator/max8925-regulator.c:30:9: error: redeclaration of enumerator 'MAX8925_ID_LDO6'
      30 |         MAX8925_ID_LDO6,
         |         ^~~~~~~~~~~~~~~
   include/linux/mfd/max8925.h:25:9: note: previous definition of 'MAX8925_ID_LDO6' with type 'enum <anonymous>'
      25 |         MAX8925_ID_LDO6,
         |         ^~~~~~~~~~~~~~~
>> drivers/regulator/max8925-regulator.c:31:9: error: redeclaration of enumerator 'MAX8925_ID_LDO7'
      31 |         MAX8925_ID_LDO7,
         |         ^~~~~~~~~~~~~~~
   include/linux/mfd/max8925.h:26:9: note: previous definition of 'MAX8925_ID_LDO7' with type 'enum <anonymous>'
      26 |         MAX8925_ID_LDO7,
         |         ^~~~~~~~~~~~~~~
>> drivers/regulator/max8925-regulator.c:32:9: error: redeclaration of enumerator 'MAX8925_ID_LDO8'
      32 |         MAX8925_ID_LDO8,
         |         ^~~~~~~~~~~~~~~
   include/linux/mfd/max8925.h:27:9: note: previous definition of 'MAX8925_ID_LDO8' with type 'enum <anonymous>'
      27 |         MAX8925_ID_LDO8,
         |         ^~~~~~~~~~~~~~~
>> drivers/regulator/max8925-regulator.c:33:9: error: redeclaration of enumerator 'MAX8925_ID_LDO9'
      33 |         MAX8925_ID_LDO9,
         |         ^~~~~~~~~~~~~~~
   include/linux/mfd/max8925.h:28:9: note: previous definition of 'MAX8925_ID_LDO9' with type 'enum <anonymous>'
      28 |         MAX8925_ID_LDO9,
         |         ^~~~~~~~~~~~~~~
>> drivers/regulator/max8925-regulator.c:34:9: error: redeclaration of enumerator 'MAX8925_ID_LDO10'
      34 |         MAX8925_ID_LDO10,
         |         ^~~~~~~~~~~~~~~~
   include/linux/mfd/max8925.h:29:9: note: previous definition of 'MAX8925_ID_LDO10' with type 'enum <anonymous>'
      29 |         MAX8925_ID_LDO10,
         |         ^~~~~~~~~~~~~~~~
>> drivers/regulator/max8925-regulator.c:35:9: error: redeclaration of enumerator 'MAX8925_ID_LDO11'
      35 |         MAX8925_ID_LDO11,
         |         ^~~~~~~~~~~~~~~~
   include/linux/mfd/max8925.h:30:9: note: previous definition of 'MAX8925_ID_LDO11' with type 'enum <anonymous>'
      30 |         MAX8925_ID_LDO11,
         |         ^~~~~~~~~~~~~~~~
>> drivers/regulator/max8925-regulator.c:36:9: error: redeclaration of enumerator 'MAX8925_ID_LDO12'
      36 |         MAX8925_ID_LDO12,
         |         ^~~~~~~~~~~~~~~~
   include/linux/mfd/max8925.h:31:9: note: previous definition of 'MAX8925_ID_LDO12' with type 'enum <anonymous>'
      31 |         MAX8925_ID_LDO12,
         |         ^~~~~~~~~~~~~~~~
>> drivers/regulator/max8925-regulator.c:37:9: error: redeclaration of enumerator 'MAX8925_ID_LDO13'
      37 |         MAX8925_ID_LDO13,
         |         ^~~~~~~~~~~~~~~~
   include/linux/mfd/max8925.h:32:9: note: previous definition of 'MAX8925_ID_LDO13' with type 'enum <anonymous>'
      32 |         MAX8925_ID_LDO13,
         |         ^~~~~~~~~~~~~~~~
>> drivers/regulator/max8925-regulator.c:38:9: error: redeclaration of enumerator 'MAX8925_ID_LDO14'
      38 |         MAX8925_ID_LDO14,
         |         ^~~~~~~~~~~~~~~~
   include/linux/mfd/max8925.h:33:9: note: previous definition of 'MAX8925_ID_LDO14' with type 'enum <anonymous>'
      33 |         MAX8925_ID_LDO14,
         |         ^~~~~~~~~~~~~~~~
>> drivers/regulator/max8925-regulator.c:39:9: error: redeclaration of enumerator 'MAX8925_ID_LDO15'
      39 |         MAX8925_ID_LDO15,
         |         ^~~~~~~~~~~~~~~~
   include/linux/mfd/max8925.h:34:9: note: previous definition of 'MAX8925_ID_LDO15' with type 'enum <anonymous>'
      34 |         MAX8925_ID_LDO15,
         |         ^~~~~~~~~~~~~~~~
>> drivers/regulator/max8925-regulator.c:40:9: error: redeclaration of enumerator 'MAX8925_ID_LDO16'
      40 |         MAX8925_ID_LDO16,
         |         ^~~~~~~~~~~~~~~~
   include/linux/mfd/max8925.h:35:9: note: previous definition of 'MAX8925_ID_LDO16' with type 'enum <anonymous>'
      35 |         MAX8925_ID_LDO16,
         |         ^~~~~~~~~~~~~~~~
>> drivers/regulator/max8925-regulator.c:41:9: error: redeclaration of enumerator 'MAX8925_ID_LDO17'
      41 |         MAX8925_ID_LDO17,
         |         ^~~~~~~~~~~~~~~~
   include/linux/mfd/max8925.h:36:9: note: previous definition of 'MAX8925_ID_LDO17' with type 'enum <anonymous>'
      36 |         MAX8925_ID_LDO17,
         |         ^~~~~~~~~~~~~~~~
   drivers/regulator/max8925-regulator.c:42:9: error: redeclaration of enumerator 'MAX8925_ID_LDO18'
      42 |         MAX8925_ID_LDO18,
         |         ^~~~~~~~~~~~~~~~
   include/linux/mfd/max8925.h:37:9: note: previous definition of 'MAX8925_ID_LDO18' with type 'enum <anonymous>'
      37 |         MAX8925_ID_LDO18,
         |         ^~~~~~~~~~~~~~~~
   drivers/regulator/max8925-regulator.c:43:9: error: redeclaration of enumerator 'MAX8925_ID_LDO19'
      43 |         MAX8925_ID_LDO19,
         |         ^~~~~~~~~~~~~~~~
   include/linux/mfd/max8925.h:38:9: note: previous definition of 'MAX8925_ID_LDO19' with type 'enum <anonymous>'
      38 |         MAX8925_ID_LDO19,
         |         ^~~~~~~~~~~~~~~~
   drivers/regulator/max8925-regulator.c:44:9: error: redeclaration of enumerator 'MAX8925_ID_LDO20'
      44 |         MAX8925_ID_LDO20,
         |         ^~~~~~~~~~~~~~~~
   include/linux/mfd/max8925.h:39:9: note: previous definition of 'MAX8925_ID_LDO20' with type 'enum <anonymous>'
      39 |         MAX8925_ID_LDO20,
         |         ^~~~~~~~~~~~~~~~
   drivers/regulator/max8925-regulator.c:45:9: error: redeclaration of enumerator 'MAX8925_ID_MAX'
      45 |         MAX8925_ID_MAX,
         |         ^~~~~~~~~~~~~~
   include/linux/mfd/max8925.h:40:9: note: previous definition of 'MAX8925_ID_MAX' with type 'enum <anonymous>'
      40 |         MAX8925_ID_MAX,
         |         ^~~~~~~~~~~~~~
--
   drivers/video/backlight/max8925_bl.c: In function 'max8925_backlight_set':
>> drivers/video/backlight/max8925_bl.c:42:15: error: implicit declaration of function 'max8925_reg_write' [-Wimplicit-function-declaration]
      42 |         ret = max8925_reg_write(chip->i2c, data->reg_cntl, value);
         |               ^~~~~~~~~~~~~~~~~
>> drivers/video/backlight/max8925_bl.c:42:37: error: invalid use of undefined type 'struct max8925_chip'
      42 |         ret = max8925_reg_write(chip->i2c, data->reg_cntl, value);
         |                                     ^~
>> drivers/video/backlight/max8925_bl.c:48:23: error: implicit declaration of function 'max8925_set_bits' [-Wimplicit-function-declaration]
      48 |                 ret = max8925_set_bits(chip->i2c, data->reg_mode_cntl, 1, 1);
         |                       ^~~~~~~~~~~~~~~~
   drivers/video/backlight/max8925_bl.c:48:44: error: invalid use of undefined type 'struct max8925_chip'
      48 |                 ret = max8925_set_bits(chip->i2c, data->reg_mode_cntl, 1, 1);
         |                                            ^~
   drivers/video/backlight/max8925_bl.c:51:44: error: invalid use of undefined type 'struct max8925_chip'
      51 |                 ret = max8925_set_bits(chip->i2c, data->reg_mode_cntl, 1, 0);
         |                                            ^~
   In file included from include/linux/printk.h:620,
                    from include/linux/kernel.h:30,
                    from drivers/video/backlight/max8925_bl.c:10:
   drivers/video/backlight/max8925_bl.c:54:21: error: invalid use of undefined type 'struct max8925_chip'
      54 |         dev_dbg(chip->dev, "set brightness %d\n", value);
         |                     ^~
   include/linux/dynamic_debug.h:231:29: note: in definition of macro '__dynamic_func_call_cls'
     231 |                 func(&id, ##__VA_ARGS__);                       \
         |                             ^~~~~~~~~~~
   include/linux/dynamic_debug.h:261:9: note: in expansion of macro '_dynamic_func_call_cls'
     261 |         _dynamic_func_call_cls(_DPRINTK_CLASS_DFLT, fmt, func, ##__VA_ARGS__)
         |         ^~~~~~~~~~~~~~~~~~~~~~
   include/linux/dynamic_debug.h:284:9: note: in expansion of macro '_dynamic_func_call'
     284 |         _dynamic_func_call(fmt, __dynamic_dev_dbg,              \
         |         ^~~~~~~~~~~~~~~~~~
   include/linux/dev_printk.h:165:9: note: in expansion of macro 'dynamic_dev_dbg'
     165 |         dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
         |         ^~~~~~~~~~~~~~~
   drivers/video/backlight/max8925_bl.c:54:9: note: in expansion of macro 'dev_dbg'
      54 |         dev_dbg(chip->dev, "set brightness %d\n", value);
         |         ^~~~~~~
   drivers/video/backlight/max8925_bl.c:58:21: error: invalid use of undefined type 'struct max8925_chip'
      58 |         dev_dbg(chip->dev, "set brightness %d failure with return value:%d\n",
         |                     ^~
   include/linux/dynamic_debug.h:231:29: note: in definition of macro '__dynamic_func_call_cls'
     231 |                 func(&id, ##__VA_ARGS__);                       \
         |                             ^~~~~~~~~~~
   include/linux/dynamic_debug.h:261:9: note: in expansion of macro '_dynamic_func_call_cls'
     261 |         _dynamic_func_call_cls(_DPRINTK_CLASS_DFLT, fmt, func, ##__VA_ARGS__)
         |         ^~~~~~~~~~~~~~~~~~~~~~
   include/linux/dynamic_debug.h:284:9: note: in expansion of macro '_dynamic_func_call'
     284 |         _dynamic_func_call(fmt, __dynamic_dev_dbg,              \
         |         ^~~~~~~~~~~~~~~~~~
   include/linux/dev_printk.h:165:9: note: in expansion of macro 'dynamic_dev_dbg'
     165 |         dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
         |         ^~~~~~~~~~~~~~~
   drivers/video/backlight/max8925_bl.c:58:9: note: in expansion of macro 'dev_dbg'
      58 |         dev_dbg(chip->dev, "set brightness %d failure with return value:%d\n",
         |         ^~~~~~~
   drivers/video/backlight/max8925_bl.c: In function 'max8925_backlight_get_brightness':
>> drivers/video/backlight/max8925_bl.c:74:15: error: implicit declaration of function 'max8925_reg_read' [-Wimplicit-function-declaration]
      74 |         ret = max8925_reg_read(chip->i2c, data->reg_cntl);
         |               ^~~~~~~~~~~~~~~~
   drivers/video/backlight/max8925_bl.c:74:36: error: invalid use of undefined type 'struct max8925_chip'
      74 |         ret = max8925_reg_read(chip->i2c, data->reg_cntl);
         |                                    ^~
   drivers/video/backlight/max8925_bl.c:78:21: error: invalid use of undefined type 'struct max8925_chip'
      78 |         dev_dbg(chip->dev, "get brightness %d\n", data->current_brightness);
         |                     ^~
   include/linux/dynamic_debug.h:231:29: note: in definition of macro '__dynamic_func_call_cls'
     231 |                 func(&id, ##__VA_ARGS__);                       \
         |                             ^~~~~~~~~~~
   include/linux/dynamic_debug.h:261:9: note: in expansion of macro '_dynamic_func_call_cls'
     261 |         _dynamic_func_call_cls(_DPRINTK_CLASS_DFLT, fmt, func, ##__VA_ARGS__)
         |         ^~~~~~~~~~~~~~~~~~~~~~
   include/linux/dynamic_debug.h:284:9: note: in expansion of macro '_dynamic_func_call'
     284 |         _dynamic_func_call(fmt, __dynamic_dev_dbg,              \
         |         ^~~~~~~~~~~~~~~~~~
   include/linux/dev_printk.h:165:9: note: in expansion of macro 'dynamic_dev_dbg'
     165 |         dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
         |         ^~~~~~~~~~~~~~~
   drivers/video/backlight/max8925_bl.c:78:9: note: in expansion of macro 'dev_dbg'
      78 |         dev_dbg(chip->dev, "get brightness %d\n", data->current_brightness);
         |         ^~~~~~~
   drivers/video/backlight/max8925_bl.c: In function 'max8925_backlight_dt_init':
>> drivers/video/backlight/max8925_bl.c:100:68: error: expected ';' before 'if'
     100 |         of_property_read_u32(np, "maxim,max8925-dual-string", &val)
         |                                                                    ^
         |                                                                    ;
     101 | 
     102 |         if (val)
         |         ~~                                                          
   drivers/video/backlight/max8925_bl.c: In function 'max8925_backlight_probe':
   drivers/video/backlight/max8925_bl.c:155:36: error: invalid use of undefined type 'struct max8925_chip'
     155 |         ret = max8925_set_bits(chip->i2c, data->reg_mode_cntl, 0xfe, value);
         |                                    ^~
--
   drivers/power/supply/max8925_power.c: In function 'max8925_power_probe':
>> drivers/power/supply/max8925_power.c:501:17: error: incompatible types when assigning to type 'struct max8925_power_pdata' from type 'struct max8925_power_pdata *'
     501 |         pdata = max8925_power_dt_init(pdev);
         |                 ^~~~~~~~~~~~~~~~~~~~~
>> drivers/power/supply/max8925_power.c:502:13: error: wrong type argument to unary exclamation mark
     502 |         if (!pdata)
         |             ^
>> drivers/power/supply/max8925_power.c:529:34: error: invalid type argument of '->' (have 'struct max8925_power_pdata')
     529 |         info->batt_detect = pdata->batt_detect;
         |                                  ^~
   drivers/power/supply/max8925_power.c:530:39: error: invalid type argument of '->' (have 'struct max8925_power_pdata')
     530 |         info->topoff_threshold = pdata->topoff_threshold;
         |                                       ^~
   drivers/power/supply/max8925_power.c:531:34: error: invalid type argument of '->' (have 'struct max8925_power_pdata')
     531 |         info->fast_charge = pdata->fast_charge;
         |                                  ^~
   drivers/power/supply/max8925_power.c:532:38: error: invalid type argument of '->' (have 'struct max8925_power_pdata')
     532 |         info->no_temp_support = pdata->no_temp_support;
         |                                      ^~
   drivers/power/supply/max8925_power.c:533:39: error: invalid type argument of '->' (have 'struct max8925_power_pdata')
     533 |         info->no_insert_detect = pdata->no_insert_detect;
         |                                       ^~


vim +/MAX8925_ID_SD1 +22 drivers/regulator/max8925-regulator.c

    19	
    20	/* Unified sub device IDs for MAX8925 */
    21	enum {
  > 22		MAX8925_ID_SD1,
  > 23		MAX8925_ID_SD2,
  > 24		MAX8925_ID_SD3,
  > 25		MAX8925_ID_LDO1,
  > 26		MAX8925_ID_LDO2,
  > 27		MAX8925_ID_LDO3,
  > 28		MAX8925_ID_LDO4,
  > 29		MAX8925_ID_LDO5,
  > 30		MAX8925_ID_LDO6,
  > 31		MAX8925_ID_LDO7,
  > 32		MAX8925_ID_LDO8,
  > 33		MAX8925_ID_LDO9,
  > 34		MAX8925_ID_LDO10,
  > 35		MAX8925_ID_LDO11,
  > 36		MAX8925_ID_LDO12,
  > 37		MAX8925_ID_LDO13,
  > 38		MAX8925_ID_LDO14,
  > 39		MAX8925_ID_LDO15,
  > 40		MAX8925_ID_LDO16,
  > 41		MAX8925_ID_LDO17,
  > 42		MAX8925_ID_LDO18,
  > 43		MAX8925_ID_LDO19,
  > 44		MAX8925_ID_LDO20,
  > 45		MAX8925_ID_MAX,
    46	};
    47	
    48	

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.