lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6996e6ff93067dcddebf0d0c86487345149e165c.1691068700.git.christophe.leroy@csgroup.eu>
Date:   Thu,  3 Aug 2023 15:56:47 +0200
From:   Christophe Leroy <christophe.leroy@...roup.eu>
To:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Jiri Slaby <jirislaby@...nel.org>,
        Michael Ellerman <mpe@...erman.id.au>,
        Nicholas Piggin <npiggin@...il.com>,
        Timur Tabi <timur@...nel.org>
Cc:     Christophe Leroy <christophe.leroy@...roup.eu>,
        linux-kernel@...r.kernel.org, linuxppc-dev@...ts.ozlabs.org,
        linux-serial@...r.kernel.org
Subject: [PATCH v1 06/12] serial: cpm_uart: Deduplicate cpm_line_cr_cmd()

cpm_line_cr_cmd() is identical for CPM1 and CPM2 and
is used only in cpm_uart_core.c. Move it there.

Signed-off-by: Christophe Leroy <christophe.leroy@...roup.eu>
---
 drivers/tty/serial/cpm_uart/cpm_uart.h      | 1 -
 drivers/tty/serial/cpm_uart/cpm_uart_core.c | 5 +++++
 drivers/tty/serial/cpm_uart/cpm_uart_cpm1.c | 5 -----
 drivers/tty/serial/cpm_uart/cpm_uart_cpm2.c | 5 -----
 4 files changed, 5 insertions(+), 11 deletions(-)

diff --git a/drivers/tty/serial/cpm_uart/cpm_uart.h b/drivers/tty/serial/cpm_uart/cpm_uart.h
index 81c1c5f97d19..1b5523474ab4 100644
--- a/drivers/tty/serial/cpm_uart/cpm_uart.h
+++ b/drivers/tty/serial/cpm_uart/cpm_uart.h
@@ -76,7 +76,6 @@ struct uart_cpm_port {
 };
 
 /* 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);
diff --git a/drivers/tty/serial/cpm_uart/cpm_uart_core.c b/drivers/tty/serial/cpm_uart/cpm_uart_core.c
index 743892c0e143..e6f3e4da3144 100644
--- a/drivers/tty/serial/cpm_uart/cpm_uart_core.c
+++ b/drivers/tty/serial/cpm_uart/cpm_uart_core.c
@@ -54,6 +54,11 @@ static void cpm_uart_initbd(struct uart_cpm_port *pinfo);
 
 #define HW_BUF_SPD_THRESHOLD    2400
 
+static void cpm_line_cr_cmd(struct uart_cpm_port *port, int cmd)
+{
+	cpm_command(port->command, cmd);
+}
+
 /*
  * Check, if transmit buffers are processed
 */
diff --git a/drivers/tty/serial/cpm_uart/cpm_uart_cpm1.c b/drivers/tty/serial/cpm_uart/cpm_uart_cpm1.c
index 56fc527015cb..b5680376ff3c 100644
--- a/drivers/tty/serial/cpm_uart/cpm_uart_cpm1.c
+++ b/drivers/tty/serial/cpm_uart/cpm_uart_cpm1.c
@@ -36,11 +36,6 @@
 
 /**************************************************************/
 
-void cpm_line_cr_cmd(struct uart_cpm_port *port, int cmd)
-{
-	cpm_command(port->command, cmd);
-}
-
 void __iomem *cpm_uart_map_pram(struct uart_cpm_port *port,
 				struct device_node *np)
 {
diff --git a/drivers/tty/serial/cpm_uart/cpm_uart_cpm2.c b/drivers/tty/serial/cpm_uart/cpm_uart_cpm2.c
index 108af254e8f3..35f539fcfde8 100644
--- a/drivers/tty/serial/cpm_uart/cpm_uart_cpm2.c
+++ b/drivers/tty/serial/cpm_uart/cpm_uart_cpm2.c
@@ -33,11 +33,6 @@
 
 /**************************************************************/
 
-void cpm_line_cr_cmd(struct uart_cpm_port *port, int cmd)
-{
-	cpm_command(port->command, cmd);
-}
-
 void __iomem *cpm_uart_map_pram(struct uart_cpm_port *port,
 				struct device_node *np)
 {
-- 
2.41.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ