All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Mathias Nyman <mathias.nyman@linux.intel.com>
Cc: kbuild-all@lists.01.org, linux-usb@vger.kernel.org,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: [usb:usb-testing 193/195] drivers/usb/host/xhci-dbgtty.c:396:5: warning: no previous prototype for 'xhci_dbc_tty_register_device'
Date: Fri, 24 Jul 2020 10:36:00 +0800	[thread overview]
Message-ID: <202007241056.Hldz09he%lkp@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 6214 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing
head:   9a360a7cae11461ccd933a9ea366b0dcb3afadb0
commit: 6ae6470bfa330d0b8892e02888bf5dac2272c28d [193/195] xhci: dbc: Add a operations structure to access driver functions
config: i386-allyesconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-14) 9.3.0
reproduce (this is a W=1 build):
        git checkout 6ae6470bfa330d0b8892e02888bf5dac2272c28d
        # save the attached .config to linux build tree
        make W=1 ARCH=i386 

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/usb/host/xhci-dbgtty.c:396:5: warning: no previous prototype for 'xhci_dbc_tty_register_device' [-Wmissing-prototypes]
     396 | int xhci_dbc_tty_register_device(struct xhci_dbc *dbc)
         |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/usb/host/xhci-dbgtty.c:444:6: warning: no previous prototype for 'xhci_dbc_tty_unregister_device' [-Wmissing-prototypes]
     444 | void xhci_dbc_tty_unregister_device(struct xhci_dbc *dbc)
         |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/usb/host/xhci-dbgtty.c: In function 'xhci_dbc_tty_probe':
   drivers/usb/host/xhci-dbgtty.c:478:1: warning: label 'out' defined but not used [-Wunused-label]
     478 | out:
         | ^~~

vim +/xhci_dbc_tty_register_device +396 drivers/usb/host/xhci-dbgtty.c

dfba2174dc421ec Lu Baolu      2017-12-08  395  
b396fa39de9b47c Mathias Nyman 2020-07-23 @396  int xhci_dbc_tty_register_device(struct xhci_dbc *dbc)
dfba2174dc421ec Lu Baolu      2017-12-08  397  {
dfba2174dc421ec Lu Baolu      2017-12-08  398  	int			ret;
dfba2174dc421ec Lu Baolu      2017-12-08  399  	struct device		*tty_dev;
dfba2174dc421ec Lu Baolu      2017-12-08  400  	struct dbc_port		*port = &dbc->port;
dfba2174dc421ec Lu Baolu      2017-12-08  401  
91aaf97471a047b Mathias Nyman 2020-07-23  402  	xhci_dbc_tty_init_port(dbc, port);
dfba2174dc421ec Lu Baolu      2017-12-08  403  	tty_dev = tty_port_register_device(&port->port,
dfba2174dc421ec Lu Baolu      2017-12-08  404  					   dbc_tty_driver, 0, NULL);
29f653393e740b1 Dan Carpenter 2018-03-16  405  	if (IS_ERR(tty_dev)) {
29f653393e740b1 Dan Carpenter 2018-03-16  406  		ret = PTR_ERR(tty_dev);
dfba2174dc421ec Lu Baolu      2017-12-08  407  		goto register_fail;
29f653393e740b1 Dan Carpenter 2018-03-16  408  	}
dfba2174dc421ec Lu Baolu      2017-12-08  409  
dfba2174dc421ec Lu Baolu      2017-12-08  410  	ret = kfifo_alloc(&port->write_fifo, DBC_WRITE_BUF_SIZE, GFP_KERNEL);
dfba2174dc421ec Lu Baolu      2017-12-08  411  	if (ret)
dfba2174dc421ec Lu Baolu      2017-12-08  412  		goto buf_alloc_fail;
dfba2174dc421ec Lu Baolu      2017-12-08  413  
e0aa56dc7b18c80 Mathias Nyman 2020-07-23  414  	ret = xhci_dbc_alloc_requests(dbc, BULK_IN, &port->read_pool,
dfba2174dc421ec Lu Baolu      2017-12-08  415  				      dbc_read_complete);
dfba2174dc421ec Lu Baolu      2017-12-08  416  	if (ret)
dfba2174dc421ec Lu Baolu      2017-12-08  417  		goto request_fail;
dfba2174dc421ec Lu Baolu      2017-12-08  418  
e0aa56dc7b18c80 Mathias Nyman 2020-07-23  419  	ret = xhci_dbc_alloc_requests(dbc, BULK_OUT, &port->write_pool,
dfba2174dc421ec Lu Baolu      2017-12-08  420  				      dbc_write_complete);
dfba2174dc421ec Lu Baolu      2017-12-08  421  	if (ret)
dfba2174dc421ec Lu Baolu      2017-12-08  422  		goto request_fail;
dfba2174dc421ec Lu Baolu      2017-12-08  423  
dfba2174dc421ec Lu Baolu      2017-12-08  424  	port->registered = true;
dfba2174dc421ec Lu Baolu      2017-12-08  425  
dfba2174dc421ec Lu Baolu      2017-12-08  426  	return 0;
dfba2174dc421ec Lu Baolu      2017-12-08  427  
dfba2174dc421ec Lu Baolu      2017-12-08  428  request_fail:
e0aa56dc7b18c80 Mathias Nyman 2020-07-23  429  	xhci_dbc_free_requests(&port->read_pool);
e0aa56dc7b18c80 Mathias Nyman 2020-07-23  430  	xhci_dbc_free_requests(&port->write_pool);
dfba2174dc421ec Lu Baolu      2017-12-08  431  	kfifo_free(&port->write_fifo);
dfba2174dc421ec Lu Baolu      2017-12-08  432  
dfba2174dc421ec Lu Baolu      2017-12-08  433  buf_alloc_fail:
dfba2174dc421ec Lu Baolu      2017-12-08  434  	tty_unregister_device(dbc_tty_driver, 0);
dfba2174dc421ec Lu Baolu      2017-12-08  435  
dfba2174dc421ec Lu Baolu      2017-12-08  436  register_fail:
dfba2174dc421ec Lu Baolu      2017-12-08  437  	xhci_dbc_tty_exit_port(port);
dfba2174dc421ec Lu Baolu      2017-12-08  438  
b396fa39de9b47c Mathias Nyman 2020-07-23  439  	dev_err(dbc->dev, "can't register tty port, err %d\n", ret);
dfba2174dc421ec Lu Baolu      2017-12-08  440  
dfba2174dc421ec Lu Baolu      2017-12-08  441  	return ret;
dfba2174dc421ec Lu Baolu      2017-12-08  442  }
dfba2174dc421ec Lu Baolu      2017-12-08  443  
b396fa39de9b47c Mathias Nyman 2020-07-23 @444  void xhci_dbc_tty_unregister_device(struct xhci_dbc *dbc)
dfba2174dc421ec Lu Baolu      2017-12-08  445  {
dfba2174dc421ec Lu Baolu      2017-12-08  446  	struct dbc_port		*port = &dbc->port;
dfba2174dc421ec Lu Baolu      2017-12-08  447  
dfba2174dc421ec Lu Baolu      2017-12-08  448  	tty_unregister_device(dbc_tty_driver, 0);
dfba2174dc421ec Lu Baolu      2017-12-08  449  	xhci_dbc_tty_exit_port(port);
dfba2174dc421ec Lu Baolu      2017-12-08  450  	port->registered = false;
dfba2174dc421ec Lu Baolu      2017-12-08  451  
dfba2174dc421ec Lu Baolu      2017-12-08  452  	kfifo_free(&port->write_fifo);
e0aa56dc7b18c80 Mathias Nyman 2020-07-23  453  	xhci_dbc_free_requests(&port->read_pool);
e0aa56dc7b18c80 Mathias Nyman 2020-07-23  454  	xhci_dbc_free_requests(&port->read_queue);
e0aa56dc7b18c80 Mathias Nyman 2020-07-23  455  	xhci_dbc_free_requests(&port->write_pool);
dfba2174dc421ec Lu Baolu      2017-12-08  456  }
4521f16139409cd Mathias Nyman 2020-07-23  457  

:::::: The code at line 396 was first introduced by commit
:::::: b396fa39de9b47ce3368f65d7d069c7176f26371 xhci: dbgtty: Pass dbc pointer when registering a dbctty device

:::::: TO: Mathias Nyman <mathias.nyman@linux.intel.com>
:::::: CC: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

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

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 74076 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [usb:usb-testing 193/195] drivers/usb/host/xhci-dbgtty.c:396:5: warning: no previous prototype for 'xhci_dbc_tty_register_device'
Date: Fri, 24 Jul 2020 10:36:00 +0800	[thread overview]
Message-ID: <202007241056.Hldz09he%lkp@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 6317 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing
head:   9a360a7cae11461ccd933a9ea366b0dcb3afadb0
commit: 6ae6470bfa330d0b8892e02888bf5dac2272c28d [193/195] xhci: dbc: Add a operations structure to access driver functions
config: i386-allyesconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-14) 9.3.0
reproduce (this is a W=1 build):
        git checkout 6ae6470bfa330d0b8892e02888bf5dac2272c28d
        # save the attached .config to linux build tree
        make W=1 ARCH=i386 

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/usb/host/xhci-dbgtty.c:396:5: warning: no previous prototype for 'xhci_dbc_tty_register_device' [-Wmissing-prototypes]
     396 | int xhci_dbc_tty_register_device(struct xhci_dbc *dbc)
         |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/usb/host/xhci-dbgtty.c:444:6: warning: no previous prototype for 'xhci_dbc_tty_unregister_device' [-Wmissing-prototypes]
     444 | void xhci_dbc_tty_unregister_device(struct xhci_dbc *dbc)
         |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/usb/host/xhci-dbgtty.c: In function 'xhci_dbc_tty_probe':
   drivers/usb/host/xhci-dbgtty.c:478:1: warning: label 'out' defined but not used [-Wunused-label]
     478 | out:
         | ^~~

vim +/xhci_dbc_tty_register_device +396 drivers/usb/host/xhci-dbgtty.c

dfba2174dc421ec Lu Baolu      2017-12-08  395  
b396fa39de9b47c Mathias Nyman 2020-07-23 @396  int xhci_dbc_tty_register_device(struct xhci_dbc *dbc)
dfba2174dc421ec Lu Baolu      2017-12-08  397  {
dfba2174dc421ec Lu Baolu      2017-12-08  398  	int			ret;
dfba2174dc421ec Lu Baolu      2017-12-08  399  	struct device		*tty_dev;
dfba2174dc421ec Lu Baolu      2017-12-08  400  	struct dbc_port		*port = &dbc->port;
dfba2174dc421ec Lu Baolu      2017-12-08  401  
91aaf97471a047b Mathias Nyman 2020-07-23  402  	xhci_dbc_tty_init_port(dbc, port);
dfba2174dc421ec Lu Baolu      2017-12-08  403  	tty_dev = tty_port_register_device(&port->port,
dfba2174dc421ec Lu Baolu      2017-12-08  404  					   dbc_tty_driver, 0, NULL);
29f653393e740b1 Dan Carpenter 2018-03-16  405  	if (IS_ERR(tty_dev)) {
29f653393e740b1 Dan Carpenter 2018-03-16  406  		ret = PTR_ERR(tty_dev);
dfba2174dc421ec Lu Baolu      2017-12-08  407  		goto register_fail;
29f653393e740b1 Dan Carpenter 2018-03-16  408  	}
dfba2174dc421ec Lu Baolu      2017-12-08  409  
dfba2174dc421ec Lu Baolu      2017-12-08  410  	ret = kfifo_alloc(&port->write_fifo, DBC_WRITE_BUF_SIZE, GFP_KERNEL);
dfba2174dc421ec Lu Baolu      2017-12-08  411  	if (ret)
dfba2174dc421ec Lu Baolu      2017-12-08  412  		goto buf_alloc_fail;
dfba2174dc421ec Lu Baolu      2017-12-08  413  
e0aa56dc7b18c80 Mathias Nyman 2020-07-23  414  	ret = xhci_dbc_alloc_requests(dbc, BULK_IN, &port->read_pool,
dfba2174dc421ec Lu Baolu      2017-12-08  415  				      dbc_read_complete);
dfba2174dc421ec Lu Baolu      2017-12-08  416  	if (ret)
dfba2174dc421ec Lu Baolu      2017-12-08  417  		goto request_fail;
dfba2174dc421ec Lu Baolu      2017-12-08  418  
e0aa56dc7b18c80 Mathias Nyman 2020-07-23  419  	ret = xhci_dbc_alloc_requests(dbc, BULK_OUT, &port->write_pool,
dfba2174dc421ec Lu Baolu      2017-12-08  420  				      dbc_write_complete);
dfba2174dc421ec Lu Baolu      2017-12-08  421  	if (ret)
dfba2174dc421ec Lu Baolu      2017-12-08  422  		goto request_fail;
dfba2174dc421ec Lu Baolu      2017-12-08  423  
dfba2174dc421ec Lu Baolu      2017-12-08  424  	port->registered = true;
dfba2174dc421ec Lu Baolu      2017-12-08  425  
dfba2174dc421ec Lu Baolu      2017-12-08  426  	return 0;
dfba2174dc421ec Lu Baolu      2017-12-08  427  
dfba2174dc421ec Lu Baolu      2017-12-08  428  request_fail:
e0aa56dc7b18c80 Mathias Nyman 2020-07-23  429  	xhci_dbc_free_requests(&port->read_pool);
e0aa56dc7b18c80 Mathias Nyman 2020-07-23  430  	xhci_dbc_free_requests(&port->write_pool);
dfba2174dc421ec Lu Baolu      2017-12-08  431  	kfifo_free(&port->write_fifo);
dfba2174dc421ec Lu Baolu      2017-12-08  432  
dfba2174dc421ec Lu Baolu      2017-12-08  433  buf_alloc_fail:
dfba2174dc421ec Lu Baolu      2017-12-08  434  	tty_unregister_device(dbc_tty_driver, 0);
dfba2174dc421ec Lu Baolu      2017-12-08  435  
dfba2174dc421ec Lu Baolu      2017-12-08  436  register_fail:
dfba2174dc421ec Lu Baolu      2017-12-08  437  	xhci_dbc_tty_exit_port(port);
dfba2174dc421ec Lu Baolu      2017-12-08  438  
b396fa39de9b47c Mathias Nyman 2020-07-23  439  	dev_err(dbc->dev, "can't register tty port, err %d\n", ret);
dfba2174dc421ec Lu Baolu      2017-12-08  440  
dfba2174dc421ec Lu Baolu      2017-12-08  441  	return ret;
dfba2174dc421ec Lu Baolu      2017-12-08  442  }
dfba2174dc421ec Lu Baolu      2017-12-08  443  
b396fa39de9b47c Mathias Nyman 2020-07-23 @444  void xhci_dbc_tty_unregister_device(struct xhci_dbc *dbc)
dfba2174dc421ec Lu Baolu      2017-12-08  445  {
dfba2174dc421ec Lu Baolu      2017-12-08  446  	struct dbc_port		*port = &dbc->port;
dfba2174dc421ec Lu Baolu      2017-12-08  447  
dfba2174dc421ec Lu Baolu      2017-12-08  448  	tty_unregister_device(dbc_tty_driver, 0);
dfba2174dc421ec Lu Baolu      2017-12-08  449  	xhci_dbc_tty_exit_port(port);
dfba2174dc421ec Lu Baolu      2017-12-08  450  	port->registered = false;
dfba2174dc421ec Lu Baolu      2017-12-08  451  
dfba2174dc421ec Lu Baolu      2017-12-08  452  	kfifo_free(&port->write_fifo);
e0aa56dc7b18c80 Mathias Nyman 2020-07-23  453  	xhci_dbc_free_requests(&port->read_pool);
e0aa56dc7b18c80 Mathias Nyman 2020-07-23  454  	xhci_dbc_free_requests(&port->read_queue);
e0aa56dc7b18c80 Mathias Nyman 2020-07-23  455  	xhci_dbc_free_requests(&port->write_pool);
dfba2174dc421ec Lu Baolu      2017-12-08  456  }
4521f16139409cd Mathias Nyman 2020-07-23  457  

:::::: The code at line 396 was first introduced by commit
:::::: b396fa39de9b47ce3368f65d7d069c7176f26371 xhci: dbgtty: Pass dbc pointer when registering a dbctty device

:::::: TO: Mathias Nyman <mathias.nyman@linux.intel.com>
:::::: 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: 74076 bytes --]

             reply	other threads:[~2020-07-24  3:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-24  2:36 kernel test robot [this message]
2020-07-24  2:36 ` [usb:usb-testing 193/195] drivers/usb/host/xhci-dbgtty.c:396:5: warning: no previous prototype for 'xhci_dbc_tty_register_device' kernel test robot

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=202007241056.Hldz09he%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mathias.nyman@linux.intel.com \
    /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.