[PATCH 2/5] tty/termbits: remove #ifdef BOTHER that is always defined

Johan Hovold johan at kernel.org
Fri May 13 00:07:55 PDT 2022


On Wed, May 11, 2022 at 01:11:36PM +0300, Ilpo Järvinen wrote:
> BOTHER is defined by all architectures.

This changed quite recently so please mention the commit in question.

No need for the verbose Subject here either.

> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen at linux.intel.com>
> ---
>  drivers/tty/mxser.c        |  2 --
>  drivers/tty/tty_baudrate.c | 20 +++++---------------
>  drivers/tty/tty_ioctl.c    |  2 --
>  3 files changed, 5 insertions(+), 19 deletions(-)
> 
> diff --git a/drivers/tty/mxser.c b/drivers/tty/mxser.c
> index 6ebd3e4ed859..9ea7bd059d0f 100644
> --- a/drivers/tty/mxser.c
> +++ b/drivers/tty/mxser.c
> @@ -528,7 +528,6 @@ static int mxser_set_baud(struct tty_struct *tty, speed_t newspd)
>  	outb(quot >> 8, info->ioaddr + UART_DLM);	/* MS of divisor */
>  	outb(cval, info->ioaddr + UART_LCR);	/* reset DLAB */
>  
> -#ifdef BOTHER
>  	if (C_BAUD(tty) == BOTHER) {
>  		quot = MXSER_BAUD_BASE % newspd;
>  		quot *= 8;
> @@ -540,7 +539,6 @@ static int mxser_set_baud(struct tty_struct *tty, speed_t newspd)
>  
>  		mxser_set_must_enum_value(info->ioaddr, quot);
>  	} else
> -#endif
>  		mxser_set_must_enum_value(info->ioaddr, 0);

When removing the ifdef, please add the missing bracket to the else
branch as per the coding standard.

Johan



More information about the linux-arm-kernel mailing list