linux-arch.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: "H. Peter Anvin" <hpa@zytor.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linux-Arch <linux-arch@vger.kernel.org>,
	"open list:SERIAL DRIVERS" <linux-serial@vger.kernel.org>,
	Arnd Bergmann <arnd@arndb.de>,
	Greg KH <gregkh@linuxfoundation.org>,
	Jiri Slaby <jslaby@suse.com>
Subject: Re: [PATCH 1/5] asm-generic, termios: add alias constants from MIPS
Date: Fri, 5 Oct 2018 09:30:10 +0200	[thread overview]
Message-ID: <CAMuHMdWQnT=VBh1=zXTASfR+Z_8913BB4YeFXwz6ShpkSTycBA@mail.gmail.com> (raw)
Message-ID: <20181005073010.H6yar-Y4wslC6Ws17HHiIxp5P3t6pHZaSChBn1dep9Y@z> (raw)
In-Reply-To: <20181004222953.2229-2-hpa@zytor.com>

Hi Peter,

Thanks for your patch!

On Fri, Oct 5, 2018 at 12:30 AM H. Peter Anvin (Intel) <hpa@zytor.com> wrote:
> Some architectures, in this case MIPS, need a couple of legacy alias
> constants for bits. There really is no reason why we can't define them
> generically for all architectures.

To avoid polluting namespace?
To avoid people using them in a context not specific to MIPS?

> --- a/include/uapi/asm-generic/termbits.h
> +++ b/include/uapi/asm-generic/termbits.h
> @@ -8,7 +8,10 @@ typedef unsigned char  cc_t;
>  typedef unsigned int   speed_t;
>  typedef unsigned int   tcflag_t;
>
> -#define NCCS 19
> +#ifndef NCCS
> +# define NCCS 19
> +#endif
> +
>  struct termios {
>         tcflag_t c_iflag;               /* input mode flags */
>         tcflag_t c_oflag;               /* output mode flags */
> @@ -49,6 +52,7 @@ struct ktermios {
>  #define VTIME 5
>  #define VMIN 6
>  #define VSWTC 7
> +#define VSWTCH VSWTC

I'd at least add a comment /* legacy MIPS */ here.

>  #define VSTART 8
>  #define VSTOP 9
>  #define VSUSP 10
> @@ -173,6 +177,7 @@ struct ktermios {
>  #define ECHONL 0000100
>  #define NOFLSH 0000200
>  #define TOSTOP 0000400
> +#define ITOSTOP TOSTOP

Likewise.

>  #define ECHOCTL        0001000
>  #define ECHOPRT        0002000
>  #define ECHOKE 0004000

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

  parent reply	other threads:[~2018-10-05 14:27 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-04 22:29 [PATCH 0/5] termios: remove arch redundancy in <asm/termbits.h> H. Peter Anvin (Intel)
2018-10-04 22:29 ` H. Peter Anvin (Intel)
2018-10-04 22:29 ` [PATCH 1/5] asm-generic, termios: add alias constants from MIPS H. Peter Anvin (Intel)
2018-10-04 22:29   ` H. Peter Anvin (Intel)
2018-10-05  7:30   ` Geert Uytterhoeven [this message]
2018-10-05  7:30     ` Geert Uytterhoeven
2018-10-04 22:29 ` [PATCH 2/5] arch/ia64, termios: use <asm-generic/termbits.h> H. Peter Anvin (Intel)
2018-10-04 22:29   ` H. Peter Anvin (Intel)
2018-10-04 22:29 ` [PATCH 3/5] arch/mips, " H. Peter Anvin (Intel)
2018-10-04 22:29   ` H. Peter Anvin (Intel)
2018-10-04 22:29 ` [PATCH 4/5] arch/parisc, termios: use <asm-generic/termios.h> H. Peter Anvin (Intel)
2018-10-04 22:29   ` H. Peter Anvin (Intel)
2018-10-04 22:29 ` [PATCH 5/5] arch/xtensa, termios: use <asm-generic/termbits.h> H. Peter Anvin (Intel)
2018-10-04 22:29   ` H. Peter Anvin (Intel)
2018-10-04 22:35   ` Max Filippov
2018-10-04 22:35     ` Max Filippov
2018-10-04 23:08     ` H. Peter Anvin
2018-10-04 23:08       ` H. Peter Anvin

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='CAMuHMdWQnT=VBh1=zXTASfR+Z_8913BB4YeFXwz6ShpkSTycBA@mail.gmail.com' \
    --to=geert@linux-m68k.org \
    --cc=arnd@arndb.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=hpa@zytor.com \
    --cc=jslaby@suse.com \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --subject='Re: [PATCH 1/5] asm-generic, termios: add alias constants from MIPS' \
    /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

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).