[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202207212305.50JoL7V2-lkp@intel.com>
Date: Thu, 21 Jul 2022 23:55:47 +0800
From: kernel test robot <lkp@...el.com>
To: Weitao Wang <WeitaoWang-oc@...oxin.com>, stern@...land.harvard.edu,
gregkh@...uxfoundation.org, kishon@...com, dianders@...omium.org,
s.shtylyov@....ru, mka@...omium.org, ming.lei@...onical.com,
linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org
Cc: kbuild-all@...ts.01.org, tonywwang@...oxin.com,
weitaowang@...oxin.com, CobeChen@...oxin.com, TimGuo@...oxin.com
Subject: Re: [PATCH] USB: HCD: Fix URB giveback issue in tasklet function
Hi Weitao,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on usb/usb-testing]
[also build test WARNING on linus/master v5.19-rc7 next-20220721]
[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/Weitao-Wang/USB-HCD-Fix-URB-giveback-issue-in-tasklet-function/20220721-144208
base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing
config: i386-defconfig (https://download.01.org/0day-ci/archive/20220721/202207212305.50JoL7V2-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-3) 11.3.0
reproduce (this is a W=1 build):
# https://github.com/intel-lab-lkp/linux/commit/302398ba5a76bb39957bad7a6a8cb9d0429cd43a
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Weitao-Wang/USB-HCD-Fix-URB-giveback-issue-in-tasklet-function/20220721-144208
git checkout 302398ba5a76bb39957bad7a6a8cb9d0429cd43a
# save the config file
mkdir build_dir && cp config build_dir/.config
make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash drivers/usb/core/
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@...el.com>
All warnings (new ones prefixed by >>):
drivers/usb/core/hcd.c: In function 'usb_giveback_urb_bh':
>> drivers/usb/core/hcd.c:1694:2: warning: label 'restart' defined but not used [-Wunused-label]
1694 | restart:
| ^~~~~~~
vim +/restart +1694 drivers/usb/core/hcd.c
94dfd7edfd5c9b Ming Lei 2013-07-03 1686
e71ea55a5b6f91 Allen Pais 2020-08-17 1687 static void usb_giveback_urb_bh(struct tasklet_struct *t)
94dfd7edfd5c9b Ming Lei 2013-07-03 1688 {
e71ea55a5b6f91 Allen Pais 2020-08-17 1689 struct giveback_urb_bh *bh = from_tasklet(bh, t, bh);
94dfd7edfd5c9b Ming Lei 2013-07-03 1690 struct list_head local_list;
94dfd7edfd5c9b Ming Lei 2013-07-03 1691
94dfd7edfd5c9b Ming Lei 2013-07-03 1692 spin_lock_irq(&bh->lock);
94dfd7edfd5c9b Ming Lei 2013-07-03 1693 bh->running = true;
94dfd7edfd5c9b Ming Lei 2013-07-03 @1694 restart:
94dfd7edfd5c9b Ming Lei 2013-07-03 1695 list_replace_init(&bh->head, &local_list);
94dfd7edfd5c9b Ming Lei 2013-07-03 1696 spin_unlock_irq(&bh->lock);
94dfd7edfd5c9b Ming Lei 2013-07-03 1697
94dfd7edfd5c9b Ming Lei 2013-07-03 1698 while (!list_empty(&local_list)) {
94dfd7edfd5c9b Ming Lei 2013-07-03 1699 struct urb *urb;
94dfd7edfd5c9b Ming Lei 2013-07-03 1700
94dfd7edfd5c9b Ming Lei 2013-07-03 1701 urb = list_entry(local_list.next, struct urb, urb_list);
94dfd7edfd5c9b Ming Lei 2013-07-03 1702 list_del_init(&urb->urb_list);
c7ccde6eac6d3c Alan Stern 2013-09-03 1703 bh->completing_ep = urb->ep;
94dfd7edfd5c9b Ming Lei 2013-07-03 1704 __usb_hcd_giveback_urb(urb);
c7ccde6eac6d3c Alan Stern 2013-09-03 1705 bh->completing_ep = NULL;
94dfd7edfd5c9b Ming Lei 2013-07-03 1706 }
94dfd7edfd5c9b Ming Lei 2013-07-03 1707
302398ba5a76bb Weitao Wang 2022-07-21 1708 /* giveback new URBs next time to prevent this function from
302398ba5a76bb Weitao Wang 2022-07-21 1709 * not exiting for a long time.
302398ba5a76bb Weitao Wang 2022-07-21 1710 */
94dfd7edfd5c9b Ming Lei 2013-07-03 1711 spin_lock_irq(&bh->lock);
302398ba5a76bb Weitao Wang 2022-07-21 1712 if (!list_empty(&bh->head)) {
302398ba5a76bb Weitao Wang 2022-07-21 1713 if (bh->hi_priority)
302398ba5a76bb Weitao Wang 2022-07-21 1714 tasklet_hi_schedule(&bh->bh);
302398ba5a76bb Weitao Wang 2022-07-21 1715 else
302398ba5a76bb Weitao Wang 2022-07-21 1716 tasklet_schedule(&bh->bh);
302398ba5a76bb Weitao Wang 2022-07-21 1717 }
94dfd7edfd5c9b Ming Lei 2013-07-03 1718 bh->running = false;
94dfd7edfd5c9b Ming Lei 2013-07-03 1719 spin_unlock_irq(&bh->lock);
94dfd7edfd5c9b Ming Lei 2013-07-03 1720 }
94dfd7edfd5c9b Ming Lei 2013-07-03 1721
--
0-DAY CI Kernel Test Service
https://01.org/lkp
Powered by blists - more mailing lists