From 1d5d66825610bb7be23e2229731261c8e99eaa28 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Sat, 20 Aug 2022 19:36:09 -0400 Subject: termios: uninline conversion helpers default go into drivers/tty/tty_ioctl.c, unusual - into arch/*/kernel/termios.c (only alpha and sparc have those). Signed-off-by: Al Viro Link: https://lore.kernel.org/r/YxDmeUBHo0s/Ew8b@ZenIV Signed-off-by: Greg Kroah-Hartman --- arch/ia64/include/asm/termios.h | 41 ++++++----------------------------------- 1 file changed, 6 insertions(+), 35 deletions(-) (limited to 'arch/ia64') diff --git a/arch/ia64/include/asm/termios.h b/arch/ia64/include/asm/termios.h index 589c026444cc..e7b2654aeb6f 100644 --- a/arch/ia64/include/asm/termios.h +++ b/arch/ia64/include/asm/termios.h @@ -19,40 +19,11 @@ */ #define INIT_C_CC "\003\034\177\025\004\0\1\0\021\023\032\0\022\017\027\026\0" -/* - * Translate a "termio" structure into a "termios". Ugh. - */ -#define SET_LOW_TERMIOS_BITS(termios, termio, x) { \ - unsigned short __tmp; \ - get_user(__tmp,&(termio)->x); \ - *(unsigned short *) &(termios)->x = __tmp; \ -} - -#define user_termio_to_kernel_termios(termios, termio) \ -({ \ - SET_LOW_TERMIOS_BITS(termios, termio, c_iflag); \ - SET_LOW_TERMIOS_BITS(termios, termio, c_oflag); \ - SET_LOW_TERMIOS_BITS(termios, termio, c_cflag); \ - SET_LOW_TERMIOS_BITS(termios, termio, c_lflag); \ - copy_from_user((termios)->c_cc, (termio)->c_cc, NCC); \ -}) - -/* - * Translate a "termios" structure into a "termio". Ugh. - */ -#define kernel_termios_to_user_termio(termio, termios) \ -({ \ - put_user((termios)->c_iflag, &(termio)->c_iflag); \ - put_user((termios)->c_oflag, &(termio)->c_oflag); \ - put_user((termios)->c_cflag, &(termio)->c_cflag); \ - put_user((termios)->c_lflag, &(termio)->c_lflag); \ - put_user((termios)->c_line, &(termio)->c_line); \ - copy_to_user((termio)->c_cc, (termios)->c_cc, NCC); \ -}) - -#define user_termios_to_kernel_termios(k, u) copy_from_user(k, u, sizeof(struct termios2)) -#define kernel_termios_to_user_termios(u, k) copy_to_user(u, k, sizeof(struct termios2)) -#define user_termios_to_kernel_termios_1(k, u) copy_from_user(k, u, sizeof(struct termios)) -#define kernel_termios_to_user_termios_1(u, k) copy_to_user(u, k, sizeof(struct termios)) +int user_termio_to_kernel_termios(struct ktermios *, struct termio __user *); +int kernel_termios_to_user_termio(struct termio __user *, struct ktermios *); +int user_termios_to_kernel_termios(struct ktermios *, struct termios2 __user *); +int kernel_termios_to_user_termios(struct termios2 __user *, struct ktermios *); +int user_termios_to_kernel_termios_1(struct ktermios *, struct termios __user *); +int kernel_termios_to_user_termios_1(struct termios __user *, struct ktermios *); #endif /* _ASM_IA64_TERMIOS_H */ -- cgit v1.2.3 From c9874d3ffeaf8ee215187692ed918b3031d996d1 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Thu, 16 Aug 2018 11:47:53 -0400 Subject: termios: start unifying non-UAPI parts of asm/termios.h * new header (linut/termios_internal.h), pulled by the users of those suckers * defaults for INIT_C_CC and externs for conversion helpers moved over there * remove termios-base.h (empty now) Signed-off-by: Al Viro Link: https://lore.kernel.org/r/YxDmptU7dNGZ+/Hn@ZenIV Signed-off-by: Greg Kroah-Hartman --- arch/alpha/include/asm/termios.h | 8 +------- arch/alpha/kernel/termios.c | 3 +-- arch/ia64/include/asm/termios.h | 16 ---------------- arch/mips/include/asm/termios.h | 9 --------- arch/parisc/include/asm/termios.h | 16 ---------------- arch/powerpc/include/asm/termios.h | 2 -- arch/s390/include/asm/termios.h | 14 -------------- arch/sparc/include/asm/termios.h | 8 +------- arch/sparc/kernel/termios.c | 4 ++-- drivers/tty/hvc/hvcs.c | 1 + drivers/tty/tty_io.c | 2 +- drivers/tty/tty_ioctl.c | 1 + drivers/tty/vcc.c | 1 + include/asm-generic/termios-base.h | 21 --------------------- include/asm-generic/termios.h | 20 -------------------- include/linux/termios_internal.h | 30 ++++++++++++++++++++++++++++++ 16 files changed, 39 insertions(+), 117 deletions(-) delete mode 100644 include/asm-generic/termios-base.h create mode 100644 include/linux/termios_internal.h (limited to 'arch/ia64') diff --git a/arch/alpha/include/asm/termios.h b/arch/alpha/include/asm/termios.h index bafbb0090024..17b109859e05 100644 --- a/arch/alpha/include/asm/termios.h +++ b/arch/alpha/include/asm/termios.h @@ -2,6 +2,7 @@ #ifndef _ALPHA_TERMIOS_H #define _ALPHA_TERMIOS_H +#include #include /* eof=^D eol=\0 eol2=\0 erase=del @@ -12,11 +13,4 @@ */ #define INIT_C_CC "\004\000\000\177\027\025\022\000\003\034\032\000\021\023\026\025\001\000" -int user_termio_to_kernel_termios(struct ktermios *, struct termio __user *); -int kernel_termios_to_user_termio(struct termio __user *, struct ktermios *); -int user_termios_to_kernel_termios(struct ktermios *, struct termios2 __user *); -int kernel_termios_to_user_termios(struct termios2 __user *, struct ktermios *); -int user_termios_to_kernel_termios_1(struct ktermios *, struct termios __user *); -int kernel_termios_to_user_termios_1(struct termios __user *, struct ktermios *); - #endif /* _ALPHA_TERMIOS_H */ diff --git a/arch/alpha/kernel/termios.c b/arch/alpha/kernel/termios.c index 1534f39cb9fe..a4c29a22edf7 100644 --- a/arch/alpha/kernel/termios.c +++ b/arch/alpha/kernel/termios.c @@ -1,6 +1,5 @@ // SPDX-License-Identifier: GPL-2.0 -#include -#include +#include int user_termio_to_kernel_termios(struct ktermios *termios, struct termio __user *termio) diff --git a/arch/ia64/include/asm/termios.h b/arch/ia64/include/asm/termios.h index e7b2654aeb6f..1cef02701401 100644 --- a/arch/ia64/include/asm/termios.h +++ b/arch/ia64/include/asm/termios.h @@ -10,20 +10,4 @@ #include - -/* intr=^C quit=^\ erase=del kill=^U - eof=^D vtime=\0 vmin=\1 sxtc=\0 - start=^Q stop=^S susp=^Z eol=\0 - reprint=^R discard=^U werase=^W lnext=^V - eol2=\0 -*/ -#define INIT_C_CC "\003\034\177\025\004\0\1\0\021\023\032\0\022\017\027\026\0" - -int user_termio_to_kernel_termios(struct ktermios *, struct termio __user *); -int kernel_termios_to_user_termio(struct termio __user *, struct ktermios *); -int user_termios_to_kernel_termios(struct ktermios *, struct termios2 __user *); -int kernel_termios_to_user_termios(struct termios2 __user *, struct ktermios *); -int user_termios_to_kernel_termios_1(struct ktermios *, struct termios __user *); -int kernel_termios_to_user_termios_1(struct termios __user *, struct ktermios *); - #endif /* _ASM_IA64_TERMIOS_H */ diff --git a/arch/mips/include/asm/termios.h b/arch/mips/include/asm/termios.h index 5e8c9d137dee..dbb62330b7a4 100644 --- a/arch/mips/include/asm/termios.h +++ b/arch/mips/include/asm/termios.h @@ -21,13 +21,4 @@ */ #define INIT_C_CC "\003\034\177\025\1\0\0\0\021\023\032\0\022\017\027\026\004\0" -#include - -int user_termio_to_kernel_termios(struct ktermios *, struct termio __user *); -int kernel_termios_to_user_termio(struct termio __user *, struct ktermios *); -int user_termios_to_kernel_termios(struct ktermios *, struct termios2 __user *); -int kernel_termios_to_user_termios(struct termios2 __user *, struct ktermios *); -int user_termios_to_kernel_termios_1(struct ktermios *, struct termios __user *); -int kernel_termios_to_user_termios_1(struct termios __user *, struct ktermios *); - #endif /* _ASM_TERMIOS_H */ diff --git a/arch/parisc/include/asm/termios.h b/arch/parisc/include/asm/termios.h index fe21bad7d2b1..1850a90befb3 100644 --- a/arch/parisc/include/asm/termios.h +++ b/arch/parisc/include/asm/termios.h @@ -4,20 +4,4 @@ #include - -/* intr=^C quit=^\ erase=del kill=^U - eof=^D vtime=\0 vmin=\1 sxtc=\0 - start=^Q stop=^S susp=^Z eol=\0 - reprint=^R discard=^U werase=^W lnext=^V - eol2=\0 -*/ -#define INIT_C_CC "\003\034\177\025\004\0\1\0\021\023\032\0\022\017\027\026\0" - -int user_termio_to_kernel_termios(struct ktermios *, struct termio __user *); -int kernel_termios_to_user_termio(struct termio __user *, struct ktermios *); -int user_termios_to_kernel_termios(struct ktermios *, struct termios2 __user *); -int kernel_termios_to_user_termios(struct termios2 __user *, struct ktermios *); -int user_termios_to_kernel_termios_1(struct ktermios *, struct termios __user *); -int kernel_termios_to_user_termios_1(struct termios __user *, struct ktermios *); - #endif /* _PARISC_TERMIOS_H */ diff --git a/arch/powerpc/include/asm/termios.h b/arch/powerpc/include/asm/termios.h index 205de8f8a9d3..5c003322fe29 100644 --- a/arch/powerpc/include/asm/termios.h +++ b/arch/powerpc/include/asm/termios.h @@ -13,6 +13,4 @@ /* ^C ^\ del ^U ^D 1 0 0 0 0 ^W ^R ^Z ^Q ^S ^V ^U */ #define INIT_C_CC "\003\034\177\025\004\001\000\000\000\000\027\022\032\021\023\026\025" -#include - #endif /* _ASM_POWERPC_TERMIOS_H */ diff --git a/arch/s390/include/asm/termios.h b/arch/s390/include/asm/termios.h index 46fa3020b41e..0e26fe97b0d4 100644 --- a/arch/s390/include/asm/termios.h +++ b/arch/s390/include/asm/termios.h @@ -9,18 +9,4 @@ #include - -/* intr=^C quit=^\ erase=del kill=^U - eof=^D vtime=\0 vmin=\1 sxtc=\0 - start=^Q stop=^S susp=^Z eol=\0 - reprint=^R discard=^U werase=^W lnext=^V - eol2=\0 -*/ -#define INIT_C_CC "\003\034\177\025\004\0\1\0\021\023\032\0\022\017\027\026\0" - -#define user_termios_to_kernel_termios(k, u) copy_from_user(k, u, sizeof(struct termios2)) -#define kernel_termios_to_user_termios(u, k) copy_to_user(u, k, sizeof(struct termios2)) - -#include - #endif /* _S390_TERMIOS_H */ diff --git a/arch/sparc/include/asm/termios.h b/arch/sparc/include/asm/termios.h index 03bcb6e6abe8..bafd7768f309 100644 --- a/arch/sparc/include/asm/termios.h +++ b/arch/sparc/include/asm/termios.h @@ -3,6 +3,7 @@ #define _SPARC_TERMIOS_H #include +#include /* intr=^C quit=^\ erase=del kill=^U @@ -13,11 +14,4 @@ */ #define INIT_C_CC "\003\034\177\025\004\000\000\000\021\023\032\031\022\025\027\026\001" -int user_termio_to_kernel_termios(struct ktermios *, struct termio __user *); -int kernel_termios_to_user_termio(struct termio __user *, struct ktermios *); -int user_termios_to_kernel_termios(struct ktermios *, struct termios2 __user *); -int kernel_termios_to_user_termios(struct termios2 __user *, struct ktermios *); -int user_termios_to_kernel_termios_1(struct ktermios *, struct termios __user *); -int kernel_termios_to_user_termios_1(struct termios __user *, struct ktermios *); - #endif /* _SPARC_TERMIOS_H */ diff --git a/arch/sparc/kernel/termios.c b/arch/sparc/kernel/termios.c index 97e23d4ae2e2..ee64965c27cd 100644 --- a/arch/sparc/kernel/termios.c +++ b/arch/sparc/kernel/termios.c @@ -1,5 +1,5 @@ -#include -#include +// SPDX-License-Identifier: GPL-2.0 +#include /* * c_cc characters in the termio structure. Oh, how I love being diff --git a/drivers/tty/hvc/hvcs.c b/drivers/tty/hvc/hvcs.c index b79ce8d34f11..4ba24963685e 100644 --- a/drivers/tty/hvc/hvcs.c +++ b/drivers/tty/hvc/hvcs.c @@ -69,6 +69,7 @@ #include #include #include +#include #include /* diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c index 82a8855981f7..571c94c81477 100644 --- a/drivers/tty/tty_io.c +++ b/drivers/tty/tty_io.c @@ -99,8 +99,8 @@ #include #include #include - #include +#include #include #include diff --git a/drivers/tty/tty_ioctl.c b/drivers/tty/tty_ioctl.c index 026429276637..ce511557b98b 100644 --- a/drivers/tty/tty_ioctl.c +++ b/drivers/tty/tty_ioctl.c @@ -21,6 +21,7 @@ #include #include #include +#include #include "tty.h" #include diff --git a/drivers/tty/vcc.c b/drivers/tty/vcc.c index e11383ae1e7e..34ba6e54789a 100644 --- a/drivers/tty/vcc.c +++ b/drivers/tty/vcc.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include diff --git a/include/asm-generic/termios-base.h b/include/asm-generic/termios-base.h deleted file mode 100644 index d6536b2214ae..000000000000 --- a/include/asm-generic/termios-base.h +++ /dev/null @@ -1,21 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 */ -/* termios.h: generic termios/termio user copying/translation - */ - -#ifndef _ASM_GENERIC_TERMIOS_BASE_H -#define _ASM_GENERIC_TERMIOS_BASE_H - -#include - -#ifndef __ARCH_TERMIO_GETPUT - -int user_termio_to_kernel_termios(struct ktermios *, struct termio __user *); -int kernel_termios_to_user_termio(struct termio __user *, struct ktermios *); -int user_termios_to_kernel_termios(struct ktermios *, struct termios2 __user *); -int kernel_termios_to_user_termios(struct termios2 __user *, struct ktermios *); -int user_termios_to_kernel_termios_1(struct ktermios *, struct termios __user *); -int kernel_termios_to_user_termios_1(struct termios __user *, struct ktermios *); - -#endif /* __ARCH_TERMIO_GETPUT */ - -#endif /* _ASM_GENERIC_TERMIOS_BASE_H */ diff --git a/include/asm-generic/termios.h b/include/asm-generic/termios.h index 61b07d9ce8d0..da3b0fe25442 100644 --- a/include/asm-generic/termios.h +++ b/include/asm-generic/termios.h @@ -6,24 +6,4 @@ #include #include -/* intr=^C quit=^\ erase=del kill=^U - eof=^D vtime=\0 vmin=\1 sxtc=\0 - start=^Q stop=^S susp=^Z eol=\0 - reprint=^R discard=^U werase=^W lnext=^V - eol2=\0 -*/ -#define INIT_C_CC "\003\034\177\025\004\0\1\0\021\023\032\0\022\017\027\026\0" - -int user_termio_to_kernel_termios(struct ktermios *, struct termio __user *); -int kernel_termios_to_user_termio(struct termio __user *, struct ktermios *); -#ifdef TCGETS2 -int user_termios_to_kernel_termios(struct ktermios *, struct termios2 __user *); -int kernel_termios_to_user_termios(struct termios2 __user *, struct ktermios *); -int user_termios_to_kernel_termios_1(struct ktermios *, struct termios __user *); -int kernel_termios_to_user_termios_1(struct termios __user *, struct ktermios *); -#else /* TCGETS2 */ -int user_termios_to_kernel_termios(struct ktermios *, struct termios __user *); -int kernel_termios_to_user_termios(struct termios __user *, struct ktermios *); -#endif /* TCGETS2 */ - #endif /* _ASM_GENERIC_TERMIOS_H */ diff --git a/include/linux/termios_internal.h b/include/linux/termios_internal.h new file mode 100644 index 000000000000..103ca0370948 --- /dev/null +++ b/include/linux/termios_internal.h @@ -0,0 +1,30 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef _LINUX_TERMIOS_CONV_H +#define _LINUX_TERMIOS_CONV_H + +#include +#include + +#ifndef INIT_C_CC +/* intr=^C quit=^\ erase=del kill=^U + eof=^D vtime=\0 vmin=\1 sxtc=\0 + start=^Q stop=^S susp=^Z eol=\0 + reprint=^R discard=^U werase=^W lnext=^V + eol2=\0 +*/ +#define INIT_C_CC "\003\034\177\025\004\0\1\0\021\023\032\0\022\017\027\026\0" +#endif + +int user_termio_to_kernel_termios(struct ktermios *, struct termio __user *); +int kernel_termios_to_user_termio(struct termio __user *, struct ktermios *); +#ifdef TCGETS2 +int user_termios_to_kernel_termios(struct ktermios *, struct termios2 __user *); +int kernel_termios_to_user_termios(struct termios2 __user *, struct ktermios *); +int user_termios_to_kernel_termios_1(struct ktermios *, struct termios __user *); +int kernel_termios_to_user_termios_1(struct termios __user *, struct ktermios *); +#else /* TCGETS2 */ +int user_termios_to_kernel_termios(struct ktermios *, struct termios __user *); +int kernel_termios_to_user_termios(struct termios __user *, struct ktermios *); +#endif /* TCGETS2 */ + +#endif /* _LINUX_TERMIOS_CONV_H */ -- cgit v1.2.3 From 89bbeb7e3199e1514729aa6de8057289e6375fe6 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Tue, 9 Aug 2022 19:41:40 -0400 Subject: termios: get rid of non-UAPI asm/termios.h All non-UAPI asm/termios.h consist of include of UAPI counterpart and, possibly, include of linux/uaccess.h The latter can't be simply removed, even though nothing in linux/termios.h doesn't depend upon it anymore - there are several places that rely upon that indirect chain of includes to pull linux/uaccess.h. So the include needs to be lifted out of there - we lift into tty_driver.h, serdev.h and places that pull asm/termios.h, but none of * linux/uaccess.h (obvious) * net/sock.h (pulls uaccess.h) * linux/{tty,tty_driver,serdev}.h (tty.h pulls tty_driver.h) That leaves us just with the include of UAPI asm/termios.h, which is what will resolve to if we simply remove non-UAPI header. Signed-off-by: Al Viro Link: https://lore.kernel.org/r/YxDnKvYCHn/ogBUv@ZenIV Signed-off-by: Greg Kroah-Hartman --- arch/alpha/include/asm/termios.h | 8 -------- arch/arm/mach-ep93xx/core.c | 1 + arch/arm/mach-versatile/integrator_ap.c | 1 + arch/ia64/include/asm/termios.h | 13 ------------- arch/mips/include/asm/termios.h | 15 --------------- arch/parisc/include/asm/termios.h | 7 ------- arch/powerpc/include/asm/termios.h | 13 ------------- arch/s390/include/asm/termios.h | 12 ------------ arch/sparc/include/asm/termios.h | 8 -------- drivers/net/wwan/wwan_core.c | 1 + include/asm-generic/termios.h | 9 --------- include/linux/serdev.h | 1 + include/linux/tty_driver.h | 1 + 13 files changed, 5 insertions(+), 85 deletions(-) delete mode 100644 arch/alpha/include/asm/termios.h delete mode 100644 arch/ia64/include/asm/termios.h delete mode 100644 arch/mips/include/asm/termios.h delete mode 100644 arch/parisc/include/asm/termios.h delete mode 100644 arch/powerpc/include/asm/termios.h delete mode 100644 arch/s390/include/asm/termios.h delete mode 100644 arch/sparc/include/asm/termios.h delete mode 100644 include/asm-generic/termios.h (limited to 'arch/ia64') diff --git a/arch/alpha/include/asm/termios.h b/arch/alpha/include/asm/termios.h deleted file mode 100644 index 3894fd92c508..000000000000 --- a/arch/alpha/include/asm/termios.h +++ /dev/null @@ -1,8 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 */ -#ifndef _ALPHA_TERMIOS_H -#define _ALPHA_TERMIOS_H - -#include -#include - -#endif /* _ALPHA_TERMIOS_H */ diff --git a/arch/arm/mach-ep93xx/core.c b/arch/arm/mach-ep93xx/core.c index 2d58e273c96d..95e731676cea 100644 --- a/arch/arm/mach-ep93xx/core.c +++ b/arch/arm/mach-ep93xx/core.c @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include diff --git a/arch/arm/mach-versatile/integrator_ap.c b/arch/arm/mach-versatile/integrator_ap.c index e216fac917d0..4bd6712e9f52 100644 --- a/arch/arm/mach-versatile/integrator_ap.c +++ b/arch/arm/mach-versatile/integrator_ap.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include diff --git a/arch/ia64/include/asm/termios.h b/arch/ia64/include/asm/termios.h deleted file mode 100644 index 1cef02701401..000000000000 --- a/arch/ia64/include/asm/termios.h +++ /dev/null @@ -1,13 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 */ -/* - * Modified 1999 - * David Mosberger-Tang , Hewlett-Packard Co - * - * 99/01/28 Added N_IRDA and N_SMSBLOCK - */ -#ifndef _ASM_IA64_TERMIOS_H -#define _ASM_IA64_TERMIOS_H - -#include - -#endif /* _ASM_IA64_TERMIOS_H */ diff --git a/arch/mips/include/asm/termios.h b/arch/mips/include/asm/termios.h deleted file mode 100644 index 12bc56857bf1..000000000000 --- a/arch/mips/include/asm/termios.h +++ /dev/null @@ -1,15 +0,0 @@ -/* - * This file is subject to the terms and conditions of the GNU General Public - * License. See the file "COPYING" in the main directory of this archive - * for more details. - * - * Copyright (C) 1995, 1996, 2000, 2001 by Ralf Baechle - * Copyright (C) 2000, 2001 Silicon Graphics, Inc. - */ -#ifndef _ASM_TERMIOS_H -#define _ASM_TERMIOS_H - -#include -#include - -#endif /* _ASM_TERMIOS_H */ diff --git a/arch/parisc/include/asm/termios.h b/arch/parisc/include/asm/termios.h deleted file mode 100644 index 1850a90befb3..000000000000 --- a/arch/parisc/include/asm/termios.h +++ /dev/null @@ -1,7 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 */ -#ifndef _PARISC_TERMIOS_H -#define _PARISC_TERMIOS_H - -#include - -#endif /* _PARISC_TERMIOS_H */ diff --git a/arch/powerpc/include/asm/termios.h b/arch/powerpc/include/asm/termios.h deleted file mode 100644 index 83794533f607..000000000000 --- a/arch/powerpc/include/asm/termios.h +++ /dev/null @@ -1,13 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-or-later */ -/* - * Liberally adapted from alpha/termios.h. In particular, the c_cc[] - * fields have been reordered so that termio & termios share the - * common subset in the same order (for brain dead programs that don't - * know or care about the differences). - */ -#ifndef _ASM_POWERPC_TERMIOS_H -#define _ASM_POWERPC_TERMIOS_H - -#include - -#endif /* _ASM_POWERPC_TERMIOS_H */ diff --git a/arch/s390/include/asm/termios.h b/arch/s390/include/asm/termios.h deleted file mode 100644 index 0e26fe97b0d4..000000000000 --- a/arch/s390/include/asm/termios.h +++ /dev/null @@ -1,12 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 */ -/* - * S390 version - * - * Derived from "include/asm-i386/termios.h" - */ -#ifndef _S390_TERMIOS_H -#define _S390_TERMIOS_H - -#include - -#endif /* _S390_TERMIOS_H */ diff --git a/arch/sparc/include/asm/termios.h b/arch/sparc/include/asm/termios.h deleted file mode 100644 index 1b85721f4e6b..000000000000 --- a/arch/sparc/include/asm/termios.h +++ /dev/null @@ -1,8 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 */ -#ifndef _SPARC_TERMIOS_H -#define _SPARC_TERMIOS_H - -#include -#include - -#endif /* _SPARC_TERMIOS_H */ diff --git a/drivers/net/wwan/wwan_core.c b/drivers/net/wwan/wwan_core.c index b8c7843730ed..62e9f7d6c9fe 100644 --- a/drivers/net/wwan/wwan_core.c +++ b/drivers/net/wwan/wwan_core.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include diff --git a/include/asm-generic/termios.h b/include/asm-generic/termios.h deleted file mode 100644 index da3b0fe25442..000000000000 --- a/include/asm-generic/termios.h +++ /dev/null @@ -1,9 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 */ -#ifndef _ASM_GENERIC_TERMIOS_H -#define _ASM_GENERIC_TERMIOS_H - - -#include -#include - -#endif /* _ASM_GENERIC_TERMIOS_H */ diff --git a/include/linux/serdev.h b/include/linux/serdev.h index 3368c261ab62..66f624fc618c 100644 --- a/include/linux/serdev.h +++ b/include/linux/serdev.h @@ -7,6 +7,7 @@ #include #include +#include #include #include diff --git a/include/linux/tty_driver.h b/include/linux/tty_driver.h index b2456b545ba0..f961164a5274 100644 --- a/include/linux/tty_driver.h +++ b/include/linux/tty_driver.h @@ -7,6 +7,7 @@ #include #include #include +#include #include #include -- cgit v1.2.3 From ccf3a570410af607124534396cfc0e9a0986b5e8 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Fri, 2 Sep 2022 06:32:14 +0100 Subject: termios: kill uapi termios.h that are identical to generic one mandatory-y will have the generic picked for architectures that don't have uapi/asm/termios.h of their own. ia64, parisc and s390 ones are identical to generic, so... Signed-off-by: Al Viro Link: https://lore.kernel.org/r/YxGVXpS2dWoTwoa0@ZenIV Signed-off-by: Greg Kroah-Hartman --- arch/ia64/include/uapi/asm/termios.h | 51 ---------------------------------- arch/parisc/include/uapi/asm/termios.h | 44 ----------------------------- arch/s390/include/uapi/asm/termios.h | 50 --------------------------------- 3 files changed, 145 deletions(-) delete mode 100644 arch/ia64/include/uapi/asm/termios.h delete mode 100644 arch/parisc/include/uapi/asm/termios.h delete mode 100644 arch/s390/include/uapi/asm/termios.h (limited to 'arch/ia64') diff --git a/arch/ia64/include/uapi/asm/termios.h b/arch/ia64/include/uapi/asm/termios.h deleted file mode 100644 index 199742d08f2c..000000000000 --- a/arch/ia64/include/uapi/asm/termios.h +++ /dev/null @@ -1,51 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ -/* - * Modified 1999 - * David Mosberger-Tang , Hewlett-Packard Co - * - * 99/01/28 Added N_IRDA and N_SMSBLOCK - */ -#ifndef _UAPI_ASM_IA64_TERMIOS_H -#define _UAPI_ASM_IA64_TERMIOS_H - - -#include -#include - -struct winsize { - unsigned short ws_row; - unsigned short ws_col; - unsigned short ws_xpixel; - unsigned short ws_ypixel; -}; - -#define NCC 8 -struct termio { - unsigned short c_iflag; /* input mode flags */ - unsigned short c_oflag; /* output mode flags */ - unsigned short c_cflag; /* control mode flags */ - unsigned short c_lflag; /* local mode flags */ - unsigned char c_line; /* line discipline */ - unsigned char c_cc[NCC]; /* control characters */ -}; - -/* modem lines */ -#define TIOCM_LE 0x001 -#define TIOCM_DTR 0x002 -#define TIOCM_RTS 0x004 -#define TIOCM_ST 0x008 -#define TIOCM_SR 0x010 -#define TIOCM_CTS 0x020 -#define TIOCM_CAR 0x040 -#define TIOCM_RNG 0x080 -#define TIOCM_DSR 0x100 -#define TIOCM_CD TIOCM_CAR -#define TIOCM_RI TIOCM_RNG -#define TIOCM_OUT1 0x2000 -#define TIOCM_OUT2 0x4000 -#define TIOCM_LOOP 0x8000 - -/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ - - -#endif /* _UAPI_ASM_IA64_TERMIOS_H */ diff --git a/arch/parisc/include/uapi/asm/termios.h b/arch/parisc/include/uapi/asm/termios.h deleted file mode 100644 index aba174f23ef0..000000000000 --- a/arch/parisc/include/uapi/asm/termios.h +++ /dev/null @@ -1,44 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ -#ifndef _UAPI_PARISC_TERMIOS_H -#define _UAPI_PARISC_TERMIOS_H - -#include -#include - -struct winsize { - unsigned short ws_row; - unsigned short ws_col; - unsigned short ws_xpixel; - unsigned short ws_ypixel; -}; - -#define NCC 8 -struct termio { - unsigned short c_iflag; /* input mode flags */ - unsigned short c_oflag; /* output mode flags */ - unsigned short c_cflag; /* control mode flags */ - unsigned short c_lflag; /* local mode flags */ - unsigned char c_line; /* line discipline */ - unsigned char c_cc[NCC]; /* control characters */ -}; - -/* modem lines */ -#define TIOCM_LE 0x001 -#define TIOCM_DTR 0x002 -#define TIOCM_RTS 0x004 -#define TIOCM_ST 0x008 -#define TIOCM_SR 0x010 -#define TIOCM_CTS 0x020 -#define TIOCM_CAR 0x040 -#define TIOCM_RNG 0x080 -#define TIOCM_DSR 0x100 -#define TIOCM_CD TIOCM_CAR -#define TIOCM_RI TIOCM_RNG -#define TIOCM_OUT1 0x2000 -#define TIOCM_OUT2 0x4000 -#define TIOCM_LOOP 0x8000 - -/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ - - -#endif /* _UAPI_PARISC_TERMIOS_H */ diff --git a/arch/s390/include/uapi/asm/termios.h b/arch/s390/include/uapi/asm/termios.h deleted file mode 100644 index 54223169c806..000000000000 --- a/arch/s390/include/uapi/asm/termios.h +++ /dev/null @@ -1,50 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ -/* - * S390 version - * - * Derived from "include/asm-i386/termios.h" - */ - -#ifndef _UAPI_S390_TERMIOS_H -#define _UAPI_S390_TERMIOS_H - -#include -#include - -struct winsize { - unsigned short ws_row; - unsigned short ws_col; - unsigned short ws_xpixel; - unsigned short ws_ypixel; -}; - -#define NCC 8 -struct termio { - unsigned short c_iflag; /* input mode flags */ - unsigned short c_oflag; /* output mode flags */ - unsigned short c_cflag; /* control mode flags */ - unsigned short c_lflag; /* local mode flags */ - unsigned char c_line; /* line discipline */ - unsigned char c_cc[NCC]; /* control characters */ -}; - -/* modem lines */ -#define TIOCM_LE 0x001 -#define TIOCM_DTR 0x002 -#define TIOCM_RTS 0x004 -#define TIOCM_ST 0x008 -#define TIOCM_SR 0x010 -#define TIOCM_CTS 0x020 -#define TIOCM_CAR 0x040 -#define TIOCM_RNG 0x080 -#define TIOCM_DSR 0x100 -#define TIOCM_CD TIOCM_CAR -#define TIOCM_RI TIOCM_RNG -#define TIOCM_OUT1 0x2000 -#define TIOCM_OUT2 0x4000 -#define TIOCM_LOOP 0x8000 - -/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ - - -#endif /* _UAPI_S390_TERMIOS_H */ -- cgit v1.2.3