From bf10325475b7968ef26490e2597049012fbc816c Mon Sep 17 00:00:00 2001 From: Mateusz Guzik Date: Tue, 1 Sep 2020 21:50:00 +0000 Subject: [PATCH] uart: clean up empty lines in .c and .h files --- sys/dev/uart/uart_bus_acpi.c | 1 - sys/dev/uart/uart_bus_pccard.c | 1 - sys/dev/uart/uart_cpu_powerpc.c | 3 +-- sys/dev/uart/uart_dev_imx.h | 1 - sys/dev/uart/uart_dev_mu.c | 19 +++++++++---------- sys/dev/uart/uart_dev_mvebu.c | 1 - sys/dev/uart/uart_dev_ns8250.c | 6 +++--- sys/dev/uart/uart_dev_ns8250.h | 2 +- sys/dev/uart/uart_dev_pl011.c | 2 -- sys/dev/uart/uart_dev_quicc.c | 1 - 10 files changed, 14 insertions(+), 23 deletions(-) diff --git a/sys/dev/uart/uart_bus_acpi.c b/sys/dev/uart/uart_bus_acpi.c index 14e598f5a31f..4e4c3541aad2 100644 --- a/sys/dev/uart/uart_bus_acpi.c +++ b/sys/dev/uart/uart_bus_acpi.c @@ -44,7 +44,6 @@ __FBSDID("$FreeBSD$"); #include #include - static int uart_acpi_probe(device_t dev); static device_method_t uart_acpi_methods[] = { diff --git a/sys/dev/uart/uart_bus_pccard.c b/sys/dev/uart/uart_bus_pccard.c index 210ea1232204..c3397bc80b86 100644 --- a/sys/dev/uart/uart_bus_pccard.c +++ b/sys/dev/uart/uart_bus_pccard.c @@ -53,7 +53,6 @@ static device_method_t uart_pccard_methods[] = { DEVMETHOD(device_probe, uart_pccard_probe), DEVMETHOD(device_attach, uart_pccard_attach), DEVMETHOD(device_detach, uart_bus_detach), - { 0, 0 } }; diff --git a/sys/dev/uart/uart_cpu_powerpc.c b/sys/dev/uart/uart_cpu_powerpc.c index f1dac960765b..b56efe4a235f 100644 --- a/sys/dev/uart/uart_cpu_powerpc.c +++ b/sys/dev/uart/uart_cpu_powerpc.c @@ -99,7 +99,7 @@ ofw_get_console_phandle_path(phandle_t node, phandle_t *result, output = OF_finddevice(field.buf); if (output == -1 && size == 4) output = OF_instance_to_package(field.ref); - + if (output != -1) { *result = output; return (0); @@ -202,4 +202,3 @@ uart_cpu_getdev(int devtype, struct uart_devinfo *di) di->parity = UART_PARITY_NONE; return (0); } - diff --git a/sys/dev/uart/uart_dev_imx.h b/sys/dev/uart/uart_dev_imx.h index 7276c7a66cce..9a3962be2335 100644 --- a/sys/dev/uart/uart_dev_imx.h +++ b/sys/dev/uart/uart_dev_imx.h @@ -217,5 +217,4 @@ #define DIS(_bas, _r, _b) CLR((_bas), REG(_r), FLD(_r, _b)) #define IS(_bas, _r, _b) IS_SET((_bas), REG(_r), FLD(_r, _b)) - #endif /* _UART_DEV_IMX5XX_H */ diff --git a/sys/dev/uart/uart_dev_mu.c b/sys/dev/uart/uart_dev_mu.c index b75b5f6ac7fc..e73d2d208069 100644 --- a/sys/dev/uart/uart_dev_mu.c +++ b/sys/dev/uart/uart_dev_mu.c @@ -101,7 +101,7 @@ __FBSDID("$FreeBSD$"); #define AUX_MU_MCR_REG 0x04 #define AUX_MCR_RTS (1<<1) - + #define AUX_MU_LSR_REG 0x05 #define LSR_RXREADY (1) #define LSR_OVRRUN (1<<1) @@ -153,7 +153,7 @@ static struct uart_ops uart_mu_ops = { static int uart_mu_probe(struct uart_bas *bas) { - + return (0); } @@ -169,7 +169,7 @@ uart_mu_param(struct uart_bas *bas, int baudrate, int databits, int stopbits, { uint32_t line; uint32_t baud; - + /* * Zero all settings to make sure * UART is disabled and not configured @@ -199,7 +199,7 @@ uart_mu_param(struct uart_bas *bas, int baudrate, int databits, int stopbits, */ __uart_setreg(bas, AUX_MU_BAUD_REG, ((uint32_t)(baud & 0xFFFF))); } - + /* re-enable UART */ __uart_setreg(bas, AUX_MU_CNTL_REG, CNTL_RXENAB|CNTL_TXENAB); } @@ -283,7 +283,6 @@ static kobj_method_t uart_mu_methods[] = { KOBJMETHOD(uart_transmit, uart_mu_bus_transmit), KOBJMETHOD(uart_grab, uart_mu_bus_grab), KOBJMETHOD(uart_ungrab, uart_mu_bus_ungrab), - { 0, 0 } }; @@ -319,7 +318,7 @@ uart_mu_bus_attach(struct uart_softc *sc) psc->aux_ier = (IER_RXENABLE|IER_TXENABLE|IER_REQUIRED); __uart_setreg(bas, AUX_MU_IER_REG, psc->aux_ier); sc->sc_txbusy = 0; - + return (0); } @@ -375,7 +374,7 @@ uart_mu_bus_ipend(struct uart_softc *sc) struct uart_bas *bas; uint32_t ints; int ipend; - + psc = (struct uart_mu_softc *)sc; bas = &sc->sc_bas; @@ -436,11 +435,11 @@ uart_mu_bus_receive(struct uart_softc *sc) struct uart_bas *bas; uint32_t lsr, xc; int rx; - + bas = &sc->sc_bas; uart_lock(sc->sc_hwmtx); psc = (struct uart_mu_softc *)sc; - + lsr = __uart_getreg(bas, AUX_MU_LSR_REG); while (lsr & LSR_RXREADY) { xc = __uart_getreg(bas, AUX_MU_IO_REG); @@ -470,7 +469,7 @@ uart_mu_bus_transmit(struct uart_softc *sc) struct uart_mu_softc *psc; struct uart_bas *bas; int i; - + psc = (struct uart_mu_softc *)sc; bas = &sc->sc_bas; uart_lock(sc->sc_hwmtx); diff --git a/sys/dev/uart/uart_dev_mvebu.c b/sys/dev/uart/uart_dev_mvebu.c index 355ca7857a1b..44fda4765d8f 100644 --- a/sys/dev/uart/uart_dev_mvebu.c +++ b/sys/dev/uart/uart_dev_mvebu.c @@ -614,4 +614,3 @@ uart_mvebu_bus_ungrab(struct uart_softc *sc) uart_barrier(bas); uart_unlock(sc->sc_hwmtx); } - diff --git a/sys/dev/uart/uart_dev_ns8250.c b/sys/dev/uart/uart_dev_ns8250.c index e02473aa8c36..d920a76ae275 100644 --- a/sys/dev/uart/uart_dev_ns8250.c +++ b/sys/dev/uart/uart_dev_ns8250.c @@ -514,19 +514,19 @@ ns8250_bus_attach(struct uart_softc *sc) ns8250->fcr |= FCR_RX_MEDH; } else ns8250->fcr |= FCR_RX_MEDH; - + /* Get IER mask */ ivar = 0xf0; resource_int_value("uart", device_get_unit(sc->sc_dev), "ier_mask", &ivar); ns8250->ier_mask = (uint8_t)(ivar & 0xff); - + /* Get IER RX interrupt bits */ ivar = IER_EMSC | IER_ERLS | IER_ERXRDY; resource_int_value("uart", device_get_unit(sc->sc_dev), "ier_rxbits", &ivar); ns8250->ier_rxbits = (uint8_t)(ivar & 0xff); - + uart_setreg(bas, REG_FCR, ns8250->fcr); uart_barrier(bas); ns8250_bus_flush(sc, UART_FLUSH_RECEIVER|UART_FLUSH_TRANSMITTER); diff --git a/sys/dev/uart/uart_dev_ns8250.h b/sys/dev/uart/uart_dev_ns8250.h index 906d920e205d..549815273dd2 100644 --- a/sys/dev/uart/uart_dev_ns8250.h +++ b/sys/dev/uart/uart_dev_ns8250.h @@ -39,7 +39,7 @@ struct ns8250_softc { uint8_t fcr; uint8_t ier; uint8_t mcr; - + uint8_t ier_mask; uint8_t ier_rxbits; uint8_t busy_detect; diff --git a/sys/dev/uart/uart_dev_pl011.c b/sys/dev/uart/uart_dev_pl011.c index 3b4f6ba57381..822283369075 100644 --- a/sys/dev/uart/uart_dev_pl011.c +++ b/sys/dev/uart/uart_dev_pl011.c @@ -317,7 +317,6 @@ static kobj_method_t uart_pl011_methods[] = { KOBJMETHOD(uart_transmit, uart_pl011_bus_transmit), KOBJMETHOD(uart_grab, uart_pl011_bus_grab), KOBJMETHOD(uart_ungrab, uart_pl011_bus_ungrab), - { 0, 0 } }; @@ -331,7 +330,6 @@ static struct uart_class uart_pl011_class = { .uc_rshift = 2 }; - #ifdef FDT static struct ofw_compat_data fdt_compat_data[] = { {"arm,pl011", (uintptr_t)&uart_pl011_class}, diff --git a/sys/dev/uart/uart_dev_quicc.c b/sys/dev/uart/uart_dev_quicc.c index 835f9fe56c52..7dec50a732af 100644 --- a/sys/dev/uart/uart_dev_quicc.c +++ b/sys/dev/uart/uart_dev_quicc.c @@ -522,4 +522,3 @@ quicc_bus_ungrab(struct uart_softc *sc) quicc_write2(bas, rb, st | 0x9000); uart_unlock(sc->sc_hwmtx); } -