* [usb:usb-testing 193/195] drivers/usb/host/xhci-dbgtty.c:396:5: warning: no previous prototype for 'xhci_dbc_tty_register_device'
@ 2020-07-24 2:36 ` kernel test robot
0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2020-07-24 2:36 UTC (permalink / raw)
To: Mathias Nyman; +Cc: kbuild-all, linux-usb, Greg Kroah-Hartman
[-- 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 --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* [usb:usb-testing 193/195] drivers/usb/host/xhci-dbgtty.c:396:5: warning: no previous prototype for 'xhci_dbc_tty_register_device'
@ 2020-07-24 2:36 ` kernel test robot
0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2020-07-24 2:36 UTC (permalink / raw)
To: kbuild-all
[-- 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 --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-07-24 3:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2020-07-24 2:36 ` 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.