[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH 8/8] drivers/exynos4210: Remove unused-but-set variable
Function exynos4210_uart_init_preirq defines and sets a variable divisor but does not make use of it. Remove the definition and comment out the assignment as this function already has some TODOs. Signed-off-by: Michal Orzel <michal.orzel@xxxxxxx> --- Commenting out a code is a bad practise as well as using TODOs. However the only alternative would be to get rid of divisor variable and TODO comments. I'm open for solutions. --- xen/drivers/char/exynos4210-uart.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/xen/drivers/char/exynos4210-uart.c b/xen/drivers/char/exynos4210-uart.c index fa7dbc0391..43aaf02e18 100644 --- a/xen/drivers/char/exynos4210-uart.c +++ b/xen/drivers/char/exynos4210-uart.c @@ -101,7 +101,6 @@ static void exynos4210_uart_interrupt(int irq, void *data, struct cpu_user_regs static void __init exynos4210_uart_init_preirq(struct serial_port *port) { struct exynos4210_uart *uart = port->uart; - unsigned int divisor; uint32_t ulcon; /* reset, TX/RX disables */ @@ -113,9 +112,12 @@ static void __init exynos4210_uart_init_preirq(struct serial_port *port) /* Line control and baud-rate generator. */ if ( uart->baud != BAUD_AUTO ) { - /* Baud rate specified: program it into the divisor latch. */ - divisor = ((uart->clock_hz) / (uart->baud)) - 1; - /* FIXME: will use a hacked divisor, assuming the src clock and bauds */ + /* + * TODO: should be updated + * Baud rate specified: program it into the divisor latch. + * divisor = ((uart->clock_hz) / (uart->baud)) - 1; + * FIXME: will use a hacked divisor, assuming the src clock and bauds. + */ exynos4210_write(uart, UFRACVAL, 53); exynos4210_write(uart, UBRDIV, 4); } -- 2.25.1
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |