:::::: 
:::::: Manual check reason: "low confidence static check warning: 
drivers/usb/core/hcd.c:1694:2: sparse: sparse: unused label 'restart'"
:::::: 

CC: kbuild-...@lists.01.org
BCC: l...@intel.com
In-Reply-To: <20220721060833.4173-1-weitaowang...@zhaoxin.com>
References: <20220721060833.4173-1-weitaowang...@zhaoxin.com>
TO: Weitao Wang <weitaowang...@zhaoxin.com>
TO: st...@rowland.harvard.edu
TO: gre...@linuxfoundation.org
TO: kis...@ti.com
TO: diand...@chromium.org
TO: s.shtyl...@omp.ru
TO: m...@chromium.org
TO: ming....@canonical.com
TO: linux-...@vger.kernel.org
TO: linux-ker...@vger.kernel.org
CC: tonyww...@zhaoxin.com
CC: weitaow...@zhaoxin.com
CC: cobec...@zhaoxin.com
CC: tim...@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
:::::: branch date: 20 hours ago
:::::: commit date: 20 hours ago
config: arm-randconfig-s041-20220721 
(https://download.01.org/0day-ci/archive/20220722/202207221022.p7qys2lb-...@intel.com/config)
compiler: arm-linux-gnueabi-gcc (GCC) 12.1.0
reproduce:
        wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
        chmod +x ~/bin/make.cross
        # apt-get install sparse
        # sparse version: v0.6.4-39-gce1a6720-dirty
        # 
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
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross C=1 
CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=arm 
SHELL=/bin/bash drivers/usb/core/

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <l...@intel.com>

sparse warnings: (new ones prefixed by >>)
>> drivers/usb/core/hcd.c:1694:2: sparse: sparse: unused label 'restart'

vim +/restart +1694 drivers/usb/core/hcd.c

94dfd7edfd5c9b6 Ming Lei    2013-07-03  1686  
e71ea55a5b6f916 Allen Pais  2020-08-17  1687  static void 
usb_giveback_urb_bh(struct tasklet_struct *t)
94dfd7edfd5c9b6 Ming Lei    2013-07-03  1688  {
e71ea55a5b6f916 Allen Pais  2020-08-17  1689    struct giveback_urb_bh *bh = 
from_tasklet(bh, t, bh);
94dfd7edfd5c9b6 Ming Lei    2013-07-03  1690    struct list_head local_list;
94dfd7edfd5c9b6 Ming Lei    2013-07-03  1691  
94dfd7edfd5c9b6 Ming Lei    2013-07-03  1692    spin_lock_irq(&bh->lock);
94dfd7edfd5c9b6 Ming Lei    2013-07-03  1693    bh->running = true;
94dfd7edfd5c9b6 Ming Lei    2013-07-03 @1694   restart:
94dfd7edfd5c9b6 Ming Lei    2013-07-03  1695    list_replace_init(&bh->head, 
&local_list);
94dfd7edfd5c9b6 Ming Lei    2013-07-03  1696    spin_unlock_irq(&bh->lock);
94dfd7edfd5c9b6 Ming Lei    2013-07-03  1697  
94dfd7edfd5c9b6 Ming Lei    2013-07-03  1698    while 
(!list_empty(&local_list)) {
94dfd7edfd5c9b6 Ming Lei    2013-07-03  1699            struct urb *urb;
94dfd7edfd5c9b6 Ming Lei    2013-07-03  1700  
94dfd7edfd5c9b6 Ming Lei    2013-07-03  1701            urb = 
list_entry(local_list.next, struct urb, urb_list);
94dfd7edfd5c9b6 Ming Lei    2013-07-03  1702            
list_del_init(&urb->urb_list);
c7ccde6eac6d3c4 Alan Stern  2013-09-03  1703            bh->completing_ep = 
urb->ep;
94dfd7edfd5c9b6 Ming Lei    2013-07-03  1704            
__usb_hcd_giveback_urb(urb);
c7ccde6eac6d3c4 Alan Stern  2013-09-03  1705            bh->completing_ep = 
NULL;
94dfd7edfd5c9b6 Ming Lei    2013-07-03  1706    }
94dfd7edfd5c9b6 Ming Lei    2013-07-03  1707  
302398ba5a76bb3 Weitao Wang 2022-07-21  1708    /* giveback new URBs next time 
to prevent this function from
302398ba5a76bb3 Weitao Wang 2022-07-21  1709     * not exiting for a long time.
302398ba5a76bb3 Weitao Wang 2022-07-21  1710     */
94dfd7edfd5c9b6 Ming Lei    2013-07-03  1711    spin_lock_irq(&bh->lock);
302398ba5a76bb3 Weitao Wang 2022-07-21  1712    if (!list_empty(&bh->head)) {
302398ba5a76bb3 Weitao Wang 2022-07-21  1713            if (bh->hi_priority)
302398ba5a76bb3 Weitao Wang 2022-07-21  1714                    
tasklet_hi_schedule(&bh->bh);
302398ba5a76bb3 Weitao Wang 2022-07-21  1715            else
302398ba5a76bb3 Weitao Wang 2022-07-21  1716                    
tasklet_schedule(&bh->bh);
302398ba5a76bb3 Weitao Wang 2022-07-21  1717    }
94dfd7edfd5c9b6 Ming Lei    2013-07-03  1718    bh->running = false;
94dfd7edfd5c9b6 Ming Lei    2013-07-03  1719    spin_unlock_irq(&bh->lock);
94dfd7edfd5c9b6 Ming Lei    2013-07-03  1720  }
94dfd7edfd5c9b6 Ming Lei    2013-07-03  1721  

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp
_______________________________________________
kbuild mailing list -- kbuild@lists.01.org
To unsubscribe send an email to kbuild-le...@lists.01.org

Reply via email to