Re: [PATCH] serial: core: Fix serial core port id, including multiport devices

From: Andy Shevchenko
Date: Thu Aug 10 2023 - 11:24:50 EST


On Thu, Aug 10, 2023 at 09:57:34AM +0300, Tony Lindgren wrote:
> We want to fix the serial core port DEVNAME to use a port id of the
> hardware specific controller port instance instead of the port->line.
>
> For example, the 8250 driver sets up a number of serial8250 ports
> initially that can be inherited by the hardware specific driver. At that
> the port->line no longer decribes the port's relation to the serial core
> controller instance.
>
> Let's fix the issue by assigning port->port_id for each serial core
> controller port instance.

...

> + unsigned int min = 0, max = ~0U;

Shouldn't this be int? The max IIRC will be INT_MAX with this anyway.

--
With Best Regards,
Andy Shevchenko