* [ammarfaizi2-block:viro/vfs/work.termios2 4/8] arch/alpha/kernel/termios.c:5:5: warning: no previous prototype for 'user_termio_to_kernel_termios'
@ 2022-08-21 4:07 kernel test robot
2022-08-21 5:11 ` Al Viro
0 siblings, 1 reply; 2+ messages in thread
From: kernel test robot @ 2022-08-21 4:07 UTC (permalink / raw)
To: Al Viro; +Cc: kbuild-all, Ammar Faizi, GNU/Weeb Mailing List, linux-kernel
tree: https://github.com/ammarfaizi2/linux-block viro/vfs/work.termios2
head: efc5ae91c846283431afc7bfc57e947bf1fd4158
commit: 7f3d795b7f3bd329e9b0eea427bcbbf205ee60d5 [4/8] termios: start unifying non-UAPI parts of asm/termios.h
config: alpha-allyesconfig (https://download.01.org/0day-ci/archive/20220821/[email protected]/config)
compiler: alpha-linux-gcc (GCC) 12.1.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/ammarfaizi2/linux-block/commit/7f3d795b7f3bd329e9b0eea427bcbbf205ee60d5
git remote add ammarfaizi2-block https://github.com/ammarfaizi2/linux-block
git fetch --no-tags ammarfaizi2-block viro/vfs/work.termios2
git checkout 7f3d795b7f3bd329e9b0eea427bcbbf205ee60d5
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=alpha SHELL=/bin/bash arch/alpha/kernel/
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <[email protected]>
All warnings (new ones prefixed by >>):
>> arch/alpha/kernel/termios.c:5:5: warning: no previous prototype for 'user_termio_to_kernel_termios' [-Wmissing-prototypes]
5 | int user_termio_to_kernel_termios(struct ktermios *termios,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> arch/alpha/kernel/termios.c:33:5: warning: no previous prototype for 'kernel_termios_to_user_termio' [-Wmissing-prototypes]
33 | int kernel_termios_to_user_termio(struct termio __user *termio,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vim +/user_termio_to_kernel_termios +5 arch/alpha/kernel/termios.c
8eb5cc958018d9 Al Viro 2022-08-20 4
8eb5cc958018d9 Al Viro 2022-08-20 @5 int user_termio_to_kernel_termios(struct ktermios *termios,
8eb5cc958018d9 Al Viro 2022-08-20 6 struct termio __user *termio)
8eb5cc958018d9 Al Viro 2022-08-20 7 {
8eb5cc958018d9 Al Viro 2022-08-20 8 struct termio v;
8eb5cc958018d9 Al Viro 2022-08-20 9 bool canon;
8eb5cc958018d9 Al Viro 2022-08-20 10
8eb5cc958018d9 Al Viro 2022-08-20 11 if (copy_from_user(&v, termio, sizeof(struct termio)))
8eb5cc958018d9 Al Viro 2022-08-20 12 return -EFAULT;
8eb5cc958018d9 Al Viro 2022-08-20 13
8eb5cc958018d9 Al Viro 2022-08-20 14 termios->c_iflag = (0xffff0000 & termios->c_iflag) | v.c_iflag;
8eb5cc958018d9 Al Viro 2022-08-20 15 termios->c_oflag = (0xffff0000 & termios->c_oflag) | v.c_oflag;
8eb5cc958018d9 Al Viro 2022-08-20 16 termios->c_cflag = (0xffff0000 & termios->c_cflag) | v.c_cflag;
8eb5cc958018d9 Al Viro 2022-08-20 17 termios->c_lflag = (0xffff0000 & termios->c_lflag) | v.c_lflag;
8eb5cc958018d9 Al Viro 2022-08-20 18 termios->c_line = (0xffff0000 & termios->c_lflag) | v.c_line;
8eb5cc958018d9 Al Viro 2022-08-20 19
8eb5cc958018d9 Al Viro 2022-08-20 20 canon = v.c_lflag & ICANON;
8eb5cc958018d9 Al Viro 2022-08-20 21 termios->c_cc[VINTR] = v.c_cc[_VINTR];
8eb5cc958018d9 Al Viro 2022-08-20 22 termios->c_cc[VQUIT] = v.c_cc[_VQUIT];
8eb5cc958018d9 Al Viro 2022-08-20 23 termios->c_cc[VERASE] = v.c_cc[_VERASE];
8eb5cc958018d9 Al Viro 2022-08-20 24 termios->c_cc[VKILL] = v.c_cc[_VKILL];
8eb5cc958018d9 Al Viro 2022-08-20 25 termios->c_cc[VEOL2] = v.c_cc[_VEOL2];
8eb5cc958018d9 Al Viro 2022-08-20 26 termios->c_cc[VSWTC] = v.c_cc[_VSWTC];
8eb5cc958018d9 Al Viro 2022-08-20 27 termios->c_cc[canon ? VEOF : VMIN] = v.c_cc[_VEOF];
8eb5cc958018d9 Al Viro 2022-08-20 28 termios->c_cc[canon ? VEOL : VTIME] = v.c_cc[_VEOL];
8eb5cc958018d9 Al Viro 2022-08-20 29
8eb5cc958018d9 Al Viro 2022-08-20 30 return 0;
8eb5cc958018d9 Al Viro 2022-08-20 31 }
8eb5cc958018d9 Al Viro 2022-08-20 32
8eb5cc958018d9 Al Viro 2022-08-20 @33 int kernel_termios_to_user_termio(struct termio __user *termio,
:::::: The code at line 5 was first introduced by commit
:::::: 8eb5cc958018d99c96d15cf9637fd07531551802 termios: uninline conversion helpers
:::::: TO: Al Viro <[email protected]>
:::::: CC: Al Viro <[email protected]>
--
0-DAY CI Kernel Test Service
https://01.org/lkp
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [ammarfaizi2-block:viro/vfs/work.termios2 4/8] arch/alpha/kernel/termios.c:5:5: warning: no previous prototype for 'user_termio_to_kernel_termios'
2022-08-21 4:07 [ammarfaizi2-block:viro/vfs/work.termios2 4/8] arch/alpha/kernel/termios.c:5:5: warning: no previous prototype for 'user_termio_to_kernel_termios' kernel test robot
@ 2022-08-21 5:11 ` Al Viro
0 siblings, 0 replies; 2+ messages in thread
From: Al Viro @ 2022-08-21 5:11 UTC (permalink / raw)
To: kernel test robot
Cc: kbuild-all, Ammar Faizi, GNU/Weeb Mailing List, linux-kernel
On Sun, Aug 21, 2022 at 12:07:05PM +0800, kernel test robot wrote:
> tree: https://github.com/ammarfaizi2/linux-block viro/vfs/work.termios2
> head: efc5ae91c846283431afc7bfc57e947bf1fd4158
> commit: 7f3d795b7f3bd329e9b0eea427bcbbf205ee60d5 [4/8] termios: start unifying non-UAPI parts of asm/termios.h
> config: alpha-allyesconfig (https://download.01.org/0day-ci/archive/20220821/[email protected]/config)
> compiler: alpha-linux-gcc (GCC) 12.1.0
> reproduce (this is a W=1 build):
> wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
> chmod +x ~/bin/make.cross
> # https://github.com/ammarfaizi2/linux-block/commit/7f3d795b7f3bd329e9b0eea427bcbbf205ee60d5
> git remote add ammarfaizi2-block https://github.com/ammarfaizi2/linux-block
> git fetch --no-tags ammarfaizi2-block viro/vfs/work.termios2
> git checkout 7f3d795b7f3bd329e9b0eea427bcbbf205ee60d5
> # save the config file
> mkdir build_dir && cp config build_dir/.config
> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=alpha SHELL=/bin/bash arch/alpha/kernel/
Fixed and folded; incremental is
diff --git b/arch/alpha/kernel/termios.c a/arch/alpha/kernel/termios.c
index 1534f39cb9fe..a4c29a22edf7 100644
--- b/arch/alpha/kernel/termios.c
+++ a/arch/alpha/kernel/termios.c
@@ -1,6 +1,5 @@
// SPDX-License-Identifier: GPL-2.0
-#include <linux/uaccess.h>
-#include <linux/termios.h>
+#include <linux/termios_internal.h>
int user_termio_to_kernel_termios(struct ktermios *termios,
struct termio __user *termio)
diff --git b/arch/sparc/kernel/termios.c a/arch/sparc/kernel/termios.c
index 97e23d4ae2e2..ee64965c27cd 100644
--- b/arch/sparc/kernel/termios.c
+++ a/arch/sparc/kernel/termios.c
@@ -1,5 +1,5 @@
-#include <linux/uaccess.h>
-#include <linux/termios.h>
+// SPDX-License-Identifier: GPL-2.0
+#include <linux/termios_internal.h>
/*
* c_cc characters in the termio structure. Oh, how I love being
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-08-21 5:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-21 4:07 [ammarfaizi2-block:viro/vfs/work.termios2 4/8] arch/alpha/kernel/termios.c:5:5: warning: no previous prototype for 'user_termio_to_kernel_termios' kernel test robot
2022-08-21 5:11 ` Al Viro
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox