From: kernel test robot <lkp@intel.com>
To: Weitao Wang <WeitaoWang-oc@zhaoxin.com>,
stern@rowland.harvard.edu, gregkh@linuxfoundation.org,
kishon@ti.com, dianders@chromium.org, s.shtylyov@omp.ru,
mka@chromium.org, ming.lei@canonical.com,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: kbuild-all@lists.01.org, tonywwang@zhaoxin.com,
weitaowang@zhaoxin.com, CobeChen@zhaoxin.com, TimGuo@zhaoxin.com
Subject: Re: [PATCH] USB: HCD: Fix URB giveback issue in tasklet function
Date: Thu, 21 Jul 2022 23:55:47 +0800 [thread overview]
Message-ID: <202207212305.50JoL7V2-lkp@intel.com> (raw)
In-Reply-To: <20220721060833.4173-1-WeitaoWang-oc@zhaoxin.com>
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@intel.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
prev parent reply other threads:[~2022-07-21 15:56 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-21 6:08 [PATCH] USB: HCD: Fix URB giveback issue in tasklet function Weitao Wang
2022-07-21 8:00 ` Oliver Neukum
2022-07-21 8:52 ` WeitaoWang-oc
2022-07-21 10:00 ` kernel test robot
2022-07-21 13:50 ` Alan Stern
2022-07-22 2:31 ` WeitaoWang-oc
2022-07-21 15:55 ` kernel test robot [this message]
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=202207212305.50JoL7V2-lkp@intel.com \
--to=lkp@intel.com \
--cc=CobeChen@zhaoxin.com \
--cc=TimGuo@zhaoxin.com \
--cc=WeitaoWang-oc@zhaoxin.com \
--cc=dianders@chromium.org \
--cc=gregkh@linuxfoundation.org \
--cc=kbuild-all@lists.01.org \
--cc=kishon@ti.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=ming.lei@canonical.com \
--cc=mka@chromium.org \
--cc=s.shtylyov@omp.ru \
--cc=stern@rowland.harvard.edu \
--cc=tonywwang@zhaoxin.com \
--cc=weitaowang@zhaoxin.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox