Re: [PATCH v2 3/8] termios: uninline conversion helpers

From: Greg Kroah-Hartman
Date: Tue Aug 30 2022 - 08:26:29 EST


On Sun, Aug 21, 2022 at 02:02:34AM +0100, Al Viro wrote:
> 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 <viro@xxxxxxxxxxxxxxxxxx>
> ---
> arch/alpha/include/asm/termios.h | 77 ++--------------
> arch/alpha/kernel/Makefile | 2 +-
> arch/alpha/kernel/termios.c | 57 ++++++++++++
> arch/ia64/include/asm/termios.h | 41 ++-------
> arch/mips/include/asm/termios.h | 84 ++----------------
> arch/parisc/include/asm/termios.h | 41 ++-------
> arch/sparc/include/asm/termios.h | 136 ++---------------------------
> arch/sparc/kernel/Makefile | 4 +-
> arch/sparc/kernel/termios.c | 115 ++++++++++++++++++++++++
> drivers/tty/tty_ioctl.c | 74 ++++++++++++++++
> include/asm-generic/termios-base.h | 69 ++-------------
> include/asm-generic/termios.h | 42 ++-------
> 12 files changed, 294 insertions(+), 448 deletions(-)
> create mode 100644 arch/alpha/kernel/termios.c
> create mode 100644 arch/sparc/kernel/termios.c

The build blows up on me with this commit added to my tty-testing tree:

In file included from ./arch/x86/include/generated/uapi/asm/termios.h:1,
from ./include/uapi/linux/termios.h:6,
from ./include/linux/tty.h:7,
from ./include/linux/vt_kern.h:12,
from drivers/gpu/drm/vboxvideo/vbox_drv.c:12:
./include/asm-generic/termios.h:70:5: error: conflicting types for ‘user_termio_to_kernel_termios’; have ‘int(struct ktermios *, struct termio *)’
70 | int user_termio_to_kernel_termios(struct ktermios *, struct termio __user *);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./include/asm-generic/termios.h:20:19: note: previous definition of ‘user_termio_to_kernel_termios’ with type ‘int(struct ktermios *, const struct termio *)’
20 | static inline int user_termio_to_kernel_termios(struct ktermios *termios,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Lots of stuff like that.

I'll take the first 2 in my tree, but stop here.

thanks,

greg k-h