Re: [PATCH] serial: 8250: fix compile error with hub6_match_port() when compiled as a module
From: Andy Shevchenko
Date: Mon Jul 20 2026 - 15:09:17 EST
On Wed, Jul 15, 2026 at 11:37:05AM -0400, Hugo Villeneuve wrote:
> With CONFIG_SERIAL_8250_HUB6=m, we have the following compile error:
>
> ../drivers/tty/serial/8250/8250_hub6.c:46:6: error: redefinition of
> 'hub6_match_port'
>
> Fix hub6_match_port() prototype definition by using IS_REACHABLE() to
> support both built-in and module values, and substitute empty prototype
> otherwise.
...
> +#include <linux/kconfig.h>
It's special header. It is always-included one, and hence here is a dup, please
drop this line.
--
With Best Regards,
Andy Shevchenko