Re: [PATCH] serial: 8250_hub6: Fix double definition for hub6_match_port()

From: Hugo Villeneuve

Date: Thu Jul 30 2026 - 16:24:22 EST


Hi Uwe,

On Thu, 30 Jul 2026 21:57:01 +0200
Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxx> wrote:

> Hello Hugo,
>
> On Thu, Jul 30, 2026 at 04:49:45PM +0200, Greg Kroah-Hartman wrote:
> > On Wed, Jul 29, 2026 at 03:30:57PM +0200, Uwe Kleine-König wrote:
> > > I think the real fix would be to just copy uart_match_port() into the
> > > two drivers that actually use it (and remove the then dead code paths).
> > > Then it would be drivers/tty/serial/8250/8250_core.c using
> > > hub6_match_port() only and that can be handled by a proper dependency.
> >
> > I'm totally confused, so I'll drop this patch from my review queue and
> > wait for you all to figure it out :)
>
> Does my suggestion make sense for you? Do you intend to work on this to
> unconfuse Greg?

I am not sure to fully understand what you suggest. Copying the same
function code to two drivers seems like a waisted opportunity for code
reuse?

This hub6_match_port() stub was suggested in [1] by Ilpo, maybe I could simply
revert to what was done in V1...

[1] https://lore.kernel.org/all/716918cf-b240-43cc-a702-9b3d94dc75d2@xxxxxxxxxxxxxxx/

--
Hugo Villeneuve