Re: [PATCH] serial: 8250: fix compile error with hub6_match_port() when compiled as a module

From: Hugo Villeneuve

Date: Mon Jul 20 2026 - 15:11:47 EST


Hi Andy,

On Mon, 20 Jul 2026 21:09:03 +0200
Andy Shevchenko <andriy.shevchenko@xxxxxxxxx> wrote:

> 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.

Will do. I will also remove the one in max310x.c which was added by...
me :)

--
Hugo Villeneuve