[PATCH] usb: xhci-mtk: allow multiple Start-Split in a microframe

kernel test robot lkp at intel.com
Thu Jun 17 00:09:43 PDT 2021


Hi Chunfeng,

I love your patch! Perhaps something to improve:

[auto build test WARNING on usb/usb-testing]
[also build test WARNING on v5.13-rc6 next-20210616]
[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]

url:    https://github.com/0day-ci/linux/commits/Chunfeng-Yun/usb-xhci-mtk-allow-multiple-Start-Split-in-a-microframe/20210617-101730
base:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing
config: arc-allyesconfig (attached as .config)
compiler: arceb-elf-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/0day-ci/linux/commit/1417adf315cfee06ef79bd1e34266e9098863b5c
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Chunfeng-Yun/usb-xhci-mtk-allow-multiple-Start-Split-in-a-microframe/20210617-101730
        git checkout 1417adf315cfee06ef79bd1e34266e9098863b5c
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arc 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp at intel.com>

All warnings (new ones prefixed by >>):

   drivers/usb/host/xhci-mtk-sch.c: In function 'update_sch_tt':
>> drivers/usb/host/xhci-mtk-sch.c:538:6: warning: variable 'bits' set but not used [-Wunused-but-set-variable]
     538 |  int bits;
         |      ^~~~


vim +/bits +538 drivers/usb/host/xhci-mtk-sch.c

08e469de87a253 Chunfeng Yun 2018-09-20  532  
6009bea08ad79c Chunfeng Yun 2021-03-08  533  static void update_sch_tt(struct mu3h_sch_ep_info *sch_ep, bool used)
08e469de87a253 Chunfeng Yun 2018-09-20  534  {
08e469de87a253 Chunfeng Yun 2018-09-20  535  	struct mu3h_sch_tt *tt = sch_ep->sch_tt;
08e469de87a253 Chunfeng Yun 2018-09-20  536  	u32 base, num_esit;
e19ee44a3d07c2 Chunfeng Yun 2021-03-08  537  	int bw_updated;
e19ee44a3d07c2 Chunfeng Yun 2021-03-08 @538  	int bits;
08e469de87a253 Chunfeng Yun 2018-09-20  539  	int i, j;
08e469de87a253 Chunfeng Yun 2018-09-20  540  
08e469de87a253 Chunfeng Yun 2018-09-20  541  	num_esit = XHCI_MTK_MAX_ESIT / sch_ep->esit;
e19ee44a3d07c2 Chunfeng Yun 2021-03-08  542  	bits = (sch_ep->ep_type == ISOC_OUT_EP) ? sch_ep->cs_count : 1;
e19ee44a3d07c2 Chunfeng Yun 2021-03-08  543  
e19ee44a3d07c2 Chunfeng Yun 2021-03-08  544  	if (used)
e19ee44a3d07c2 Chunfeng Yun 2021-03-08  545  		bw_updated = sch_ep->bw_cost_per_microframe;
e19ee44a3d07c2 Chunfeng Yun 2021-03-08  546  	else
e19ee44a3d07c2 Chunfeng Yun 2021-03-08  547  		bw_updated = -sch_ep->bw_cost_per_microframe;
e19ee44a3d07c2 Chunfeng Yun 2021-03-08  548  
08e469de87a253 Chunfeng Yun 2018-09-20  549  	for (i = 0; i < num_esit; i++) {
08e469de87a253 Chunfeng Yun 2018-09-20  550  		base = sch_ep->offset + i * sch_ep->esit;
e19ee44a3d07c2 Chunfeng Yun 2021-03-08  551  
e19ee44a3d07c2 Chunfeng Yun 2021-03-08  552  		for (j = 0; j < sch_ep->cs_count; j++)
e19ee44a3d07c2 Chunfeng Yun 2021-03-08  553  			tt->fs_bus_bw[base + j] += bw_updated;
08e469de87a253 Chunfeng Yun 2018-09-20  554  	}
08e469de87a253 Chunfeng Yun 2018-09-20  555  
e19ee44a3d07c2 Chunfeng Yun 2021-03-08  556  	if (used)
08e469de87a253 Chunfeng Yun 2018-09-20  557  		list_add_tail(&sch_ep->tt_endpoint, &tt->ep_list);
e19ee44a3d07c2 Chunfeng Yun 2021-03-08  558  	else
e19ee44a3d07c2 Chunfeng Yun 2021-03-08  559  		list_del(&sch_ep->tt_endpoint);
08e469de87a253 Chunfeng Yun 2018-09-20  560  }
08e469de87a253 Chunfeng Yun 2018-09-20  561  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 68189 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-mediatek/attachments/20210617/cd8852b9/attachment-0001.gz>


More information about the Linux-mediatek mailing list