Re: [PATCH 3/4] serial: 8250: map UAPI port type to internal enum

Andy Shevchenko <andriy.shevchenko-VuQAYsv1563Yd54FQh9/[email protected]>
Newsgroups gmane.linux.drivers.devicetree,gmane.linux.kernel,gmane.linux.serial
Organization Intel Finland Oy - BIC 0357606-4 - c/o Alberga Business Park, 6 krs, Bertel Jungin Aukio 5, 02600 Espoo
Message-ID <[email protected]>
On Thu, Jul 09, 2026 at 10:56:51PM +0200, Christian Marangi wrote:
> There is currently some confusion when a new 8250 UART device needs to be
> defined with the related index for uart_config[] to be directly defined in
> UAPI header.
> 
> There isn't any specific reason to define the index directly in UAPI header
> unless it's also needed to be defined for userspace usage.
> 
> To try to address this confusion and making it clear how these specific
> index should be defined and where, create a dedicated enum in 8250.h
> with all the current defined values in UAPI header and document how these
> id should be defined.
> 
> Rename the define in 8250_port.c with the new UART_ prefix.

This will bring a wide field for the all possible conflicts and doesn't really
solve the issue. Why not simply kill the UAPI part of the definitions for good?
(Move the all, except the first 13) to be internal to the kernel.

-- 
With Best Regards,
Andy Shevchenko
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.