lkml.org 
[lkml]   [2021]   [Dec]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subject[jirislaby:devel 8/33] drivers/tty/tty_port.c:228:2: warning: 'xmit_buf' is deprecated
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/jirislaby/linux.git devel
head: d61595c5423534810c1a3c0d4a88dd2fd81d750c
commit: 8825023d7d2eb9e5dc298ad1996a0c753b2c4580 [8/33] tty: add kfifo to tty_port
config: um-i386_defconfig (https://download.01.org/0day-ci/archive/20211215/202112152217.TA9FNAE3-lkp@intel.com/config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://git.kernel.org/pub/scm/linux/kernel/git/jirislaby/linux.git/commit/?id=8825023d7d2eb9e5dc298ad1996a0c753b2c4580
git remote add jirislaby https://git.kernel.org/pub/scm/linux/kernel/git/jirislaby/linux.git
git fetch --no-tags jirislaby devel
git checkout 8825023d7d2eb9e5dc298ad1996a0c753b2c4580
# save the config file to linux build tree
mkdir build_dir
make W=1 O=build_dir ARCH=um SUBARCH=i386 SHELL=/bin/bash drivers/tty/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

drivers/tty/tty_port.c: In function 'tty_port_alloc_xmit_buf':
>> drivers/tty/tty_port.c:228:2: warning: 'xmit_buf' is deprecated [-Wdeprecated-declarations]
228 | if (port->xmit_buf == NULL)
| ^~
In file included from include/linux/tty.h:12,
from drivers/tty/tty_port.c:8:
include/linux/tty_port.h:115:18: note: declared here
115 | unsigned char *xmit_buf __attribute__((deprecated));
| ^~~~~~~~
drivers/tty/tty_port.c:229:3: warning: 'xmit_buf' is deprecated [-Wdeprecated-declarations]
229 | port->xmit_buf = (unsigned char *)get_zeroed_page(GFP_KERNEL);
| ^~~~
In file included from include/linux/tty.h:12,
from drivers/tty/tty_port.c:8:
include/linux/tty_port.h:115:18: note: declared here
115 | unsigned char *xmit_buf __attribute__((deprecated));
| ^~~~~~~~
drivers/tty/tty_port.c:231:2: warning: 'xmit_buf' is deprecated [-Wdeprecated-declarations]
231 | if (port->xmit_buf == NULL)
| ^~
In file included from include/linux/tty.h:12,
from drivers/tty/tty_port.c:8:
include/linux/tty_port.h:115:18: note: declared here
115 | unsigned char *xmit_buf __attribute__((deprecated));
| ^~~~~~~~
drivers/tty/tty_port.c: In function 'tty_port_free_xmit_buf':
drivers/tty/tty_port.c:240:2: warning: 'xmit_buf' is deprecated [-Wdeprecated-declarations]
240 | if (port->xmit_buf != NULL) {
| ^~
In file included from include/linux/tty.h:12,
from drivers/tty/tty_port.c:8:
include/linux/tty_port.h:115:18: note: declared here
115 | unsigned char *xmit_buf __attribute__((deprecated));
| ^~~~~~~~
drivers/tty/tty_port.c:241:3: warning: 'xmit_buf' is deprecated [-Wdeprecated-declarations]
241 | free_page((unsigned long)port->xmit_buf);
| ^~~~~~~~~
In file included from include/linux/tty.h:12,
from drivers/tty/tty_port.c:8:
include/linux/tty_port.h:115:18: note: declared here
115 | unsigned char *xmit_buf __attribute__((deprecated));
| ^~~~~~~~
drivers/tty/tty_port.c:242:3: warning: 'xmit_buf' is deprecated [-Wdeprecated-declarations]
242 | port->xmit_buf = NULL;
| ^~~~
In file included from include/linux/tty.h:12,
from drivers/tty/tty_port.c:8:
include/linux/tty_port.h:115:18: note: declared here
115 | unsigned char *xmit_buf __attribute__((deprecated));
| ^~~~~~~~
drivers/tty/tty_port.c: In function 'tty_port_destructor':
drivers/tty/tty_port.c:270:2: warning: 'xmit_buf' is deprecated [-Wdeprecated-declarations]
270 | if (port->xmit_buf)
| ^~
In file included from include/linux/tty.h:12,
from drivers/tty/tty_port.c:8:
include/linux/tty_port.h:115:18: note: declared here
115 | unsigned char *xmit_buf __attribute__((deprecated));
| ^~~~~~~~
drivers/tty/tty_port.c:271:3: warning: 'xmit_buf' is deprecated [-Wdeprecated-declarations]
271 | free_page((unsigned long)port->xmit_buf);
| ^~~~~~~~~
In file included from include/linux/tty.h:12,
from drivers/tty/tty_port.c:8:
include/linux/tty_port.h:115:18: note: declared here
115 | unsigned char *xmit_buf __attribute__((deprecated));
| ^~~~~~~~


vim +/xmit_buf +228 drivers/tty/tty_port.c

8cde11b2baa1d0 drivers/tty/tty_port.c Johan Hovold 2017-05-18 223
9e48565d217a8a drivers/char/tty_port.c Alan Cox 2008-10-13 224 int tty_port_alloc_xmit_buf(struct tty_port *port)
9e48565d217a8a drivers/char/tty_port.c Alan Cox 2008-10-13 225 {
9e48565d217a8a drivers/char/tty_port.c Alan Cox 2008-10-13 226 /* We may sleep in get_zeroed_page() */
44e4909e453eaa drivers/char/tty_port.c Alan Cox 2009-11-30 227 mutex_lock(&port->buf_mutex);
9e48565d217a8a drivers/char/tty_port.c Alan Cox 2008-10-13 @228 if (port->xmit_buf == NULL)
9e48565d217a8a drivers/char/tty_port.c Alan Cox 2008-10-13 229 port->xmit_buf = (unsigned char *)get_zeroed_page(GFP_KERNEL);
44e4909e453eaa drivers/char/tty_port.c Alan Cox 2009-11-30 230 mutex_unlock(&port->buf_mutex);
9e48565d217a8a drivers/char/tty_port.c Alan Cox 2008-10-13 231 if (port->xmit_buf == NULL)
9e48565d217a8a drivers/char/tty_port.c Alan Cox 2008-10-13 232 return -ENOMEM;
9e48565d217a8a drivers/char/tty_port.c Alan Cox 2008-10-13 233 return 0;
9e48565d217a8a drivers/char/tty_port.c Alan Cox 2008-10-13 234 }
9e48565d217a8a drivers/char/tty_port.c Alan Cox 2008-10-13 235 EXPORT_SYMBOL(tty_port_alloc_xmit_buf);
9e48565d217a8a drivers/char/tty_port.c Alan Cox 2008-10-13 236

:::::: The code at line 228 was first introduced by commit
:::::: 9e48565d217a8a96cc7577308ad41e9e4b806a62 tty: Split tty_port into its own file

:::::: TO: Alan Cox <alan@redhat.com>
:::::: CC: Linus Torvalds <torvalds@linux-foundation.org>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

\
 
 \ /
  Last update: 2021-12-15 15:45    [W:0.024 / U:1.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site