Skip to contentSkip to conversation

tty: serial: mpc52xx_uart: move static declarations up.

PATCH New Rosen Penev 2 participants 2 messages Sep 27 TTY layer and serial drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tty: serial: mpc52xx_uart: move static declarations up.

Avoid a compilation error so that they're not used before being declared.

Fixes 4d105880666a ("tty: serial: mpc52xx_uart: add bounds check for psc_num array index")
---
 drivers/tty/serial/mpc52xx_uart.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/tty/serial/mpc52xx_uart.c +3 -3
index b566206f42a2..472ec39caf27 100644
@@ -634,6 +634,9 @@ static void __exit mpc512x_psc_fifoc_uninit(void)
 	}
 }
 
+static struct clk *psc_mclk_clk[MPC52xx_PSC_MAXNUM];
+static struct clk *psc_ipg_clk[MPC52xx_PSC_MAXNUM];
+
 /* 512x specific interrupt handler. The caller holds the port lock */
 static irqreturn_t mpc512x_psc_handle_irq(struct uart_port *port)
 {
@@ -654,9 +657,6 @@ static irqreturn_t mpc512x_psc_handle_irq(struct uart_port *port)
 	return IRQ_NONE;
 }
 
-static struct clk *psc_mclk_clk[MPC52xx_PSC_MAXNUM];
-static struct clk *psc_ipg_clk[MPC52xx_PSC_MAXNUM];
-
 /* called from within the .request_port() callback (allocation) */
 static int mpc512x_psc_alloc_clock(struct uart_port *port)
 {
Signature · 1 line
2.55.0
#1 lore raw
Sashiko has reviewed this patch and found no issues. It looks great!
Quoted 7 lines

Avoid a compilation error so that they're not used before being declared.

Fixes 4d105880666a ("tty: serial: mpc52xx_uart: add bounds check for psc_num array index")

Sashiko has reviewed this patch and found no issues. It looks great!

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1