* [jirislaby:devel 87/125] include/linux/tty_flip.h:21:30: error: dereferencing pointer to incomplete type 'struct tty_port'
@ 2021-06-10 14:11 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-06-10 14:11 UTC (permalink / raw
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 15321 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/jirislaby/linux.git devel
head: 6166e1ec07e0a856bfca48f27886bc1868e3fd3f
commit: b7b354583b26f640dae6e9d138ace1d94e218217 [87/125] amiserial: pack and sort includes
config: m68k-allmodconfig (attached as .config)
compiler: m68k-linux-gcc (GCC) 9.3.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://git.kernel.org/pub/scm/linux/kernel/git/jirislaby/linux.git/commit/?id=b7b354583b26f640dae6e9d138ace1d94e218217
git remote add jirislaby https://git.kernel.org/pub/scm/linux/kernel/git/jirislaby/linux.git
git fetch --no-tags jirislaby devel
git checkout b7b354583b26f640dae6e9d138ace1d94e218217
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=m68k
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All error/warnings (new ones prefixed by >>):
In file included from drivers/tty/amiserial.c:59:
>> include/linux/tty_flip.h:5:40: warning: 'struct tty_port' declared inside parameter list will not be visible outside of this definition or declaration
5 | extern int tty_buffer_set_limit(struct tty_port *port, int limit);
| ^~~~~~~~
include/linux/tty_flip.h:6:51: warning: 'struct tty_port' declared inside parameter list will not be visible outside of this definition or declaration
6 | extern unsigned int tty_buffer_space_avail(struct tty_port *port);
| ^~~~~~~~
include/linux/tty_flip.h:7:43: warning: 'struct tty_port' declared inside parameter list will not be visible outside of this definition or declaration
7 | extern int tty_buffer_request_room(struct tty_port *port, size_t size);
| ^~~~~~~~
include/linux/tty_flip.h:8:48: warning: 'struct tty_port' declared inside parameter list will not be visible outside of this definition or declaration
8 | extern int tty_insert_flip_string_flags(struct tty_port *port,
| ^~~~~~~~
include/linux/tty_flip.h:10:53: warning: 'struct tty_port' declared inside parameter list will not be visible outside of this definition or declaration
10 | extern int tty_insert_flip_string_fixed_flag(struct tty_port *port,
| ^~~~~~~~
include/linux/tty_flip.h:12:43: warning: 'struct tty_port' declared inside parameter list will not be visible outside of this definition or declaration
12 | extern int tty_prepare_flip_string(struct tty_port *port,
| ^~~~~~~~
include/linux/tty_flip.h:14:41: warning: 'struct tty_port' declared inside parameter list will not be visible outside of this definition or declaration
14 | extern void tty_flip_buffer_push(struct tty_port *port);
| ^~~~~~~~
include/linux/tty_flip.h:15:31: warning: 'struct tty_port' declared inside parameter list will not be visible outside of this definition or declaration
15 | void tty_schedule_flip(struct tty_port *port);
| ^~~~~~~~
include/linux/tty_flip.h:16:35: warning: 'struct tty_port' declared inside parameter list will not be visible outside of this definition or declaration
16 | int __tty_insert_flip_char(struct tty_port *port, unsigned char ch, char flag);
| ^~~~~~~~
include/linux/tty_flip.h:18:47: warning: 'struct tty_port' declared inside parameter list will not be visible outside of this definition or declaration
18 | static inline int tty_insert_flip_char(struct tty_port *port,
| ^~~~~~~~
include/linux/tty_flip.h: In function 'tty_insert_flip_char':
>> include/linux/tty_flip.h:21:30: error: dereferencing pointer to incomplete type 'struct tty_port'
21 | struct tty_buffer *tb = port->buf.tail;
| ^~
>> include/linux/tty_flip.h:24:14: error: dereferencing pointer to incomplete type 'struct tty_buffer'
24 | change = (tb->flags & TTYB_NORMAL) && (flag != TTY_NORMAL);
| ^~
>> include/linux/tty_flip.h:24:24: error: 'TTYB_NORMAL' undeclared (first use in this function); did you mean 'TASK_NORMAL'?
24 | change = (tb->flags & TTYB_NORMAL) && (flag != TTY_NORMAL);
| ^~~~~~~~~~~
| TASK_NORMAL
include/linux/tty_flip.h:24:24: note: each undeclared identifier is reported only once for each function it appears in
>> include/linux/tty_flip.h:24:49: error: 'TTY_NORMAL' undeclared (first use in this function); did you mean 'TASK_NORMAL'?
24 | change = (tb->flags & TTYB_NORMAL) && (flag != TTY_NORMAL);
| ^~~~~~~~~~
| TASK_NORMAL
>> include/linux/tty_flip.h:27:5: error: implicit declaration of function 'flag_buf_ptr' [-Werror=implicit-function-declaration]
27 | *flag_buf_ptr(tb, tb->used) = flag;
| ^~~~~~~~~~~~
>> include/linux/tty_flip.h:28:4: error: implicit declaration of function 'char_buf_ptr' [-Werror=implicit-function-declaration]
28 | *char_buf_ptr(tb, tb->used++) = ch;
| ^~~~~~~~~~~~
>> include/linux/tty_flip.h:31:32: error: passing argument 1 of '__tty_insert_flip_char' from incompatible pointer type [-Werror=incompatible-pointer-types]
31 | return __tty_insert_flip_char(port, ch, flag);
| ^~~~
| |
| struct tty_port *
include/linux/tty_flip.h:16:45: note: expected 'struct tty_port *' but argument is of type 'struct tty_port *'
16 | int __tty_insert_flip_char(struct tty_port *port, unsigned char ch, char flag);
| ~~~~~~~~~~~~~~~~~^~~~
include/linux/tty_flip.h: At top level:
include/linux/tty_flip.h:34:49: warning: 'struct tty_port' declared inside parameter list will not be visible outside of this definition or declaration
34 | static inline int tty_insert_flip_string(struct tty_port *port,
| ^~~~~~~~
include/linux/tty_flip.h: In function 'tty_insert_flip_string':
include/linux/tty_flip.h:37:56: error: 'TTY_NORMAL' undeclared (first use in this function); did you mean 'TASK_NORMAL'?
37 | return tty_insert_flip_string_fixed_flag(port, chars, TTY_NORMAL, size);
| ^~~~~~~~~~
| TASK_NORMAL
>> include/linux/tty_flip.h:37:43: error: passing argument 1 of 'tty_insert_flip_string_fixed_flag' from incompatible pointer type [-Werror=incompatible-pointer-types]
37 | return tty_insert_flip_string_fixed_flag(port, chars, TTY_NORMAL, size);
| ^~~~
| |
| struct tty_port *
include/linux/tty_flip.h:10:63: note: expected 'struct tty_port *' but argument is of type 'struct tty_port *'
10 | extern int tty_insert_flip_string_fixed_flag(struct tty_port *port,
| ~~~~~~~~~~~~~~~~~^~~~
include/linux/tty_flip.h: At top level:
include/linux/tty_flip.h:40:46: warning: 'struct tty_port' declared inside parameter list will not be visible outside of this definition or declaration
40 | extern void tty_buffer_lock_exclusive(struct tty_port *port);
| ^~~~~~~~
include/linux/tty_flip.h:41:48: warning: 'struct tty_port' declared inside parameter list will not be visible outside of this definition or declaration
41 | extern void tty_buffer_unlock_exclusive(struct tty_port *port);
| ^~~~~~~~
In file included from drivers/tty/amiserial.c:60:
>> include/linux/tty.h:51:30: error: conflicting types for 'char_buf_ptr'
51 | static inline unsigned char *char_buf_ptr(struct tty_buffer *b, int ofs)
| ^~~~~~~~~~~~
In file included from drivers/tty/amiserial.c:59:
include/linux/tty_flip.h:28:4: note: previous implicit declaration of 'char_buf_ptr' was here
28 | *char_buf_ptr(tb, tb->used++) = ch;
| ^~~~~~~~~~~~
In file included from drivers/tty/amiserial.c:60:
>> include/linux/tty.h:56:21: error: conflicting types for 'flag_buf_ptr'
56 | static inline char *flag_buf_ptr(struct tty_buffer *b, int ofs)
| ^~~~~~~~~~~~
In file included from drivers/tty/amiserial.c:59:
include/linux/tty_flip.h:27:5: note: previous implicit declaration of 'flag_buf_ptr' was here
27 | *flag_buf_ptr(tb, tb->used) = flag;
| ^~~~~~~~~~~~
drivers/tty/amiserial.c: In function 'receive_chars':
>> drivers/tty/amiserial.c:258:23: error: passing argument 1 of 'tty_insert_flip_char' from incompatible pointer type [-Werror=incompatible-pointer-types]
258 | tty_insert_flip_char(&info->tport, ch, flag);
| ^~~~~~~~~~~~
| |
| struct tty_port *
In file included from drivers/tty/amiserial.c:59:
include/linux/tty_flip.h:18:57: note: expected 'struct tty_port *' but argument is of type 'struct tty_port *'
18 | static inline int tty_insert_flip_char(struct tty_port *port,
| ~~~~~~~~~~~~~~~~~^~~~
drivers/tty/amiserial.c:260:24: error: passing argument 1 of 'tty_insert_flip_char' from incompatible pointer type [-Werror=incompatible-pointer-types]
260 | tty_insert_flip_char(&info->tport, 0, TTY_OVERRUN);
| ^~~~~~~~~~~~
| |
| struct tty_port *
In file included from drivers/tty/amiserial.c:59:
include/linux/tty_flip.h:18:57: note: expected 'struct tty_port *' but argument is of type 'struct tty_port *'
18 | static inline int tty_insert_flip_char(struct tty_port *port,
| ~~~~~~~~~~~~~~~~~^~~~
>> drivers/tty/amiserial.c:261:23: error: passing argument 1 of 'tty_flip_buffer_push' from incompatible pointer type [-Werror=incompatible-pointer-types]
261 | tty_flip_buffer_push(&info->tport);
| ^~~~~~~~~~~~
| |
| struct tty_port *
In file included from drivers/tty/amiserial.c:59:
include/linux/tty_flip.h:14:51: note: expected 'struct tty_port *' but argument is of type 'struct tty_port *'
14 | extern void tty_flip_buffer_push(struct tty_port *port);
| ~~~~~~~~~~~~~~~~~^~~~
drivers/tty/amiserial.c: In function 'shutdown':
drivers/tty/amiserial.c:522:23: warning: variable 'state' set but not used [-Wunused-but-set-variable]
522 | struct serial_state *state;
| ^~~~~
cc1: some warnings being treated as errors
vim +21 include/linux/tty_flip.h
^1da177e4c3f41 Linus Torvalds 2005-04-16 4
4d18e6eff81e1d Peter Hurley 2013-11-22 @5 extern int tty_buffer_set_limit(struct tty_port *port, int limit);
9a33fbf9d23034 Jiri Slaby 2021-05-05 6 extern unsigned int tty_buffer_space_avail(struct tty_port *port);
227434f8986c38 Jiri Slaby 2013-01-03 7 extern int tty_buffer_request_room(struct tty_port *port, size_t size);
2f69335710884a Jiri Slaby 2013-01-03 8 extern int tty_insert_flip_string_flags(struct tty_port *port,
2f69335710884a Jiri Slaby 2013-01-03 9 const unsigned char *chars, const char *flags, size_t size);
2f69335710884a Jiri Slaby 2013-01-03 10 extern int tty_insert_flip_string_fixed_flag(struct tty_port *port,
2f69335710884a Jiri Slaby 2013-01-03 11 const unsigned char *chars, char flag, size_t size);
2f69335710884a Jiri Slaby 2013-01-03 12 extern int tty_prepare_flip_string(struct tty_port *port,
2f69335710884a Jiri Slaby 2013-01-03 13 unsigned char **chars, size_t size);
2e124b4a390ca8 Jiri Slaby 2013-01-03 14 extern void tty_flip_buffer_push(struct tty_port *port);
6732c8bb8671ac Jiri Slaby 2013-01-03 15 void tty_schedule_flip(struct tty_port *port);
979990c6284814 Arnd Bergmann 2017-06-20 16 int __tty_insert_flip_char(struct tty_port *port, unsigned char ch, char flag);
33f0f88f1c51ae Alan Cox 2006-01-09 17
92a19f9cec9a80 Jiri Slaby 2013-01-03 18 static inline int tty_insert_flip_char(struct tty_port *port,
^1da177e4c3f41 Linus Torvalds 2005-04-16 19 unsigned char ch, char flag)
^1da177e4c3f41 Linus Torvalds 2005-04-16 20 {
92a19f9cec9a80 Jiri Slaby 2013-01-03 @21 struct tty_buffer *tb = port->buf.tail;
acc0f67f307f52 Peter Hurley 2013-12-09 22 int change;
acc0f67f307f52 Peter Hurley 2013-12-09 23
acc0f67f307f52 Peter Hurley 2013-12-09 @24 change = (tb->flags & TTYB_NORMAL) && (flag != TTY_NORMAL);
acc0f67f307f52 Peter Hurley 2013-12-09 25 if (!change && tb->used < tb->size) {
acc0f67f307f52 Peter Hurley 2013-12-09 26 if (~tb->flags & TTYB_NORMAL)
1fc359fc3ea723 Peter Hurley 2013-06-15 @27 *flag_buf_ptr(tb, tb->used) = flag;
1fc359fc3ea723 Peter Hurley 2013-06-15 @28 *char_buf_ptr(tb, tb->used++) = ch;
33f0f88f1c51ae Alan Cox 2006-01-09 29 return 1;
^1da177e4c3f41 Linus Torvalds 2005-04-16 30 }
979990c6284814 Arnd Bergmann 2017-06-20 @31 return __tty_insert_flip_char(port, ch, flag);
^1da177e4c3f41 Linus Torvalds 2005-04-16 32 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 33
05c7cd39907184 Jiri Slaby 2013-01-03 34 static inline int tty_insert_flip_string(struct tty_port *port,
05c7cd39907184 Jiri Slaby 2013-01-03 35 const unsigned char *chars, size_t size)
2832fc11f13606 Alan Cox 2010-02-18 36 {
05c7cd39907184 Jiri Slaby 2013-01-03 @37 return tty_insert_flip_string_fixed_flag(port, chars, TTY_NORMAL, size);
2832fc11f13606 Alan Cox 2010-02-18 38 }
2832fc11f13606 Alan Cox 2010-02-18 39
:::::: The code at line 21 was first introduced by commit
:::::: 92a19f9cec9a80ad93c06e115822deb729e2c6ad TTY: switch tty_insert_flip_char
:::::: TO: Jiri Slaby <jslaby@suse.cz>
:::::: CC: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 60867 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-06-10 14:11 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-06-10 14:11 [jirislaby:devel 87/125] include/linux/tty_flip.h:21:30: error: dereferencing pointer to incomplete type 'struct tty_port' kernel test robot
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.