* [PATCH v1 1/1] serial: core: Remove unused PORT_* definitions
@ 2023-08-18 11:12 Andy Shevchenko
2023-08-19 9:53 ` Greg Kroah-Hartman
2023-08-21 8:22 ` Andy Shevchenko
0 siblings, 2 replies; 5+ messages in thread
From: Andy Shevchenko @ 2023-08-18 11:12 UTC (permalink / raw)
To: Andy Shevchenko, linux-kernel, linux-serial
Cc: Greg Kroah-Hartman, Jiri Slaby
For the last couple of years Linux kernel got rid of a few architectures
and many platforms. Hence some PORT_* definitions in the serial_core.h
become unused and redundant. Remove them for good.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
include/uapi/linux/serial_core.h | 43 ++------------------------------
1 file changed, 2 insertions(+), 41 deletions(-)
diff --git a/include/uapi/linux/serial_core.h b/include/uapi/linux/serial_core.h
index 281fa286555c..c361570a334f 100644
--- a/include/uapi/linux/serial_core.h
+++ b/include/uapi/linux/serial_core.h
@@ -28,7 +28,7 @@
*/
#define PORT_NS16550A 14
#define PORT_XSCALE 15
-#define PORT_RM9000 16 /* PMC-Sierra RM9xxx internal UART */
+
#define PORT_OCTEON 17 /* Cavium OCTEON internal UART */
#define PORT_AR7 18 /* Texas Instruments AR7 internal UART */
#define PORT_U6_16550A 19 /* ST-Ericsson U6xxx internal UART */
@@ -94,15 +94,9 @@
#define PORT_SCIF 53
#define PORT_IRDA 54
-/* Samsung S3C2410 SoC and derivatives thereof */
-#define PORT_S3C2410 55
-
/* SGI IP22 aka Indy / Challenge S / Indigo 2 */
#define PORT_IP22ZILOG 56
-/* Sharp LH7a40x -- an ARM9 SoC series */
-#define PORT_LH7A40X 57
-
/* PPC CPM type number */
#define PORT_CPM 58
@@ -112,51 +106,27 @@
/* IBM icom */
#define PORT_ICOM 60
-/* Samsung S3C2440 SoC */
-#define PORT_S3C2440 61
-
/* Motorola i.MX SoC */
#define PORT_IMX 62
-/* Marvell MPSC (obsolete unused) */
-#define PORT_MPSC 63
-
/* TXX9 type number */
#define PORT_TXX9 64
-/* Samsung S3C2400 SoC */
-#define PORT_S3C2400 67
-
-/* M32R SIO */
-#define PORT_M32R_SIO 68
-
/*Digi jsm */
#define PORT_JSM 69
/* SUN4V Hypervisor Console */
#define PORT_SUNHV 72
-#define PORT_S3C2412 73
-
/* Xilinx uartlite */
#define PORT_UARTLITE 74
-/* Blackfin bf5xx */
-#define PORT_BFIN 75
-
/* Broadcom SB1250, etc. SOC */
#define PORT_SB1250_DUART 77
/* Freescale ColdFire */
#define PORT_MCF 78
-/* Blackfin SPORT */
-#define PORT_BFIN_SPORT 79
-
-/* MN10300 on-chip UART numbers */
-#define PORT_MN10300 80
-#define PORT_MN10300_CTS 81
-
#define PORT_SC26XX 82
/* SH-SCI */
@@ -164,9 +134,6 @@
#define PORT_S3C6400 84
-/* NWPSERIAL, now removed */
-#define PORT_NWPSERIAL 85
-
/* MAX3100 */
#define PORT_MAX3100 86
@@ -225,13 +192,10 @@
/* ST ASC type numbers */
#define PORT_ASC 105
-/* Tilera TILE-Gx UART */
-#define PORT_TILEGX 106
-
/* MEN 16z135 UART */
#define PORT_MEN_Z135 107
-/* SC16IS74xx */
+/* SC16IS7xx */
#define PORT_SC16IS7XX 108
/* MESON */
@@ -243,9 +207,6 @@
/* SPRD SERIAL */
#define PORT_SPRD 111
-/* Cris v10 / v32 SoC */
-#define PORT_CRIS 112
-
/* STM32 USART */
#define PORT_STM32 113
--
2.40.0.1.gaa8946217a0b
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v1 1/1] serial: core: Remove unused PORT_* definitions
2023-08-18 11:12 [PATCH v1 1/1] serial: core: Remove unused PORT_* definitions Andy Shevchenko
@ 2023-08-19 9:53 ` Greg Kroah-Hartman
2023-08-21 8:14 ` Andy Shevchenko
2023-08-21 8:22 ` Andy Shevchenko
1 sibling, 1 reply; 5+ messages in thread
From: Greg Kroah-Hartman @ 2023-08-19 9:53 UTC (permalink / raw)
To: Andy Shevchenko; +Cc: linux-kernel, linux-serial, Jiri Slaby
On Fri, Aug 18, 2023 at 02:12:29PM +0300, Andy Shevchenko wrote:
> For the last couple of years Linux kernel got rid of a few architectures
> and many platforms. Hence some PORT_* definitions in the serial_core.h
> become unused and redundant. Remove them for good.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
> include/uapi/linux/serial_core.h | 43 ++------------------------------
> 1 file changed, 2 insertions(+), 41 deletions(-)
>
> diff --git a/include/uapi/linux/serial_core.h b/include/uapi/linux/serial_core.h
> index 281fa286555c..c361570a334f 100644
> --- a/include/uapi/linux/serial_core.h
> +++ b/include/uapi/linux/serial_core.h
> @@ -28,7 +28,7 @@
> */
> #define PORT_NS16550A 14
> #define PORT_XSCALE 15
> -#define PORT_RM9000 16 /* PMC-Sierra RM9xxx internal UART */
> +
I'm all for removing these defines, but are you sure they are not used
in any userspace code? Ususally a debian code search is good enough
"proof" of this, did you do that?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v1 1/1] serial: core: Remove unused PORT_* definitions
2023-08-19 9:53 ` Greg Kroah-Hartman
@ 2023-08-21 8:14 ` Andy Shevchenko
0 siblings, 0 replies; 5+ messages in thread
From: Andy Shevchenko @ 2023-08-21 8:14 UTC (permalink / raw)
To: Greg Kroah-Hartman; +Cc: linux-kernel, linux-serial, Jiri Slaby
On Sat, Aug 19, 2023 at 11:53:36AM +0200, Greg Kroah-Hartman wrote:
> On Fri, Aug 18, 2023 at 02:12:29PM +0300, Andy Shevchenko wrote:
...
> I'm all for removing these defines, but are you sure they are not used
> in any userspace code? Ususally a debian code search is good enough
> "proof" of this, did you do that?
Thank you for a pointer, haven't checked.
Do you know if they have an API so I can run it via script?
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v1 1/1] serial: core: Remove unused PORT_* definitions
2023-08-18 11:12 [PATCH v1 1/1] serial: core: Remove unused PORT_* definitions Andy Shevchenko
2023-08-19 9:53 ` Greg Kroah-Hartman
@ 2023-08-21 8:22 ` Andy Shevchenko
2023-08-21 8:24 ` Andy Shevchenko
1 sibling, 1 reply; 5+ messages in thread
From: Andy Shevchenko @ 2023-08-21 8:22 UTC (permalink / raw)
To: linux-kernel, linux-serial; +Cc: Greg Kroah-Hartman, Jiri Slaby
On Fri, Aug 18, 2023 at 02:12:29PM +0300, Andy Shevchenko wrote:
> For the last couple of years Linux kernel got rid of a few architectures
> and many platforms. Hence some PORT_* definitions in the serial_core.h
> become unused and redundant. Remove them for good.
Below are results via Debian Code Search.
Note, I excluded Linux kernel itself from the "user" and Hurd, which seems
to have Linux kernel v2.6 which is _provider_ of the definition(s).
...
> -#define PORT_RM9000 16 /* PMC-Sierra RM9xxx internal UART */
ifdeffed, safe to remove.
> -#define PORT_S3C2410 55
> -#define PORT_LH7A40X 57
> -#define PORT_S3C2440 61
> -#define PORT_MPSC 63
> -#define PORT_S3C2400 67
> -#define PORT_M32R_SIO 68
> -#define PORT_S3C2412 73
> -#define PORT_BFIN 75
> -#define PORT_BFIN_SPORT 79
> -#define PORT_MN10300 80
> -#define PORT_MN10300_CTS 81
> -#define PORT_NWPSERIAL 85
> -#define PORT_TILEGX 106
> -#define PORT_CRIS 112
Unused.
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v1 1/1] serial: core: Remove unused PORT_* definitions
2023-08-21 8:22 ` Andy Shevchenko
@ 2023-08-21 8:24 ` Andy Shevchenko
0 siblings, 0 replies; 5+ messages in thread
From: Andy Shevchenko @ 2023-08-21 8:24 UTC (permalink / raw)
To: linux-kernel, linux-serial; +Cc: Greg Kroah-Hartman, Jiri Slaby
On Mon, Aug 21, 2023 at 11:22:49AM +0300, Andy Shevchenko wrote:
> On Fri, Aug 18, 2023 at 02:12:29PM +0300, Andy Shevchenko wrote:
> > For the last couple of years Linux kernel got rid of a few architectures
> > and many platforms. Hence some PORT_* definitions in the serial_core.h
> > become unused and redundant. Remove them for good.
>
> Below are results via Debian Code Search.
>
> Note, I excluded Linux kernel itself from the "user" and Hurd, which seems
> to have Linux kernel v2.6 which is _provider_ of the definition(s).
...
> > -#define PORT_RM9000 16 /* PMC-Sierra RM9xxx internal UART */
>
> ifdeffed, safe to remove.
Actually on the second thought, this can bring a collision in case someone adds
another ID with the same value.
I'll issue the v2 with this line left untouched.
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-08-21 8:24 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-18 11:12 [PATCH v1 1/1] serial: core: Remove unused PORT_* definitions Andy Shevchenko
2023-08-19 9:53 ` Greg Kroah-Hartman
2023-08-21 8:14 ` Andy Shevchenko
2023-08-21 8:22 ` Andy Shevchenko
2023-08-21 8:24 ` Andy Shevchenko
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).