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

From: Josua Mayer <[email-masked]>
Date: Thu, 5 Feb 2026 20:11:04 +0000

Hi Mark,

On 2/5/26 15:33, Mark Brown wrote:
> 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 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?

>
> I have used the version from next-20260204 insted.