serial: cpm_uart: Remove stale prototypes and table and macros
authorChristophe Leroy <christophe.leroy@csgroup.eu>
Thu, 3 Aug 2023 13:56:43 +0000 (15:56 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 4 Aug 2023 13:08:29 +0000 (15:08 +0200)
cpm_uart_init_portdesc()
smc1_lineif()
smc2_lineif()
scc1_lineif()
scc2_lineif()
scc3_lineif()
scc4_lineif()

Those functions were removed by commit 0b2a2e5b7747 ("cpm_uart: Remove
!CONFIG_PPC_CPM_NEW_BINDING code"). Remove stale prototypes.

UART_SMC{1..2} and UART_SCC{1..4} and SCC_WAIT_CLOSING macros are not
used anymore since the above commit.

cpm_uart_ports[] isn't used outside cpm_uart_core.c since the
same commit, so make it static.

cpm_uart_init_smc() and cpm_uart_init_scc() don't need a forward
declaration.

FLAG_DISCARDING and IS_DISCARDING have never been used since at
least 2.6.12 and the start of git repository for kernel.

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Link: https://lore.kernel.org/r/96ef20ae1df056d1b7967871ba6e27e5b5aaeea6.1691068700.git.christophe.leroy@csgroup.eu
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/cpm_uart/cpm_uart.h
drivers/tty/serial/cpm_uart/cpm_uart_core.c

index 46c03ed..687b48f 100644 (file)
@@ -25,18 +25,9 @@ struct gpio_desc;
 #define SERIAL_CPM_MINOR       46
 
 #define IS_SMC(pinfo)          (pinfo->flags & FLAG_SMC)
-#define IS_DISCARDING(pinfo)   (pinfo->flags & FLAG_DISCARDING)
-#define FLAG_DISCARDING        0x00000004      /* when set, don't discard */
 #define FLAG_SMC       0x00000002
 #define FLAG_CONSOLE   0x00000001
 
-#define UART_SMC1      fsid_smc1_uart
-#define UART_SMC2      fsid_smc2_uart
-#define UART_SCC1      fsid_scc1_uart
-#define UART_SCC2      fsid_scc2_uart
-#define UART_SCC3      fsid_scc3_uart
-#define UART_SCC4      fsid_scc4_uart
-
 #define UART_NR                fs_uart_nr
 
 #define RX_NUM_FIFO    4
@@ -44,8 +35,6 @@ struct gpio_desc;
 #define TX_NUM_FIFO    4
 #define TX_BUF_SIZE    32
 
-#define SCC_WAIT_CLOSING 100
-
 #define GPIO_CTS       0
 #define GPIO_RTS       1
 #define GPIO_DCD       2
@@ -85,24 +74,14 @@ struct uart_cpm_port {
        struct gpio_desc        *gpios[NUM_GPIOS];
 };
 
-extern struct uart_cpm_port cpm_uart_ports[UART_NR];
-
 /* these are located in their respective files */
 void cpm_line_cr_cmd(struct uart_cpm_port *port, int cmd);
 void __iomem *cpm_uart_map_pram(struct uart_cpm_port *port,
                                struct device_node *np);
 void cpm_uart_unmap_pram(struct uart_cpm_port *port, void __iomem *pram);
-int cpm_uart_init_portdesc(void);
 int cpm_uart_allocbuf(struct uart_cpm_port *pinfo, unsigned int is_con);
 void cpm_uart_freebuf(struct uart_cpm_port *pinfo);
 
-void smc1_lineif(struct uart_cpm_port *pinfo);
-void smc2_lineif(struct uart_cpm_port *pinfo);
-void scc1_lineif(struct uart_cpm_port *pinfo);
-void scc2_lineif(struct uart_cpm_port *pinfo);
-void scc3_lineif(struct uart_cpm_port *pinfo);
-void scc4_lineif(struct uart_cpm_port *pinfo);
-
 /*
    virtual to phys transtalion
 */
index 71366a4..d804dd4 100644 (file)
@@ -48,8 +48,6 @@
 /**************************************************************/
 
 static int  cpm_uart_tx_pump(struct uart_port *port);
-static void cpm_uart_init_smc(struct uart_cpm_port *pinfo);
-static void cpm_uart_init_scc(struct uart_cpm_port *pinfo);
 static void cpm_uart_initbd(struct uart_cpm_port *pinfo);
 
 /**************************************************************/
@@ -1128,7 +1126,7 @@ static const struct uart_ops cpm_uart_pops = {
 #endif
 };
 
-struct uart_cpm_port cpm_uart_ports[UART_NR];
+static struct uart_cpm_port cpm_uart_ports[UART_NR];
 
 static int cpm_uart_init_port(struct device_node *np,
                               struct uart_cpm_port *pinfo)