From: Johan Hovold <johan@kernel.org>
To: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
Cc: linux-serial@vger.kernel.org,
Greg KH <gregkh@linuxfoundation.org>,
Arnd Bergmann <arnd@arndb.de>, Jiri Slaby <jirislaby@kernel.org>,
"David S. Miller" <davem@davemloft.net>,
Oliver Neukum <oneukum@suse.com>,
linux-kernel@vger.kernel.org, sparclinux@vger.kernel.org,
linux-usb@vger.kernel.org
Subject: Re: [PATCH 1/5] tty/termbits: remove #ifdef CMSPAR that is always defined
Date: Fri, 13 May 2022 09:01:59 +0200 [thread overview]
Message-ID: <Yn4CZzRIKRUjhsS5@hovoldconsulting.com> (raw)
In-Reply-To: <20220511101139.5306-2-ilpo.jarvinen@linux.intel.com>
On Wed, May 11, 2022 at 01:11:35PM +0300, Ilpo Järvinen wrote:
> CMSPAR is defined by all architectures.
For the sake of reviewers please say something about when this changed.
Also no need to be so verbose in your Subjects
tty: remove CMSPAR ifdefs
works just fine and is more in line with the prefix typically used for
this subsystem.
> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
> ---
> drivers/char/pcmcia/synclink_cs.c | 2 --
> drivers/tty/amiserial.c | 2 --
> drivers/tty/serial/8250/8250_port.c | 2 --
> drivers/tty/serial/jsm/jsm_cls.c | 6 ------
> drivers/tty/serial/jsm/jsm_neo.c | 6 ------
> drivers/tty/serial/sunsu.c | 2 --
> drivers/usb/class/cdc-acm.h | 8 --------
> drivers/usb/serial/ark3116.c | 3 +--
> drivers/usb/serial/whiteheat.c | 4 ----
> 9 files changed, 1 insertion(+), 34 deletions(-)
The change itself looks good otherwise.
Reviewed-by: Johan Hovold <johan@kernel.org>
> diff --git a/drivers/char/pcmcia/synclink_cs.c b/drivers/char/pcmcia/synclink_cs.c
> index 78baba55a8b5..c20f2cb784e8 100644
> --- a/drivers/char/pcmcia/synclink_cs.c
> +++ b/drivers/char/pcmcia/synclink_cs.c
> @@ -1432,10 +1432,8 @@ static void mgslpc_change_params(MGSLPC_INFO *info, struct tty_struct *tty)
> info->params.parity = ASYNC_PARITY_ODD;
> else
> info->params.parity = ASYNC_PARITY_EVEN;
> -#ifdef CMSPAR
> if (cflag & CMSPAR)
> info->params.parity = ASYNC_PARITY_SPACE;
> -#endif
> }
>
> /* calculate number of jiffies to transmit a full
> diff --git a/drivers/tty/amiserial.c b/drivers/tty/amiserial.c
> index 533d02b38e02..afb2d373dd47 100644
> --- a/drivers/tty/amiserial.c
> +++ b/drivers/tty/amiserial.c
> @@ -588,10 +588,8 @@ static void change_speed(struct tty_struct *tty, struct serial_state *info,
> }
> if (!(cflag & PARODD))
> cval |= UART_LCR_EPAR;
> -#ifdef CMSPAR
> if (cflag & CMSPAR)
> cval |= UART_LCR_SPAR;
> -#endif
>
> /* Determine divisor based on baud rate */
> baud = tty_get_baud_rate(tty);
> diff --git a/drivers/tty/serial/8250/8250_port.c b/drivers/tty/serial/8250/8250_port.c
> index 5591f18f2ea9..78b6dedc43e6 100644
> --- a/drivers/tty/serial/8250/8250_port.c
> +++ b/drivers/tty/serial/8250/8250_port.c
> @@ -2620,10 +2620,8 @@ static unsigned char serial8250_compute_lcr(struct uart_8250_port *up,
> }
> if (!(c_cflag & PARODD))
> cval |= UART_LCR_EPAR;
> -#ifdef CMSPAR
> if (c_cflag & CMSPAR)
> cval |= UART_LCR_SPAR;
> -#endif
>
> return cval;
> }
> diff --git a/drivers/tty/serial/jsm/jsm_cls.c b/drivers/tty/serial/jsm/jsm_cls.c
> index 444f233ebd1f..046b624e5f71 100644
> --- a/drivers/tty/serial/jsm/jsm_cls.c
> +++ b/drivers/tty/serial/jsm/jsm_cls.c
> @@ -723,14 +723,8 @@ static void cls_param(struct jsm_channel *ch)
> if (!(ch->ch_c_cflag & PARODD))
> lcr |= UART_LCR_EPAR;
>
> - /*
> - * Not all platforms support mark/space parity,
> - * so this will hide behind an ifdef.
> - */
> -#ifdef CMSPAR
> if (ch->ch_c_cflag & CMSPAR)
> lcr |= UART_LCR_SPAR;
> -#endif
>
> if (ch->ch_c_cflag & CSTOPB)
> lcr |= UART_LCR_STOP;
> diff --git a/drivers/tty/serial/jsm/jsm_neo.c b/drivers/tty/serial/jsm/jsm_neo.c
> index 110696cdaa1d..0cf586c10688 100644
> --- a/drivers/tty/serial/jsm/jsm_neo.c
> +++ b/drivers/tty/serial/jsm/jsm_neo.c
> @@ -997,14 +997,8 @@ static void neo_param(struct jsm_channel *ch)
> if (!(ch->ch_c_cflag & PARODD))
> lcr |= UART_LCR_EPAR;
>
> - /*
> - * Not all platforms support mark/space parity,
> - * so this will hide behind an ifdef.
> - */
> -#ifdef CMSPAR
> if (ch->ch_c_cflag & CMSPAR)
> lcr |= UART_LCR_SPAR;
> -#endif
>
> if (ch->ch_c_cflag & CSTOPB)
> lcr |= UART_LCR_STOP;
> diff --git a/drivers/tty/serial/sunsu.c b/drivers/tty/serial/sunsu.c
> index c31389114b86..fff50b5b82eb 100644
> --- a/drivers/tty/serial/sunsu.c
> +++ b/drivers/tty/serial/sunsu.c
> @@ -798,10 +798,8 @@ sunsu_change_speed(struct uart_port *port, unsigned int cflag,
> cval |= UART_LCR_PARITY;
> if (!(cflag & PARODD))
> cval |= UART_LCR_EPAR;
> -#ifdef CMSPAR
> if (cflag & CMSPAR)
> cval |= UART_LCR_SPAR;
> -#endif
>
> /*
> * Work around a bug in the Oxford Semiconductor 952 rev B
> diff --git a/drivers/usb/class/cdc-acm.h b/drivers/usb/class/cdc-acm.h
> index 3aa7f0a3ad71..d26ecd15be60 100644
> --- a/drivers/usb/class/cdc-acm.h
> +++ b/drivers/usb/class/cdc-acm.h
> @@ -7,14 +7,6 @@
> *
> */
>
> -/*
> - * CMSPAR, some architectures can't have space and mark parity.
> - */
> -
> -#ifndef CMSPAR
> -#define CMSPAR 0
> -#endif
> -
> /*
> * Major and minor numbers.
> */
> diff --git a/drivers/usb/serial/ark3116.c b/drivers/usb/serial/ark3116.c
> index c0e4df87ff22..39eaa7b97c40 100644
> --- a/drivers/usb/serial/ark3116.c
> +++ b/drivers/usb/serial/ark3116.c
> @@ -208,10 +208,9 @@ static void ark3116_set_termios(struct tty_struct *tty,
> lcr |= UART_LCR_PARITY;
> if (!(cflag & PARODD))
> lcr |= UART_LCR_EPAR;
> -#ifdef CMSPAR
> if (cflag & CMSPAR)
> lcr |= UART_LCR_SPAR;
> -#endif
> +
> /* handshake control */
> hcr = (cflag & CRTSCTS) ? 0x03 : 0x00;
>
> diff --git a/drivers/usb/serial/whiteheat.c b/drivers/usb/serial/whiteheat.c
> index 06aad0d727dd..332fb92ae575 100644
> --- a/drivers/usb/serial/whiteheat.c
> +++ b/drivers/usb/serial/whiteheat.c
> @@ -30,10 +30,6 @@
> #include <linux/usb/ezusb.h>
> #include "whiteheat.h" /* WhiteHEAT specific commands */
>
> -#ifndef CMSPAR
> -#define CMSPAR 0
> -#endif
> -
> /*
> * Version Information
> */
Johan
next prev parent reply other threads:[~2022-05-13 7:02 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-11 10:11 [PATCH 0/5] tty/serial termbits cleanups Ilpo Järvinen
2022-05-11 10:11 ` [PATCH 1/5] tty/termbits: remove #ifdef CMSPAR that is always defined Ilpo Järvinen
2022-05-13 7:01 ` Johan Hovold [this message]
2022-05-11 10:11 ` [PATCH 2/5] tty/termbits: remove #ifdef BOTHER " Ilpo Järvinen
2022-05-13 7:07 ` Johan Hovold
2022-05-11 10:11 ` [PATCH 3/5] tty/termbits: remove #ifdef IBSHIFT " Ilpo Järvinen
2022-05-13 7:10 ` Johan Hovold
2022-05-11 10:11 ` [PATCH 4/5] serial: fsl_lpuart: Remove unnecessary clearing for CRTSCTS Ilpo Järvinen
2022-05-13 7:11 ` Johan Hovold
2022-05-11 10:11 ` [PATCH 5/5] serial: jsm: Use B0 instead of 0 Ilpo Järvinen
2022-05-13 7:14 ` Johan Hovold
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Yn4CZzRIKRUjhsS5@hovoldconsulting.com \
--to=johan@kernel.org \
--cc=arnd@arndb.de \
--cc=davem@davemloft.net \
--cc=gregkh@linuxfoundation.org \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=jirislaby@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=oneukum@suse.com \
--cc=sparclinux@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).