Building the Linux kernel with Clang and LLVM
 help / color / mirror / Atom feed
* Re: [PATCH 2/2] usbip: convert to use faux_device
       [not found] <2a327b520760271471717fff9b222cdc34967489.1746662386.git.zhouzongmin@kylinos.cn>
@ 2025-05-09 10:42 ` kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-05-09 10:42 UTC (permalink / raw)
  To: Zongmin Zhou, gregkh, rafael, dakr, markgross, arnd, eric.piel,
	valentina.manea.m, shuah, i
  Cc: llvm, oe-kbuild-all, linux-usb, linux-kernel, Zongmin Zhou

Hi Zongmin,

kernel test robot noticed the following build warnings:

[auto build test WARNING on usb/usb-testing]
[also build test WARNING on usb/usb-next usb/usb-linus driver-core/driver-core-testing driver-core/driver-core-next driver-core/driver-core-linus char-misc/char-misc-testing char-misc/char-misc-next char-misc/char-misc-linus linus/master v6.15-rc5 next-20250508]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Zongmin-Zhou/driver-core-add-device-s-platform_data-set-for-faux-device/20250508-171441
base:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing
patch link:    https://lore.kernel.org/r/2a327b520760271471717fff9b222cdc34967489.1746662386.git.zhouzongmin%40kylinos.cn
patch subject: [PATCH 2/2] usbip: convert to use faux_device
config: x86_64-randconfig-002-20250509 (https://download.01.org/0day-ci/archive/20250509/202505091836.sxOEZiIt-lkp@intel.com/config)
compiler: clang version 20.1.2 (https://github.com/llvm/llvm-project 58df0ef89dd64126512e4ee27b4ac3fd8ddf6247)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250509/202505091836.sxOEZiIt-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202505091836.sxOEZiIt-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> drivers/usb/usbip/vhci_hcd.c:1531:9: warning: variable 'ret' is uninitialized when used here [-Wuninitialized]
    1531 |         return ret;
         |                ^~~
   drivers/usb/usbip/vhci_hcd.c:1501:12: note: initialize the variable 'ret' to silence this warning
    1501 |         int i, ret;
         |                   ^
         |                    = 0
   drivers/usb/usbip/vhci_hcd.c:1418:12: warning: unused function 'vhci_hcd_suspend' [-Wunused-function]
    1418 | static int vhci_hcd_suspend(struct faux_device *fdev, pm_message_t state)
         |            ^~~~~~~~~~~~~~~~
   drivers/usb/usbip/vhci_hcd.c:1462:12: warning: unused function 'vhci_hcd_resume' [-Wunused-function]
    1462 | static int vhci_hcd_resume(struct faux_device *fdev)
         |            ^~~~~~~~~~~~~~~
   3 warnings generated.


vim +/ret +1531 drivers/usb/usbip/vhci_hcd.c

04679b3489e048 drivers/staging/usbip/vhci_hcd.c Takahiro Hirofuchi 2008-07-09  1498  
0392bbb6f6af31 drivers/staging/usbip/vhci_hcd.c matt mooney        2011-05-19  1499  static int __init vhci_hcd_init(void)
04679b3489e048 drivers/staging/usbip/vhci_hcd.c Takahiro Hirofuchi 2008-07-09  1500  {
0775a9cbc694e8 drivers/usb/usbip/vhci_hcd.c     Nobuo Iwata        2016-06-13  1501  	int i, ret;
04679b3489e048 drivers/staging/usbip/vhci_hcd.c Takahiro Hirofuchi 2008-07-09  1502  
04679b3489e048 drivers/staging/usbip/vhci_hcd.c Takahiro Hirofuchi 2008-07-09  1503  	if (usb_disabled())
04679b3489e048 drivers/staging/usbip/vhci_hcd.c Takahiro Hirofuchi 2008-07-09  1504  		return -ENODEV;
04679b3489e048 drivers/staging/usbip/vhci_hcd.c Takahiro Hirofuchi 2008-07-09  1505  
0775a9cbc694e8 drivers/usb/usbip/vhci_hcd.c     Nobuo Iwata        2016-06-13  1506  	if (vhci_num_controllers < 1)
0775a9cbc694e8 drivers/usb/usbip/vhci_hcd.c     Nobuo Iwata        2016-06-13  1507  		vhci_num_controllers = 1;
0775a9cbc694e8 drivers/usb/usbip/vhci_hcd.c     Nobuo Iwata        2016-06-13  1508  
89a73d281fa4f5 drivers/usb/usbip/vhci_hcd.c     Yuyang Du          2017-06-08  1509  	vhcis = kcalloc(vhci_num_controllers, sizeof(struct vhci), GFP_KERNEL);
89a73d281fa4f5 drivers/usb/usbip/vhci_hcd.c     Yuyang Du          2017-06-08  1510  	if (vhcis == NULL)
0775a9cbc694e8 drivers/usb/usbip/vhci_hcd.c     Nobuo Iwata        2016-06-13  1511  		return -ENOMEM;
0775a9cbc694e8 drivers/usb/usbip/vhci_hcd.c     Nobuo Iwata        2016-06-13  1512  
0775a9cbc694e8 drivers/usb/usbip/vhci_hcd.c     Nobuo Iwata        2016-06-13  1513  	for (i = 0; i < vhci_num_controllers; i++) {
17d6b82d2d6d46 drivers/usb/usbip/vhci_hcd.c     Hongren Zheng      2023-10-14  1514  		void *vhci = &vhcis[i];
1bcae4465d2818 drivers/usb/usbip/vhci_hcd.c     Zongmin Zhou       2025-05-08  1515  		char vhci_name[16];
1bcae4465d2818 drivers/usb/usbip/vhci_hcd.c     Zongmin Zhou       2025-05-08  1516  
1bcae4465d2818 drivers/usb/usbip/vhci_hcd.c     Zongmin Zhou       2025-05-08  1517  		snprintf(vhci_name, 16, "%s.%d", driver_name, i);
b8aaf639b403f0 drivers/usb/usbip/vhci_hcd.c     Andy Shevchenko    2023-10-06  1518  
1bcae4465d2818 drivers/usb/usbip/vhci_hcd.c     Zongmin Zhou       2025-05-08  1519  		vhcis[i].fdev = faux_device_create_with_groups(vhci_name, NULL, &vhci_driver, NULL, vhci);
1bcae4465d2818 drivers/usb/usbip/vhci_hcd.c     Zongmin Zhou       2025-05-08  1520  		if (!vhcis[i].fdev) {
b8aaf639b403f0 drivers/usb/usbip/vhci_hcd.c     Andy Shevchenko    2023-10-06  1521  			while (i--)
1bcae4465d2818 drivers/usb/usbip/vhci_hcd.c     Zongmin Zhou       2025-05-08  1522  				faux_device_destroy(vhcis[i].fdev);
dff3565b8e1c0b drivers/usb/usbip/vhci_hcd.c     Yuyang Du          2017-06-08  1523  			goto err_add_hcd;
dff3565b8e1c0b drivers/usb/usbip/vhci_hcd.c     Yuyang Du          2017-06-08  1524  		}
0775a9cbc694e8 drivers/usb/usbip/vhci_hcd.c     Nobuo Iwata        2016-06-13  1525  	}
04679b3489e048 drivers/staging/usbip/vhci_hcd.c Takahiro Hirofuchi 2008-07-09  1526  
b8aaf639b403f0 drivers/usb/usbip/vhci_hcd.c     Andy Shevchenko    2023-10-06  1527  	return 0;
04679b3489e048 drivers/staging/usbip/vhci_hcd.c Takahiro Hirofuchi 2008-07-09  1528  
dff3565b8e1c0b drivers/usb/usbip/vhci_hcd.c     Yuyang Du          2017-06-08  1529  err_add_hcd:
89a73d281fa4f5 drivers/usb/usbip/vhci_hcd.c     Yuyang Du          2017-06-08  1530  	kfree(vhcis);
04679b3489e048 drivers/staging/usbip/vhci_hcd.c Takahiro Hirofuchi 2008-07-09 @1531  	return ret;
04679b3489e048 drivers/staging/usbip/vhci_hcd.c Takahiro Hirofuchi 2008-07-09  1532  }
04679b3489e048 drivers/staging/usbip/vhci_hcd.c Takahiro Hirofuchi 2008-07-09  1533  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-05-09 10:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <2a327b520760271471717fff9b222cdc34967489.1746662386.git.zhouzongmin@kylinos.cn>
2025-05-09 10:42 ` [PATCH 2/2] usbip: convert to use faux_device kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox