Skip to contentSkip to conversation

linux-next: build failure after merge of the mmc tree

DISCUSSION Mark Brown 2 participants 4 messages Feb 5

Subsystems (2)
lore
Share & tools
lore

Mark Brown

author maintainer
#0 lore raw

Hi all,

After merging the mmc tree, today's linux-next build (x86_64 allmodconfig) failed like this:

/tmp/next/build/drivers/mux/core.c:312:14: error: redefinition of 'mux_control_states'
312 | unsigned int mux_control_states(struct mux_control *mux)

      |              ^~~~~~~~~~~~~~~~~~
In file included from /tmp/next/build/drivers/mux/core.c:19:
/tmp/next/build/include/linux/mux/consumer.h:70:28: note: previous definition of 'mux_control_states' with type 'unsigned int(struct mux_control *)'
   70 | static inline unsigned int mux_control_states(struct mux_control *mux)
      |                            ^~~~~~~~~~~~~~~~~~
/tmp/next/build/drivers/mux/core.c:375:5: error: redefinition of 'mux_control_select_delay'
  375 | int mux_control_select_delay(struct mux_control *mux, unsigned int state,
      |     ^~~~~~~~~~~~~~~~~~~~~~~~
/tmp/next/build/include/linux/mux/consumer.h:74:32: note: previous definition of 'mux_control_select_delay' with type 'int(struct mux_control *, unsigned int,  unsigned int)'
   74 | static inline int __must_check mux_control_select_delay(struct mux_control *mux,
      |                                ^~~~~~~~~~~~~~~~~~~~~~~~
/tmp/next/build/drivers/mux/core.c:413:5: error: redefinition of 'mux_state_select_delay'
  413 | int mux_state_select_delay(struct mux_state *mstate, unsigned int delay_us)
      |     ^~~~~~~~~~~~~~~~~~~~~~
/tmp/next/build/include/linux/mux/consumer.h:79:32: note: previous definition of 'mux_state_select_delay' with type 'int(struct mux_state *, unsigned int)'
   79 | static inline int __must_check mux_state_select_delay(struct mux_state *mstate,
      |                                ^~~~~~~~~~~~~~~~~~~~~~
/tmp/next/build/drivers/mux/core.c:435:5: error: redefinition of 'mux_control_try_select_delay'
  435 | int mux_control_try_select_delay(struct mux_control *mux, unsigned int state,
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/next/build/include/linux/mux/consumer.h:84:32: note: previous definition of 'mux_control_try_select_delay' with type 'int(struct mux_control *, unsigned int,  unsigned int)'
   84 | static inline int __must_check mux_control_try_select_delay(struct mux_control *mux,
      |                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/next/build/drivers/mux/core.c:469:5: error: redefinition of 'mux_state_try_select_delay'
  469 | int mux_state_try_select_delay(struct mux_state *mstate, unsigned int delay_us)
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/next/build/include/linux/mux/consumer.h:90:32: note: previous definition of 'mux_state_try_select_delay' with type 'int(struct mux_state *, unsigned int)'
   90 | static inline int __must_check mux_state_try_select_delay(struct mux_state *mstate,
      |                                ^~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/next/build/drivers/mux/core.c:487:5: error: redefinition of 'mux_control_deselect'
  487 | int mux_control_deselect(struct mux_control *mux)
      |     ^~~~~~~~~~~~~~~~~~~~
/tmp/next/build/include/linux/mux/consumer.h:118:19: note: previous definition of 'mux_control_deselect' with type 'int(struct mux_control *)'
  118 | static inline int mux_control_deselect(struct mux_control *mux)
      |                   ^~~~~~~~~~~~~~~~~~~~
/tmp/next/build/drivers/mux/core.c:513:5: error: redefinition of 'mux_state_deselect'
  513 | int mux_state_deselect(struct mux_state *mstate)
      |     ^~~~~~~~~~~~~~~~~~
/tmp/next/build/include/linux/mux/consumer.h:122:19: note: previous definition of 'mux_state_deselect' with type 'int(struct mux_state *)'
  122 | static inline int mux_state_deselect(struct mux_state *mstate)
      |                   ^~~~~~~~~~~~~~~~~~
/tmp/next/build/drivers/mux/core.c:636:21: error: redefinition of 'mux_control_get'
  636 | struct mux_control *mux_control_get(struct device *dev, const char *mux_name)
      |                     ^~~~~~~~~~~~~~~
/tmp/next/build/include/linux/mux/consumer.h:127:35: note: previous definition of 'mux_control_get' with type 'struct mux_control *(struct device *, const char *)'
  127 | static inline struct mux_control *mux_control_get(struct device *dev, const char *mux_name)
      |                                   ^~~~~~~~~~~~~~~
/tmp/next/build/drivers/mux/core.c:655:21: error: redefinition of 'mux_control_get_optional'
  655 | struct mux_control *mux_control_get_optional(struct device *dev, const char *mux_name)
      |                     ^~~~~~~~~~~~~~~~~~~~~~~~
/tmp/next/build/include/linux/mux/consumer.h:131:35: note: previous definition of 'mux_control_get_optional' with type 'struct mux_control *(struct device *, const char *)'
  131 | static inline struct mux_control *mux_control_get_optional(struct device *dev,
      |                                   ^~~~~~~~~~~~~~~~~~~~~~~~
/tmp/next/build/drivers/mux/core.c:667:6: error: redefinition of 'mux_control_put'
  667 | void mux_control_put(struct mux_control *mux)
      |      ^~~~~~~~~~~~~~~
/tmp/next/build/include/linux/mux/consumer.h:136:20: note: previous definition of 'mux_control_put' with type 'void(struct mux_control *)'
  136 | static inline void mux_control_put(struct mux_control *mux) {}
      |                    ^~~~~~~~~~~~~~~
/tmp/next/build/drivers/mux/core.c:688:21: error: redefinition of 'devm_mux_control_get'
  688 | struct mux_control *devm_mux_control_get(struct device *dev,
      |                     ^~~~~~~~~~~~~~~~~~~~
/tmp/next/build/include/linux/mux/consumer.h:138:35: note: previous definition of 'devm_mux_control_get' with type 'struct mux_control *(struct device *, const char *)'
  138 | static inline struct mux_control *devm_mux_control_get(struct device *dev, const char *mux_name)
      |                                   ^~~~~~~~~~~~~~~~~~~~
/tmp/next/build/drivers/mux/core.c:831:19: error: redefinition of 'devm_mux_state_get'
  831 | struct mux_state *devm_mux_state_get(struct device *dev, const char *mux_name)
      |                   ^~~~~~~~~~~~~~~~~~
/tmp/next/build/include/linux/mux/consumer.h:142:33: note: previous definition of 'devm_mux_state_get' with type 'struct mux_state *(struct device *, const char *)'
  142 | static inline struct mux_state *devm_mux_state_get(struct device *dev, const char *mux_name)
      |                                 ^~~~~~~~~~~~~~~~~~
/tmp/next/build/drivers/mux/core.c:848:19: error: redefinition of 'devm_mux_state_get_optional'
  848 | struct mux_state *devm_mux_state_get_optional(struct device *dev, const char *mux_name)
      |                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/next/build/include/linux/mux/consumer.h:146:33: note: previous definition of 'devm_mux_state_get_optional' with type 'struct mux_state *(struct device *, const char *)'
  146 | static inline struct mux_state *devm_mux_state_get_optional(struct device *dev,
      |                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/next/build/drivers/mux/core.c:866:19: error: redefinition of 'devm_mux_state_get_selected'
  866 | struct mux_state *devm_mux_state_get_selected(struct device *dev, const char *mux_name)
      |                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/next/build/include/linux/mux/consumer.h:151:33: note: previous definition of 'devm_mux_state_get_selected' with type 'struct mux_state *(struct device *, const char *)'
  151 | static inline struct mux_state *devm_mux_state_get_selected(struct device *dev,
      |                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/next/build/drivers/mux/core.c:885:19: error: redefinition of 'devm_mux_state_get_optional_selected'
  885 | struct mux_state *devm_mux_state_get_optional_selected(struct device *dev,
      |                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/next/build/include/linux/mux/consumer.h:156:33: note: previous definition of 'devm_mux_state_get_optional_selected' with type 'struct mux_state *(struct device *, const char *)'
  156 | static inline struct mux_state *devm_mux_state_get_optional_selected(struct device *dev,
      |                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Caused by commit

ad314348ceb4f (mux: Add helper functions for getting optional and selected mux-state)

I have used the version from next-20260204 insted.

#1 lore raw

Hi Mark,

Quoted 97 lines · Mark Brown

Hi all,

After merging the mmc tree, today's linux-next build (x86_64 allmodconfig) failed like this:

/tmp/next/build/drivers/mux/core.c:312:14: error: redefinition of 'mux_control_states'
312 | unsigned int mux_control_states(struct mux_control *mux)

       |              ^~~~~~~~~~~~~~~~~~

In file included from /tmp/next/build/drivers/mux/core.c:19:
/tmp/next/build/include/linux/mux/consumer.h:70:28: note: previous definition of 'mux_control_states' with type 'unsigned int(struct mux_control *)'
70 | static inline unsigned int mux_control_states(struct mux_control *mux)
| ^~~~~~~~~~~~~~~~~~
/tmp/next/build/drivers/mux/core.c:375:5: error: redefinition of 'mux_control_select_delay'
375 | int mux_control_select_delay(struct mux_control *mux, unsigned int state,

       |     ^~~~~~~~~~~~~~~~~~~~~~~~

/tmp/next/build/include/linux/mux/consumer.h:74:32: note: previous definition of 'mux_control_select_delay' with type 'int(struct mux_control *, unsigned int, unsigned int)'
74 | static inline int __must_check mux_control_select_delay(struct mux_control *mux,
| ^~~~~~~~~~~~~~~~~~~~~~~~
/tmp/next/build/drivers/mux/core.c:413:5: error: redefinition of 'mux_state_select_delay'
413 | int mux_state_select_delay(struct mux_state *mstate, unsigned int delay_us)

       |     ^~~~~~~~~~~~~~~~~~~~~~

/tmp/next/build/include/linux/mux/consumer.h:79:32: note: previous definition of 'mux_state_select_delay' with type 'int(struct mux_state *, unsigned int)'
79 | static inline int __must_check mux_state_select_delay(struct mux_state *mstate,
| ^~~~~~~~~~~~~~~~~~~~~~
/tmp/next/build/drivers/mux/core.c:435:5: error: redefinition of 'mux_control_try_select_delay'
435 | int mux_control_try_select_delay(struct mux_control *mux, unsigned int state,

       |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~

/tmp/next/build/include/linux/mux/consumer.h:84:32: note: previous definition of 'mux_control_try_select_delay' with type 'int(struct mux_control *, unsigned int, unsigned int)'
84 | static inline int __must_check mux_control_try_select_delay(struct mux_control *mux,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/next/build/drivers/mux/core.c:469:5: error: redefinition of 'mux_state_try_select_delay'
469 | int mux_state_try_select_delay(struct mux_state *mstate, unsigned int delay_us)

       |     ^~~~~~~~~~~~~~~~~~~~~~~~~~

/tmp/next/build/include/linux/mux/consumer.h:90:32: note: previous definition of 'mux_state_try_select_delay' with type 'int(struct mux_state *, unsigned int)'
90 | static inline int __must_check mux_state_try_select_delay(struct mux_state *mstate,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/next/build/drivers/mux/core.c:487:5: error: redefinition of 'mux_control_deselect'
487 | int mux_control_deselect(struct mux_control *mux)

       |     ^~~~~~~~~~~~~~~~~~~~
/tmp/next/build/include/linux/mux/consumer.h:118:19: note: previous definition of 'mux_control_deselect' with type 'int(struct mux_control *)'
   118 | static inline int mux_control_deselect(struct mux_control *mux)
       |                   ^~~~~~~~~~~~~~~~~~~~
/tmp/next/build/drivers/mux/core.c:513:5: error: redefinition of 'mux_state_deselect'
   513 | int mux_state_deselect(struct mux_state *mstate)
       |     ^~~~~~~~~~~~~~~~~~
/tmp/next/build/include/linux/mux/consumer.h:122:19: note: previous definition of 'mux_state_deselect' with type 'int(struct mux_state *)'
   122 | static inline int mux_state_deselect(struct mux_state *mstate)
       |                   ^~~~~~~~~~~~~~~~~~
/tmp/next/build/drivers/mux/core.c:636:21: error: redefinition of 'mux_control_get'
   636 | struct mux_control *mux_control_get(struct device *dev, const char *mux_name)
       |                     ^~~~~~~~~~~~~~~
/tmp/next/build/include/linux/mux/consumer.h:127:35: note: previous definition of 'mux_control_get' with type 'struct mux_control *(struct device *, const char *)'
   127 | static inline struct mux_control *mux_control_get(struct device *dev, const char *mux_name)
       |                                   ^~~~~~~~~~~~~~~
/tmp/next/build/drivers/mux/core.c:655:21: error: redefinition of 'mux_control_get_optional'
   655 | struct mux_control *mux_control_get_optional(struct device *dev, const char *mux_name)
       |                     ^~~~~~~~~~~~~~~~~~~~~~~~
/tmp/next/build/include/linux/mux/consumer.h:131:35: note: previous definition of 'mux_control_get_optional' with type 'struct mux_control *(struct device *, const char *)'
   131 | static inline struct mux_control *mux_control_get_optional(struct device *dev,
       |                                   ^~~~~~~~~~~~~~~~~~~~~~~~
/tmp/next/build/drivers/mux/core.c:667:6: error: redefinition of 'mux_control_put'
   667 | void mux_control_put(struct mux_control *mux)
       |      ^~~~~~~~~~~~~~~
/tmp/next/build/include/linux/mux/consumer.h:136:20: note: previous definition of 'mux_control_put' with type 'void(struct mux_control *)'
   136 | static inline void mux_control_put(struct mux_control *mux) {}
       |                    ^~~~~~~~~~~~~~~
/tmp/next/build/drivers/mux/core.c:688:21: error: redefinition of 'devm_mux_control_get'
   688 | struct mux_control *devm_mux_control_get(struct device *dev,
       |                     ^~~~~~~~~~~~~~~~~~~~
/tmp/next/build/include/linux/mux/consumer.h:138:35: note: previous definition of 'devm_mux_control_get' with type 'struct mux_control *(struct device *, const char *)'
   138 | static inline struct mux_control *devm_mux_control_get(struct device *dev, const char *mux_name)
       |                                   ^~~~~~~~~~~~~~~~~~~~
/tmp/next/build/drivers/mux/core.c:831:19: error: redefinition of 'devm_mux_state_get'
   831 | struct mux_state *devm_mux_state_get(struct device *dev, const char *mux_name)
       |                   ^~~~~~~~~~~~~~~~~~
/tmp/next/build/include/linux/mux/consumer.h:142:33: note: previous definition of 'devm_mux_state_get' with type 'struct mux_state *(struct device *, const char *)'
   142 | static inline struct mux_state *devm_mux_state_get(struct device *dev, const char *mux_name)
       |                                 ^~~~~~~~~~~~~~~~~~
/tmp/next/build/drivers/mux/core.c:848:19: error: redefinition of 'devm_mux_state_get_optional'
   848 | struct mux_state *devm_mux_state_get_optional(struct device *dev, const char *mux_name)
       |                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/next/build/include/linux/mux/consumer.h:146:33: note: previous definition of 'devm_mux_state_get_optional' with type 'struct mux_state *(struct device *, const char *)'
   146 | static inline struct mux_state *devm_mux_state_get_optional(struct device *dev,
       |                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/next/build/drivers/mux/core.c:866:19: error: redefinition of 'devm_mux_state_get_selected'
   866 | struct mux_state *devm_mux_state_get_selected(struct device *dev, const char *mux_name)
       |                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/next/build/include/linux/mux/consumer.h:151:33: note: previous definition of 'devm_mux_state_get_selected' with type 'struct mux_state *(struct device *, const char *)'
   151 | static inline struct mux_state *devm_mux_state_get_selected(struct device *dev,
       |                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/next/build/drivers/mux/core.c:885:19: error: redefinition of 'devm_mux_state_get_optional_selected'
   885 | struct mux_state *devm_mux_state_get_optional_selected(struct device *dev,
       |                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/next/build/include/linux/mux/consumer.h:156:33: note: previous definition of 'devm_mux_state_get_optional_selected' with type 'struct mux_state *(struct device *, const char *)'
   156 | static inline struct mux_state *devm_mux_state_get_optional_selected(struct device *dev,
       |                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Quoted 3 lines

Caused by commit

ad314348ceb4f (mux: Add helper functions for getting optional and selected mux-state)

I am puzzled by this result, and trying to debug but x86 allmodconfig is a very slow build on my laptop.

The static inline function declarations from the errors are in the else case if an ifdef CONIG_MULTIPLEXER.

The mux.c should only be compiled if CONFIG_MULTIPLEXER is defined, based on drivers/mux/Makefile:

mux-core-objs                   := core.o
obj-$(CONFIG_MULTIPLEXER)       += mux-core.o

I don't understand how it is possible for mux.c to be compiled, while at the same time CONFIG_MULTIPLEXER is not defined.

Any ideas?

Quoted 2 lines

I have used the version from next-20260204 insted.

#2 lore raw
Quoted 180 lines · Josua Mayer

Hi Mark,

Quoted 163 lines · Mark Brown

Hi all,

After merging the mmc tree, today's linux-next build (x86_64 allmodconfig)
failed like this:

/tmp/next/build/drivers/mux/core.c:312:14: error: redefinition of 'mux_control_states'
   312 | unsigned int mux_control_states(struct mux_control *mux) |              ^~~~~~~~~~~~~~~~~~
In file included from /tmp/next/build/drivers/mux/core.c:19:
/tmp/next/build/include/linux/mux/consumer.h:70:28: note: previous definition of 'mux_control_states' with type 'unsigned int(struct mux_control *)'
    70 | static inline unsigned int mux_control_states(struct mux_control *mux)
       |                            ^~~~~~~~~~~~~~~~~~ /tmp/next/build/drivers/mux/core.c:375:5: error: redefinition of 'mux_control_select_delay'
   375 | int mux_control_select_delay(struct mux_control *mux, unsigned int state,
       |     ^~~~~~~~~~~~~~~~~~~~~~~~ /tmp/next/build/include/linux/mux/consumer.h:74:32: note: previous definition of 'mux_control_select_delay' with type 'int(struct mux_control *, unsigned int,  unsigned int)'
    74 | static inline int __must_check mux_control_select_delay(struct mux_control *mux,
       |                                ^~~~~~~~~~~~~~~~~~~~~~~~ /tmp/next/build/drivers/mux/core.c:413:5: error: redefinition of 'mux_state_select_delay'
   413 | int mux_state_select_delay(struct mux_state *mstate, unsigned int delay_us)
       |     ^~~~~~~~~~~~~~~~~~~~~~ /tmp/next/build/include/linux/mux/consumer.h:79:32: note: previous definition of 'mux_state_select_delay' with type 'int(struct mux_state *, unsigned int)'
    79 | static inline int __must_check mux_state_select_delay(struct mux_state *mstate,
       |                                ^~~~~~~~~~~~~~~~~~~~~~ /tmp/next/build/drivers/mux/core.c:435:5: error: redefinition of 'mux_control_try_select_delay'
   435 | int mux_control_try_select_delay(struct mux_control *mux, unsigned int state,
       |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ /tmp/next/build/include/linux/mux/consumer.h:84:32: note: previous definition of 'mux_control_try_select_delay' with type 'int(struct mux_control *, unsigned int,  unsigned int)'
    84 | static inline int __must_check mux_control_try_select_delay(struct mux_control *mux,
       | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ /tmp/next/build/drivers/mux/core.c:469:5: error: redefinition of 'mux_state_try_select_delay'
   469 | int mux_state_try_select_delay(struct mux_state *mstate, unsigned int delay_us)
       |     ^~~~~~~~~~~~~~~~~~~~~~~~~~ /tmp/next/build/include/linux/mux/consumer.h:90:32: note: previous definition of 'mux_state_try_select_delay' with type 'int(struct mux_state *, unsigned int)'
    90 | static inline int __must_check mux_state_try_select_delay(struct mux_state *mstate,
       | ^~~~~~~~~~~~~~~~~~~~~~~~~~ /tmp/next/build/drivers/mux/core.c:487:5: error: redefinition of 'mux_control_deselect'
   487 | int mux_control_deselect(struct mux_control *mux)
       |     ^~~~~~~~~~~~~~~~~~~~ /tmp/next/build/include/linux/mux/consumer.h:118:19: note: previous definition of 'mux_control_deselect' with type 'int(struct mux_control *)'
   118 | static inline int mux_control_deselect(struct mux_control *mux) |                   ^~~~~~~~~~~~~~~~~~~~ /tmp/next/build/drivers/mux/core.c:513:5: error: redefinition of 'mux_state_deselect'
   513 | int mux_state_deselect(struct mux_state *mstate)
       |     ^~~~~~~~~~~~~~~~~~ /tmp/next/build/include/linux/mux/consumer.h:122:19: note: previous definition of 'mux_state_deselect' with type 'int(struct mux_state *)' 122 | static inline int mux_state_deselect(struct mux_state *mstate) |                   ^~~~~~~~~~~~~~~~~~ /tmp/next/build/drivers/mux/core.c:636:21: error: redefinition of 'mux_control_get'
   636 | struct mux_control *mux_control_get(struct device *dev, const char *mux_name)
       |                     ^~~~~~~~~~~~~~~ /tmp/next/build/include/linux/mux/consumer.h:127:35: note: previous definition of 'mux_control_get' with type 'struct mux_control *(struct device *, const char *)'
   127 | static inline struct mux_control *mux_control_get(struct device *dev, const char *mux_name)
       |                                   ^~~~~~~~~~~~~~~ /tmp/next/build/drivers/mux/core.c:655:21: error: redefinition of 'mux_control_get_optional'
   655 | struct mux_control *mux_control_get_optional(struct device *dev, const char *mux_name)
       |                     ^~~~~~~~~~~~~~~~~~~~~~~~ /tmp/next/build/include/linux/mux/consumer.h:131:35: note: previous definition of 'mux_control_get_optional' with type 'struct mux_control *(struct device *, const char *)'
   131 | static inline struct mux_control *mux_control_get_optional(struct device *dev,
       | ^~~~~~~~~~~~~~~~~~~~~~~~ /tmp/next/build/drivers/mux/core.c:667:6: error: redefinition of 'mux_control_put'
   667 | void mux_control_put(struct mux_control *mux)
       |      ^~~~~~~~~~~~~~~ /tmp/next/build/include/linux/mux/consumer.h:136:20: note: previous definition of 'mux_control_put' with type 'void(struct mux_control *)' 136 | static inline void mux_control_put(struct mux_control *mux) {} |                    ^~~~~~~~~~~~~~~ /tmp/next/build/drivers/mux/core.c:688:21: error: redefinition of 'devm_mux_control_get'
   688 | struct mux_control *devm_mux_control_get(struct device *dev, |                     ^~~~~~~~~~~~~~~~~~~~ /tmp/next/build/include/linux/mux/consumer.h:138:35: note: previous definition of 'devm_mux_control_get' with type 'struct mux_control *(struct device *, const char *)'
   138 | static inline struct mux_control *devm_mux_control_get(struct device *dev, const char *mux_name) |                                   ^~~~~~~~~~~~~~~~~~~~ /tmp/next/build/drivers/mux/core.c:831:19: error: redefinition of 'devm_mux_state_get'
   831 | struct mux_state *devm_mux_state_get(struct device *dev, const char *mux_name)
       |                   ^~~~~~~~~~~~~~~~~~ /tmp/next/build/include/linux/mux/consumer.h:142:33: note: previous definition of 'devm_mux_state_get' with type 'struct mux_state *(struct device *, const char *)'
   142 | static inline struct mux_state *devm_mux_state_get(struct device *dev, const char *mux_name)
       |                                 ^~~~~~~~~~~~~~~~~~ /tmp/next/build/drivers/mux/core.c:848:19: error: redefinition of 'devm_mux_state_get_optional'
   848 | struct mux_state *devm_mux_state_get_optional(struct device *dev, const char *mux_name)
       |                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~ /tmp/next/build/include/linux/mux/consumer.h:146:33: note: previous definition of 'devm_mux_state_get_optional' with type 'struct mux_state *(struct device *, const char *)'
   146 | static inline struct mux_state *devm_mux_state_get_optional(struct device *dev,
       | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ /tmp/next/build/drivers/mux/core.c:866:19: error: redefinition of 'devm_mux_state_get_selected'
   866 | struct mux_state *devm_mux_state_get_selected(struct device *dev, const char *mux_name)
       |                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~ /tmp/next/build/include/linux/mux/consumer.h:151:33: note: previous definition of 'devm_mux_state_get_selected' with type 'struct mux_state *(struct device *, const char *)'
   151 | static inline struct mux_state *devm_mux_state_get_selected(struct device *dev,
       | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ /tmp/next/build/drivers/mux/core.c:885:19: error: redefinition of 'devm_mux_state_get_optional_selected'
   885 | struct mux_state *devm_mux_state_get_optional_selected(struct device *dev,
       |                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /tmp/next/build/include/linux/mux/consumer.h:156:33: note: previous definition of 'devm_mux_state_get_optional_selected' with type 'struct mux_state *(struct device *, const char *)'
   156 | static inline struct mux_state *devm_mux_state_get_optional_selected(struct device *dev,
       | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Quoted 4 lines

Caused by commit

   ad314348ceb4f (mux: Add helper functions for getting optional and selected mux-state)

I am puzzled by this result, and trying to debug but x86 allmodconfig is a very slow build on my laptop.

The static inline function declarations from the errors are in the else case if an ifdef CONIG_MULTIPLEXER.

The mux.c should only be compiled if CONFIG_MULTIPLEXER is defined, based on drivers/mux/Makefile:

Quoted 7 lines

mux-core-objs                   := core.o
obj-$(CONFIG_MULTIPLEXER)       += mux-core.o

I don't understand how it is possible for mux.c to be compiled, while at the same time CONFIG_MULTIPLEXER is not defined.

Any ideas?

Looks like my mistake, I wrongly assumed that CONFIG_MULTIPLEXER would be defined in both cases MULTIPLEXER=y or =m. Sorry about the noise :(

Instead I should have used IS_ENABLED macro:

include/linux/mux/consumer.h +1 -1
index 3ede55b907eb..dd1c6207fc09 100644
@@ -16,7 +16,7 @@ struct device;
  struct mux_control;
  struct mux_state;
 
-#ifdef CONFIG_MULTIPLEXER
+#if IS_ENABLED(CONFIG_MULTIPLEXER)
 
  unsigned int mux_control_states(struct mux_control *mux);
  int __must_check mux_control_select_delay(struct mux_control *mux,
Quoted 3 lines
Quoted 3 lines

I have used the version from next-20260204 insted.

author maintainer
#3 lore raw
Quoted 9 lines · Josua Mayer
Quoted 1 line · Josua Mayer

Any ideas?

Looks like my mistake, I wrongly assumed that CONFIG_MULTIPLEXER would be defined in both cases MULTIPLEXER=y or =m. Sorry about the noise :(

Instead I should have used IS_ENABLED macro:

Yes, exactly - IIRC the module ends up as CONFIG_MULTIPLEXER_MODULE or something. Common gotcha :(