]> git.baikalelectronics.ru Git - kernel.git/commitdiff
MIPS: ath79: Remove one of the identical args in early_printk
authorIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Mon, 4 Jul 2022 12:51:51 +0000 (15:51 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 8 Jul 2022 13:13:26 +0000 (15:13 +0200)
prom_putchar_wait() inputs both mask and val but the callers always set
them to the same value. Thus pass only val.

Suggested-by: Jiri Slaby <jirislaby@kernel.org>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Link: https://lore.kernel.org/r/20220704125151.59231-1-ilpo.jarvinen@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/mips/ath79/early_printk.c

index f6d02b425a10918b14562876d3e06ff4ac7b8994..34c4dfdf46b4ca22d0bc7737480095e67ded1e81 100644 (file)
 
 static void (*_prom_putchar)(char);
 
-static inline void prom_putchar_wait(void __iomem *reg, u32 mask, u32 val)
+static inline void prom_putchar_wait(void __iomem *reg, u32 val)
 {
        u32 t;
 
        do {
                t = __raw_readl(reg);
-               if ((t & mask) == val)
+               if ((t & val) == val)
                        break;
        } while (1);
 }
@@ -34,23 +34,19 @@ static void prom_putchar_ar71xx(char ch)
 {
        void __iomem *base = (void __iomem *)(KSEG1ADDR(AR71XX_UART_BASE));
 
-       prom_putchar_wait(base + UART_LSR * 4, UART_LSR_BOTH_EMPTY,
-                         UART_LSR_BOTH_EMPTY);
+       prom_putchar_wait(base + UART_LSR * 4, UART_LSR_BOTH_EMPTY);
        __raw_writel((unsigned char)ch, base + UART_TX * 4);
-       prom_putchar_wait(base + UART_LSR * 4, UART_LSR_BOTH_EMPTY,
-                         UART_LSR_BOTH_EMPTY);
+       prom_putchar_wait(base + UART_LSR * 4, UART_LSR_BOTH_EMPTY);
 }
 
 static void prom_putchar_ar933x(char ch)
 {
        void __iomem *base = (void __iomem *)(KSEG1ADDR(AR933X_UART_BASE));
 
-       prom_putchar_wait(base + AR933X_UART_DATA_REG, AR933X_UART_DATA_TX_CSR,
-                         AR933X_UART_DATA_TX_CSR);
+       prom_putchar_wait(base + AR933X_UART_DATA_REG, AR933X_UART_DATA_TX_CSR);
        __raw_writel(AR933X_UART_DATA_TX_CSR | (unsigned char)ch,
                     base + AR933X_UART_DATA_REG);
-       prom_putchar_wait(base + AR933X_UART_DATA_REG, AR933X_UART_DATA_TX_CSR,
-                         AR933X_UART_DATA_TX_CSR);
+       prom_putchar_wait(base + AR933X_UART_DATA_REG, AR933X_UART_DATA_TX_CSR);
 }
 
 static void prom_putchar_dummy(char ch)