All of lore.kernel.org
 help / color / mirror / Atom feed
From: Al Viro <viro@zeniv.linux.org.uk>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-arch@vger.kernel.org,
	Linus Torvalds <torvalds@linux-foundation.org>,
	linux-kernel@vger.kernel.org
Subject: [PATCH v3 6/6] termios: get rid of non-UAPI asm/termios.h
Date: Thu, 1 Sep 2022 18:08:58 +0100	[thread overview]
Message-ID: <YxDnKvYCHn/ogBUv@ZenIV> (raw)
In-Reply-To: <YxDlyBneTC/zBx4S@ZenIV>

From 4290f5a9c37a3c7eeafcab26ef9a56a026c2f782 Mon Sep 17 00:00:00 2001
From: Al Viro <viro@zeniv.linux.org.uk>
Date: Tue, 9 Aug 2022 19:41:40 -0400
Subject: [PATCH v3 6/6] 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 <asm/termios.h> will resolve to if we simply remove non-UAPI header.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
---
 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

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 <linux/uaccess.h>
-#include <uapi/asm/termios.h>
-
-#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 <linux/io.h>
 #include <linux/gpio.h>
 #include <linux/leds.h>
+#include <linux/uaccess.h>
 #include <linux/termios.h>
 #include <linux/amba/bus.h>
 #include <linux/amba/serial.h>
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 <linux/of_irq.h>
 #include <linux/of_address.h>
 #include <linux/of_platform.h>
+#include <linux/uaccess.h>
 #include <linux/termios.h>
 #include <linux/mfd/syscon.h>
 #include <linux/regmap.h>
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 <davidm@hpl.hp.com>, Hewlett-Packard Co
- *
- * 99/01/28	Added N_IRDA and N_SMSBLOCK
- */
-#ifndef _ASM_IA64_TERMIOS_H
-#define _ASM_IA64_TERMIOS_H
-
-#include <uapi/asm/termios.h>
-
-#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 <linux/uaccess.h>
-#include <uapi/asm/termios.h>
-
-#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 <uapi/asm/termios.h>
-
-#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 <uapi/asm/termios.h>
-
-#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 <uapi/asm/termios.h>
-
-#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 <uapi/asm/termios.h>
-#include <linux/uaccess.h>
-
-#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 <linux/skbuff.h>
 #include <linux/slab.h>
 #include <linux/types.h>
+#include <linux/uaccess.h>
 #include <linux/termios.h>
 #include <linux/wwan.h>
 #include <net/rtnetlink.h>
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 <linux/uaccess.h>
-#include <uapi/asm-generic/termios.h>
-
-#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 <linux/types.h>
 #include <linux/device.h>
+#include <linux/uaccess.h>
 #include <linux/termios.h>
 #include <linux/delay.h>
 
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 <linux/kref.h>
 #include <linux/list.h>
 #include <linux/cdev.h>
+#include <linux/uaccess.h>
 #include <linux/termios.h>
 #include <linux/seq_file.h>
 
-- 
2.30.2


  parent reply	other threads:[~2022-09-01 17:09 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-20  3:33 [RFC][PATCHES] termios.h cleanups Al Viro
2022-08-20  3:37 ` [PATCH 1/7] loongarch: remove generic-y += termios.h Al Viro
2022-08-20  3:37   ` [PATCH 2/7] termios: get rid of stray asm/termios.h include in n_hdlc.c Al Viro
2022-08-20  3:37   ` [PATCH 3/7] start unifying INIT_C_CC and termios convertors Al Viro
2022-08-20  3:37   ` [PATCH 4/7] termios: consolidate values for VDISCARD in INIT_C_CC Al Viro
2022-08-20 18:01     ` Linus Torvalds
2022-08-20 18:27       ` Al Viro
2022-08-20  3:37   ` [PATCH 5/7] make generic INIT_C_CC a bit more generic Al Viro
2022-08-20  3:37   ` [PATCH 6/7] termios: convert the last (sparc) INIT_C_CC to array Al Viro
2022-08-20  3:37   ` [PATCH 7/7] termios: get rid of non-UAPI asm/termios.h Al Viro
2022-08-20 18:14 ` [RFC][PATCHES] termios.h cleanups Linus Torvalds
2022-08-20 18:43   ` Al Viro
2022-08-20 21:44     ` Linus Torvalds
2022-08-21  0:30       ` Al Viro
2022-08-21  1:02         ` [PATCH v2 1/8] loongarch: remove generic-y += termios.h Al Viro
2022-08-21  1:02           ` [PATCH v2 2/8] termios: get rid of stray asm/termios.h include in n_hdlc.c Al Viro
2022-08-21  1:02           ` [PATCH v2 3/8] termios: uninline conversion helpers Al Viro
2022-08-30 12:26             ` Greg Kroah-Hartman
2022-09-01 17:03               ` Al Viro
2022-09-01 17:06                 ` [PATCH v3 1/6] " Al Viro
2022-09-01 17:06                 ` [PATCH v3 2/6] termios: start unifying non-UAPI parts of asm/termios.h Al Viro
2022-09-01 17:07                 ` [PATCH v3 3/6] termios: consolidate values for VDISCARD in INIT_C_CC Al Viro
2022-09-01 17:07                 ` [PATCH v3 4/6] make generic INIT_C_CC a bit more generic Al Viro
2022-09-01 17:08                 ` [PATCH v3 5/6] termios: convert the last (sparc) INIT_C_CC to array Al Viro
2022-09-01 17:08                 ` Al Viro [this message]
2022-09-02  5:32                   ` [PATCH v3 7/6] termios: kill uapi termios.h that are identical to generic one Al Viro
2022-09-09  8:45                 ` [PATCH v2 3/8] termios: uninline conversion helpers Greg Kroah-Hartman
2022-08-21  1:02           ` [PATCH v2 4/8] termios: start unifying non-UAPI parts of asm/termios.h Al Viro
2022-08-21  5:13             ` Al Viro
2022-08-21  1:02           ` [PATCH v2 5/8] termios: consolidate values for VDISCARD in INIT_C_CC Al Viro
2022-08-21  1:02           ` [PATCH v2 6/8] make generic INIT_C_CC a bit more generic Al Viro
2022-08-21  1:02           ` [PATCH v2 7/8] termios: convert the last (sparc) INIT_C_CC to array Al Viro
2022-08-21  1:02           ` [PATCH v2 8/8] termios: get rid of non-UAPI asm/termios.h Al Viro
2022-08-21 14:56           ` [PATCH v2 1/8] loongarch: remove generic-y += termios.h Huacai Chen
2022-08-21 14:58             ` Huacai Chen

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=YxDnKvYCHn/ogBUv@ZenIV \
    --to=viro@zeniv.linux.org.uk \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@linux-foundation.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.