All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Chunfeng Yun <chunfeng.yun@mediatek.com>,
	Felipe Balbi <balbi@kernel.org>
Cc: Florian Fainelli <f.fainelli@gmail.com>,
	kbuild-all@lists.01.org,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Al Cooper <alcooperx@gmail.com>,
	linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org,
	bcm-kernel-feedback-list@broadcom.com,
	Matthias Brugger <matthias.bgg@gmail.com>,
	linux-mediatek@lists.infradead.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH RESEND v4 08/11] usb: gadget: bdc: use the BIT macro to define bit filed
Date: Wed, 13 Jan 2021 13:30:17 +0800	[thread overview]
Message-ID: <202101131315.9VCNOfZJ-lkp@intel.com> (raw)
In-Reply-To: <1610505748-30616-8-git-send-email-chunfeng.yun@mediatek.com>

[-- Attachment #1: Type: text/plain, Size: 8355 bytes --]

Hi Chunfeng,

I love your patch! Perhaps something to improve:

[auto build test WARNING on balbi-usb/testing/next]
[also build test WARNING on v5.11-rc3 next-20210112]
[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-gadget-bdc-fix-improper-SPDX-comment-style-for-header-file/20210113-105252
base:   https://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb.git testing/next
config: x86_64-randconfig-s022-20210113 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.3-208-g46a52ca4-dirty
        # https://github.com/0day-ci/linux/commit/b9301494d83b247a1c4c1ecc892a9f806dde0aaf
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Chunfeng-Yun/usb-gadget-bdc-fix-improper-SPDX-comment-style-for-header-file/20210113-105252
        git checkout b9301494d83b247a1c4c1ecc892a9f806dde0aaf
        # save the attached .config to linux build tree
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64 

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


"sparse warnings: (new ones prefixed by >>)"
>> drivers/usb/gadget/udc/bdc/bdc_ep.c:498:26: sparse: sparse: cast truncates bits from constant value (ffffffff7fffffff becomes 7fffffff)

vim +498 drivers/usb/gadget/udc/bdc/bdc_ep.c

efed421a94e62a7d Ashwini Pahuja 2014-11-13  423  
efed421a94e62a7d Ashwini Pahuja 2014-11-13  424  /* Setup the bd dma descriptor for a given request */
efed421a94e62a7d Ashwini Pahuja 2014-11-13  425  static int setup_bd_list_xfr(struct bdc *bdc, struct bdc_req *req, int num_bds)
efed421a94e62a7d Ashwini Pahuja 2014-11-13  426  {
efed421a94e62a7d Ashwini Pahuja 2014-11-13  427  	dma_addr_t buf_add = req->usb_req.dma;
efed421a94e62a7d Ashwini Pahuja 2014-11-13  428  	u32 maxp, tfs, dword2, dword3;
efed421a94e62a7d Ashwini Pahuja 2014-11-13  429  	struct bd_transfer *bd_xfr;
efed421a94e62a7d Ashwini Pahuja 2014-11-13  430  	struct bd_list *bd_list;
efed421a94e62a7d Ashwini Pahuja 2014-11-13  431  	struct bdc_ep *ep;
efed421a94e62a7d Ashwini Pahuja 2014-11-13  432  	struct bdc_bd *bd;
efed421a94e62a7d Ashwini Pahuja 2014-11-13  433  	int ret, bdnum;
efed421a94e62a7d Ashwini Pahuja 2014-11-13  434  	u32 req_len;
efed421a94e62a7d Ashwini Pahuja 2014-11-13  435  
efed421a94e62a7d Ashwini Pahuja 2014-11-13  436  	ep = req->ep;
efed421a94e62a7d Ashwini Pahuja 2014-11-13  437  	bd_list = &ep->bd_list;
efed421a94e62a7d Ashwini Pahuja 2014-11-13  438  	bd_xfr = &req->bd_xfr;
efed421a94e62a7d Ashwini Pahuja 2014-11-13  439  	bd_xfr->req = req;
efed421a94e62a7d Ashwini Pahuja 2014-11-13  440  	bd_xfr->start_bdi = bd_list->eqp_bdi;
efed421a94e62a7d Ashwini Pahuja 2014-11-13  441  	bd = bdi_to_bd(ep, bd_list->eqp_bdi);
efed421a94e62a7d Ashwini Pahuja 2014-11-13  442  	req_len = req->usb_req.length;
cc2e895c604c480b Felipe Balbi   2016-09-28  443  	maxp = usb_endpoint_maxp(ep->desc);
efed421a94e62a7d Ashwini Pahuja 2014-11-13  444  	tfs = roundup(req->usb_req.length, maxp);
efed421a94e62a7d Ashwini Pahuja 2014-11-13  445  	tfs = tfs/maxp;
efed421a94e62a7d Ashwini Pahuja 2014-11-13  446  	dev_vdbg(bdc->dev, "%s ep:%s num_bds:%d tfs:%d r_len:%d bd:%p\n",
efed421a94e62a7d Ashwini Pahuja 2014-11-13  447  				__func__, ep->name, num_bds, tfs, req_len, bd);
efed421a94e62a7d Ashwini Pahuja 2014-11-13  448  
efed421a94e62a7d Ashwini Pahuja 2014-11-13  449  	for (bdnum = 0; bdnum < num_bds; bdnum++) {
efed421a94e62a7d Ashwini Pahuja 2014-11-13  450  		dword2 = dword3 = 0;
efed421a94e62a7d Ashwini Pahuja 2014-11-13  451  		/* First bd */
efed421a94e62a7d Ashwini Pahuja 2014-11-13  452  		if (!bdnum) {
efed421a94e62a7d Ashwini Pahuja 2014-11-13  453  			dword3 |= BD_SOT|BD_SBF|(tfs<<BD_TFS_SHIFT);
efed421a94e62a7d Ashwini Pahuja 2014-11-13  454  			dword2 |= BD_LTF;
efed421a94e62a7d Ashwini Pahuja 2014-11-13  455  			/* format of first bd for ep0 is different than other */
016040268ccafaa7 Dan Carpenter  2014-11-29  456  			if (ep->ep_num == 1) {
efed421a94e62a7d Ashwini Pahuja 2014-11-13  457  				ret = setup_first_bd_ep0(bdc, req, &dword3);
efed421a94e62a7d Ashwini Pahuja 2014-11-13  458  				if (ret)
efed421a94e62a7d Ashwini Pahuja 2014-11-13  459  					return ret;
efed421a94e62a7d Ashwini Pahuja 2014-11-13  460  			}
016040268ccafaa7 Dan Carpenter  2014-11-29  461  		}
efed421a94e62a7d Ashwini Pahuja 2014-11-13  462  		if (!req->ep->dir)
efed421a94e62a7d Ashwini Pahuja 2014-11-13  463  			dword3 |= BD_ISP;
efed421a94e62a7d Ashwini Pahuja 2014-11-13  464  
efed421a94e62a7d Ashwini Pahuja 2014-11-13  465  		if (req_len > BD_MAX_BUFF_SIZE) {
efed421a94e62a7d Ashwini Pahuja 2014-11-13  466  			dword2 |= BD_MAX_BUFF_SIZE;
efed421a94e62a7d Ashwini Pahuja 2014-11-13  467  			req_len -= BD_MAX_BUFF_SIZE;
efed421a94e62a7d Ashwini Pahuja 2014-11-13  468  		} else {
efed421a94e62a7d Ashwini Pahuja 2014-11-13  469  			/* this should be the last bd */
efed421a94e62a7d Ashwini Pahuja 2014-11-13  470  			dword2 |= req_len;
efed421a94e62a7d Ashwini Pahuja 2014-11-13  471  			dword3 |= BD_IOC;
efed421a94e62a7d Ashwini Pahuja 2014-11-13  472  			dword3 |= BD_EOT;
efed421a94e62a7d Ashwini Pahuja 2014-11-13  473  		}
efed421a94e62a7d Ashwini Pahuja 2014-11-13  474  		/* Currently only 1 INT target is supported */
efed421a94e62a7d Ashwini Pahuja 2014-11-13  475  		dword2 |= BD_INTR_TARGET(0);
efed421a94e62a7d Ashwini Pahuja 2014-11-13  476  		bd = bdi_to_bd(ep, ep->bd_list.eqp_bdi);
efed421a94e62a7d Ashwini Pahuja 2014-11-13  477  		if (unlikely(!bd)) {
efed421a94e62a7d Ashwini Pahuja 2014-11-13  478  			dev_err(bdc->dev, "Err bd pointing to wrong addr\n");
efed421a94e62a7d Ashwini Pahuja 2014-11-13  479  			return -EINVAL;
efed421a94e62a7d Ashwini Pahuja 2014-11-13  480  		}
efed421a94e62a7d Ashwini Pahuja 2014-11-13  481  		/* write bd */
efed421a94e62a7d Ashwini Pahuja 2014-11-13  482  		bd->offset[0] = cpu_to_le32(lower_32_bits(buf_add));
efed421a94e62a7d Ashwini Pahuja 2014-11-13  483  		bd->offset[1] = cpu_to_le32(upper_32_bits(buf_add));
efed421a94e62a7d Ashwini Pahuja 2014-11-13  484  		bd->offset[2] = cpu_to_le32(dword2);
efed421a94e62a7d Ashwini Pahuja 2014-11-13  485  		bd->offset[3] = cpu_to_le32(dword3);
efed421a94e62a7d Ashwini Pahuja 2014-11-13  486  		/* advance eqp pointer */
efed421a94e62a7d Ashwini Pahuja 2014-11-13  487  		ep_bdlist_eqp_adv(ep);
efed421a94e62a7d Ashwini Pahuja 2014-11-13  488  		/* advance the buff pointer */
efed421a94e62a7d Ashwini Pahuja 2014-11-13  489  		buf_add += BD_MAX_BUFF_SIZE;
efed421a94e62a7d Ashwini Pahuja 2014-11-13  490  		dev_vdbg(bdc->dev, "buf_add:%08llx req_len:%d bd:%p eqp:%d\n",
efed421a94e62a7d Ashwini Pahuja 2014-11-13  491  				(unsigned long long)buf_add, req_len, bd,
efed421a94e62a7d Ashwini Pahuja 2014-11-13  492  							ep->bd_list.eqp_bdi);
efed421a94e62a7d Ashwini Pahuja 2014-11-13  493  		bd = bdi_to_bd(ep, ep->bd_list.eqp_bdi);
efed421a94e62a7d Ashwini Pahuja 2014-11-13  494  		bd->offset[3] = cpu_to_le32(BD_SBF);
efed421a94e62a7d Ashwini Pahuja 2014-11-13  495  	}
efed421a94e62a7d Ashwini Pahuja 2014-11-13  496  	/* clear the STOP BD fetch bit from the first bd of this xfr */
efed421a94e62a7d Ashwini Pahuja 2014-11-13  497  	bd = bdi_to_bd(ep, bd_xfr->start_bdi);
efed421a94e62a7d Ashwini Pahuja 2014-11-13 @498  	bd->offset[3] &= cpu_to_le32(~BD_SBF);
efed421a94e62a7d Ashwini Pahuja 2014-11-13  499  	/* the new eqp will be next hw dqp */
efed421a94e62a7d Ashwini Pahuja 2014-11-13  500  	bd_xfr->num_bds  = num_bds;
efed421a94e62a7d Ashwini Pahuja 2014-11-13  501  	bd_xfr->next_hwd_bdi = ep->bd_list.eqp_bdi;
efed421a94e62a7d Ashwini Pahuja 2014-11-13  502  	/* everything is written correctly before notifying the HW */
efed421a94e62a7d Ashwini Pahuja 2014-11-13  503  	wmb();
efed421a94e62a7d Ashwini Pahuja 2014-11-13  504  
efed421a94e62a7d Ashwini Pahuja 2014-11-13  505  	return 0;
efed421a94e62a7d Ashwini Pahuja 2014-11-13  506  }
efed421a94e62a7d Ashwini Pahuja 2014-11-13  507  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 34245 bytes --]

[-- Attachment #3: Type: text/plain, Size: 170 bytes --]

_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: Chunfeng Yun <chunfeng.yun@mediatek.com>,
	Felipe Balbi <balbi@kernel.org>
Cc: kbuild-all@lists.01.org, Florian Fainelli <f.fainelli@gmail.com>,
	Al Cooper <alcooperx@gmail.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	linux-usb@vger.kernel.org, bcm-kernel-feedback-list@broadcom.com,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org
Subject: Re: [PATCH RESEND v4 08/11] usb: gadget: bdc: use the BIT macro to define bit filed
Date: Wed, 13 Jan 2021 13:30:17 +0800	[thread overview]
Message-ID: <202101131315.9VCNOfZJ-lkp@intel.com> (raw)
In-Reply-To: <1610505748-30616-8-git-send-email-chunfeng.yun@mediatek.com>

[-- Attachment #1: Type: text/plain, Size: 8355 bytes --]

Hi Chunfeng,

I love your patch! Perhaps something to improve:

[auto build test WARNING on balbi-usb/testing/next]
[also build test WARNING on v5.11-rc3 next-20210112]
[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-gadget-bdc-fix-improper-SPDX-comment-style-for-header-file/20210113-105252
base:   https://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb.git testing/next
config: x86_64-randconfig-s022-20210113 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.3-208-g46a52ca4-dirty
        # https://github.com/0day-ci/linux/commit/b9301494d83b247a1c4c1ecc892a9f806dde0aaf
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Chunfeng-Yun/usb-gadget-bdc-fix-improper-SPDX-comment-style-for-header-file/20210113-105252
        git checkout b9301494d83b247a1c4c1ecc892a9f806dde0aaf
        # save the attached .config to linux build tree
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64 

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


"sparse warnings: (new ones prefixed by >>)"
>> drivers/usb/gadget/udc/bdc/bdc_ep.c:498:26: sparse: sparse: cast truncates bits from constant value (ffffffff7fffffff becomes 7fffffff)

vim +498 drivers/usb/gadget/udc/bdc/bdc_ep.c

efed421a94e62a7d Ashwini Pahuja 2014-11-13  423  
efed421a94e62a7d Ashwini Pahuja 2014-11-13  424  /* Setup the bd dma descriptor for a given request */
efed421a94e62a7d Ashwini Pahuja 2014-11-13  425  static int setup_bd_list_xfr(struct bdc *bdc, struct bdc_req *req, int num_bds)
efed421a94e62a7d Ashwini Pahuja 2014-11-13  426  {
efed421a94e62a7d Ashwini Pahuja 2014-11-13  427  	dma_addr_t buf_add = req->usb_req.dma;
efed421a94e62a7d Ashwini Pahuja 2014-11-13  428  	u32 maxp, tfs, dword2, dword3;
efed421a94e62a7d Ashwini Pahuja 2014-11-13  429  	struct bd_transfer *bd_xfr;
efed421a94e62a7d Ashwini Pahuja 2014-11-13  430  	struct bd_list *bd_list;
efed421a94e62a7d Ashwini Pahuja 2014-11-13  431  	struct bdc_ep *ep;
efed421a94e62a7d Ashwini Pahuja 2014-11-13  432  	struct bdc_bd *bd;
efed421a94e62a7d Ashwini Pahuja 2014-11-13  433  	int ret, bdnum;
efed421a94e62a7d Ashwini Pahuja 2014-11-13  434  	u32 req_len;
efed421a94e62a7d Ashwini Pahuja 2014-11-13  435  
efed421a94e62a7d Ashwini Pahuja 2014-11-13  436  	ep = req->ep;
efed421a94e62a7d Ashwini Pahuja 2014-11-13  437  	bd_list = &ep->bd_list;
efed421a94e62a7d Ashwini Pahuja 2014-11-13  438  	bd_xfr = &req->bd_xfr;
efed421a94e62a7d Ashwini Pahuja 2014-11-13  439  	bd_xfr->req = req;
efed421a94e62a7d Ashwini Pahuja 2014-11-13  440  	bd_xfr->start_bdi = bd_list->eqp_bdi;
efed421a94e62a7d Ashwini Pahuja 2014-11-13  441  	bd = bdi_to_bd(ep, bd_list->eqp_bdi);
efed421a94e62a7d Ashwini Pahuja 2014-11-13  442  	req_len = req->usb_req.length;
cc2e895c604c480b Felipe Balbi   2016-09-28  443  	maxp = usb_endpoint_maxp(ep->desc);
efed421a94e62a7d Ashwini Pahuja 2014-11-13  444  	tfs = roundup(req->usb_req.length, maxp);
efed421a94e62a7d Ashwini Pahuja 2014-11-13  445  	tfs = tfs/maxp;
efed421a94e62a7d Ashwini Pahuja 2014-11-13  446  	dev_vdbg(bdc->dev, "%s ep:%s num_bds:%d tfs:%d r_len:%d bd:%p\n",
efed421a94e62a7d Ashwini Pahuja 2014-11-13  447  				__func__, ep->name, num_bds, tfs, req_len, bd);
efed421a94e62a7d Ashwini Pahuja 2014-11-13  448  
efed421a94e62a7d Ashwini Pahuja 2014-11-13  449  	for (bdnum = 0; bdnum < num_bds; bdnum++) {
efed421a94e62a7d Ashwini Pahuja 2014-11-13  450  		dword2 = dword3 = 0;
efed421a94e62a7d Ashwini Pahuja 2014-11-13  451  		/* First bd */
efed421a94e62a7d Ashwini Pahuja 2014-11-13  452  		if (!bdnum) {
efed421a94e62a7d Ashwini Pahuja 2014-11-13  453  			dword3 |= BD_SOT|BD_SBF|(tfs<<BD_TFS_SHIFT);
efed421a94e62a7d Ashwini Pahuja 2014-11-13  454  			dword2 |= BD_LTF;
efed421a94e62a7d Ashwini Pahuja 2014-11-13  455  			/* format of first bd for ep0 is different than other */
016040268ccafaa7 Dan Carpenter  2014-11-29  456  			if (ep->ep_num == 1) {
efed421a94e62a7d Ashwini Pahuja 2014-11-13  457  				ret = setup_first_bd_ep0(bdc, req, &dword3);
efed421a94e62a7d Ashwini Pahuja 2014-11-13  458  				if (ret)
efed421a94e62a7d Ashwini Pahuja 2014-11-13  459  					return ret;
efed421a94e62a7d Ashwini Pahuja 2014-11-13  460  			}
016040268ccafaa7 Dan Carpenter  2014-11-29  461  		}
efed421a94e62a7d Ashwini Pahuja 2014-11-13  462  		if (!req->ep->dir)
efed421a94e62a7d Ashwini Pahuja 2014-11-13  463  			dword3 |= BD_ISP;
efed421a94e62a7d Ashwini Pahuja 2014-11-13  464  
efed421a94e62a7d Ashwini Pahuja 2014-11-13  465  		if (req_len > BD_MAX_BUFF_SIZE) {
efed421a94e62a7d Ashwini Pahuja 2014-11-13  466  			dword2 |= BD_MAX_BUFF_SIZE;
efed421a94e62a7d Ashwini Pahuja 2014-11-13  467  			req_len -= BD_MAX_BUFF_SIZE;
efed421a94e62a7d Ashwini Pahuja 2014-11-13  468  		} else {
efed421a94e62a7d Ashwini Pahuja 2014-11-13  469  			/* this should be the last bd */
efed421a94e62a7d Ashwini Pahuja 2014-11-13  470  			dword2 |= req_len;
efed421a94e62a7d Ashwini Pahuja 2014-11-13  471  			dword3 |= BD_IOC;
efed421a94e62a7d Ashwini Pahuja 2014-11-13  472  			dword3 |= BD_EOT;
efed421a94e62a7d Ashwini Pahuja 2014-11-13  473  		}
efed421a94e62a7d Ashwini Pahuja 2014-11-13  474  		/* Currently only 1 INT target is supported */
efed421a94e62a7d Ashwini Pahuja 2014-11-13  475  		dword2 |= BD_INTR_TARGET(0);
efed421a94e62a7d Ashwini Pahuja 2014-11-13  476  		bd = bdi_to_bd(ep, ep->bd_list.eqp_bdi);
efed421a94e62a7d Ashwini Pahuja 2014-11-13  477  		if (unlikely(!bd)) {
efed421a94e62a7d Ashwini Pahuja 2014-11-13  478  			dev_err(bdc->dev, "Err bd pointing to wrong addr\n");
efed421a94e62a7d Ashwini Pahuja 2014-11-13  479  			return -EINVAL;
efed421a94e62a7d Ashwini Pahuja 2014-11-13  480  		}
efed421a94e62a7d Ashwini Pahuja 2014-11-13  481  		/* write bd */
efed421a94e62a7d Ashwini Pahuja 2014-11-13  482  		bd->offset[0] = cpu_to_le32(lower_32_bits(buf_add));
efed421a94e62a7d Ashwini Pahuja 2014-11-13  483  		bd->offset[1] = cpu_to_le32(upper_32_bits(buf_add));
efed421a94e62a7d Ashwini Pahuja 2014-11-13  484  		bd->offset[2] = cpu_to_le32(dword2);
efed421a94e62a7d Ashwini Pahuja 2014-11-13  485  		bd->offset[3] = cpu_to_le32(dword3);
efed421a94e62a7d Ashwini Pahuja 2014-11-13  486  		/* advance eqp pointer */
efed421a94e62a7d Ashwini Pahuja 2014-11-13  487  		ep_bdlist_eqp_adv(ep);
efed421a94e62a7d Ashwini Pahuja 2014-11-13  488  		/* advance the buff pointer */
efed421a94e62a7d Ashwini Pahuja 2014-11-13  489  		buf_add += BD_MAX_BUFF_SIZE;
efed421a94e62a7d Ashwini Pahuja 2014-11-13  490  		dev_vdbg(bdc->dev, "buf_add:%08llx req_len:%d bd:%p eqp:%d\n",
efed421a94e62a7d Ashwini Pahuja 2014-11-13  491  				(unsigned long long)buf_add, req_len, bd,
efed421a94e62a7d Ashwini Pahuja 2014-11-13  492  							ep->bd_list.eqp_bdi);
efed421a94e62a7d Ashwini Pahuja 2014-11-13  493  		bd = bdi_to_bd(ep, ep->bd_list.eqp_bdi);
efed421a94e62a7d Ashwini Pahuja 2014-11-13  494  		bd->offset[3] = cpu_to_le32(BD_SBF);
efed421a94e62a7d Ashwini Pahuja 2014-11-13  495  	}
efed421a94e62a7d Ashwini Pahuja 2014-11-13  496  	/* clear the STOP BD fetch bit from the first bd of this xfr */
efed421a94e62a7d Ashwini Pahuja 2014-11-13  497  	bd = bdi_to_bd(ep, bd_xfr->start_bdi);
efed421a94e62a7d Ashwini Pahuja 2014-11-13 @498  	bd->offset[3] &= cpu_to_le32(~BD_SBF);
efed421a94e62a7d Ashwini Pahuja 2014-11-13  499  	/* the new eqp will be next hw dqp */
efed421a94e62a7d Ashwini Pahuja 2014-11-13  500  	bd_xfr->num_bds  = num_bds;
efed421a94e62a7d Ashwini Pahuja 2014-11-13  501  	bd_xfr->next_hwd_bdi = ep->bd_list.eqp_bdi;
efed421a94e62a7d Ashwini Pahuja 2014-11-13  502  	/* everything is written correctly before notifying the HW */
efed421a94e62a7d Ashwini Pahuja 2014-11-13  503  	wmb();
efed421a94e62a7d Ashwini Pahuja 2014-11-13  504  
efed421a94e62a7d Ashwini Pahuja 2014-11-13  505  	return 0;
efed421a94e62a7d Ashwini Pahuja 2014-11-13  506  }
efed421a94e62a7d Ashwini Pahuja 2014-11-13  507  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 34245 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH RESEND v4 08/11] usb: gadget: bdc: use the BIT macro to define bit filed
Date: Wed, 13 Jan 2021 13:30:17 +0800	[thread overview]
Message-ID: <202101131315.9VCNOfZJ-lkp@intel.com> (raw)
In-Reply-To: <1610505748-30616-8-git-send-email-chunfeng.yun@mediatek.com>

[-- Attachment #1: Type: text/plain, Size: 8479 bytes --]

Hi Chunfeng,

I love your patch! Perhaps something to improve:

[auto build test WARNING on balbi-usb/testing/next]
[also build test WARNING on v5.11-rc3 next-20210112]
[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-gadget-bdc-fix-improper-SPDX-comment-style-for-header-file/20210113-105252
base:   https://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb.git testing/next
config: x86_64-randconfig-s022-20210113 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.3-208-g46a52ca4-dirty
        # https://github.com/0day-ci/linux/commit/b9301494d83b247a1c4c1ecc892a9f806dde0aaf
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Chunfeng-Yun/usb-gadget-bdc-fix-improper-SPDX-comment-style-for-header-file/20210113-105252
        git checkout b9301494d83b247a1c4c1ecc892a9f806dde0aaf
        # save the attached .config to linux build tree
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64 

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


"sparse warnings: (new ones prefixed by >>)"
>> drivers/usb/gadget/udc/bdc/bdc_ep.c:498:26: sparse: sparse: cast truncates bits from constant value (ffffffff7fffffff becomes 7fffffff)

vim +498 drivers/usb/gadget/udc/bdc/bdc_ep.c

efed421a94e62a7d Ashwini Pahuja 2014-11-13  423  
efed421a94e62a7d Ashwini Pahuja 2014-11-13  424  /* Setup the bd dma descriptor for a given request */
efed421a94e62a7d Ashwini Pahuja 2014-11-13  425  static int setup_bd_list_xfr(struct bdc *bdc, struct bdc_req *req, int num_bds)
efed421a94e62a7d Ashwini Pahuja 2014-11-13  426  {
efed421a94e62a7d Ashwini Pahuja 2014-11-13  427  	dma_addr_t buf_add = req->usb_req.dma;
efed421a94e62a7d Ashwini Pahuja 2014-11-13  428  	u32 maxp, tfs, dword2, dword3;
efed421a94e62a7d Ashwini Pahuja 2014-11-13  429  	struct bd_transfer *bd_xfr;
efed421a94e62a7d Ashwini Pahuja 2014-11-13  430  	struct bd_list *bd_list;
efed421a94e62a7d Ashwini Pahuja 2014-11-13  431  	struct bdc_ep *ep;
efed421a94e62a7d Ashwini Pahuja 2014-11-13  432  	struct bdc_bd *bd;
efed421a94e62a7d Ashwini Pahuja 2014-11-13  433  	int ret, bdnum;
efed421a94e62a7d Ashwini Pahuja 2014-11-13  434  	u32 req_len;
efed421a94e62a7d Ashwini Pahuja 2014-11-13  435  
efed421a94e62a7d Ashwini Pahuja 2014-11-13  436  	ep = req->ep;
efed421a94e62a7d Ashwini Pahuja 2014-11-13  437  	bd_list = &ep->bd_list;
efed421a94e62a7d Ashwini Pahuja 2014-11-13  438  	bd_xfr = &req->bd_xfr;
efed421a94e62a7d Ashwini Pahuja 2014-11-13  439  	bd_xfr->req = req;
efed421a94e62a7d Ashwini Pahuja 2014-11-13  440  	bd_xfr->start_bdi = bd_list->eqp_bdi;
efed421a94e62a7d Ashwini Pahuja 2014-11-13  441  	bd = bdi_to_bd(ep, bd_list->eqp_bdi);
efed421a94e62a7d Ashwini Pahuja 2014-11-13  442  	req_len = req->usb_req.length;
cc2e895c604c480b Felipe Balbi   2016-09-28  443  	maxp = usb_endpoint_maxp(ep->desc);
efed421a94e62a7d Ashwini Pahuja 2014-11-13  444  	tfs = roundup(req->usb_req.length, maxp);
efed421a94e62a7d Ashwini Pahuja 2014-11-13  445  	tfs = tfs/maxp;
efed421a94e62a7d Ashwini Pahuja 2014-11-13  446  	dev_vdbg(bdc->dev, "%s ep:%s num_bds:%d tfs:%d r_len:%d bd:%p\n",
efed421a94e62a7d Ashwini Pahuja 2014-11-13  447  				__func__, ep->name, num_bds, tfs, req_len, bd);
efed421a94e62a7d Ashwini Pahuja 2014-11-13  448  
efed421a94e62a7d Ashwini Pahuja 2014-11-13  449  	for (bdnum = 0; bdnum < num_bds; bdnum++) {
efed421a94e62a7d Ashwini Pahuja 2014-11-13  450  		dword2 = dword3 = 0;
efed421a94e62a7d Ashwini Pahuja 2014-11-13  451  		/* First bd */
efed421a94e62a7d Ashwini Pahuja 2014-11-13  452  		if (!bdnum) {
efed421a94e62a7d Ashwini Pahuja 2014-11-13  453  			dword3 |= BD_SOT|BD_SBF|(tfs<<BD_TFS_SHIFT);
efed421a94e62a7d Ashwini Pahuja 2014-11-13  454  			dword2 |= BD_LTF;
efed421a94e62a7d Ashwini Pahuja 2014-11-13  455  			/* format of first bd for ep0 is different than other */
016040268ccafaa7 Dan Carpenter  2014-11-29  456  			if (ep->ep_num == 1) {
efed421a94e62a7d Ashwini Pahuja 2014-11-13  457  				ret = setup_first_bd_ep0(bdc, req, &dword3);
efed421a94e62a7d Ashwini Pahuja 2014-11-13  458  				if (ret)
efed421a94e62a7d Ashwini Pahuja 2014-11-13  459  					return ret;
efed421a94e62a7d Ashwini Pahuja 2014-11-13  460  			}
016040268ccafaa7 Dan Carpenter  2014-11-29  461  		}
efed421a94e62a7d Ashwini Pahuja 2014-11-13  462  		if (!req->ep->dir)
efed421a94e62a7d Ashwini Pahuja 2014-11-13  463  			dword3 |= BD_ISP;
efed421a94e62a7d Ashwini Pahuja 2014-11-13  464  
efed421a94e62a7d Ashwini Pahuja 2014-11-13  465  		if (req_len > BD_MAX_BUFF_SIZE) {
efed421a94e62a7d Ashwini Pahuja 2014-11-13  466  			dword2 |= BD_MAX_BUFF_SIZE;
efed421a94e62a7d Ashwini Pahuja 2014-11-13  467  			req_len -= BD_MAX_BUFF_SIZE;
efed421a94e62a7d Ashwini Pahuja 2014-11-13  468  		} else {
efed421a94e62a7d Ashwini Pahuja 2014-11-13  469  			/* this should be the last bd */
efed421a94e62a7d Ashwini Pahuja 2014-11-13  470  			dword2 |= req_len;
efed421a94e62a7d Ashwini Pahuja 2014-11-13  471  			dword3 |= BD_IOC;
efed421a94e62a7d Ashwini Pahuja 2014-11-13  472  			dword3 |= BD_EOT;
efed421a94e62a7d Ashwini Pahuja 2014-11-13  473  		}
efed421a94e62a7d Ashwini Pahuja 2014-11-13  474  		/* Currently only 1 INT target is supported */
efed421a94e62a7d Ashwini Pahuja 2014-11-13  475  		dword2 |= BD_INTR_TARGET(0);
efed421a94e62a7d Ashwini Pahuja 2014-11-13  476  		bd = bdi_to_bd(ep, ep->bd_list.eqp_bdi);
efed421a94e62a7d Ashwini Pahuja 2014-11-13  477  		if (unlikely(!bd)) {
efed421a94e62a7d Ashwini Pahuja 2014-11-13  478  			dev_err(bdc->dev, "Err bd pointing to wrong addr\n");
efed421a94e62a7d Ashwini Pahuja 2014-11-13  479  			return -EINVAL;
efed421a94e62a7d Ashwini Pahuja 2014-11-13  480  		}
efed421a94e62a7d Ashwini Pahuja 2014-11-13  481  		/* write bd */
efed421a94e62a7d Ashwini Pahuja 2014-11-13  482  		bd->offset[0] = cpu_to_le32(lower_32_bits(buf_add));
efed421a94e62a7d Ashwini Pahuja 2014-11-13  483  		bd->offset[1] = cpu_to_le32(upper_32_bits(buf_add));
efed421a94e62a7d Ashwini Pahuja 2014-11-13  484  		bd->offset[2] = cpu_to_le32(dword2);
efed421a94e62a7d Ashwini Pahuja 2014-11-13  485  		bd->offset[3] = cpu_to_le32(dword3);
efed421a94e62a7d Ashwini Pahuja 2014-11-13  486  		/* advance eqp pointer */
efed421a94e62a7d Ashwini Pahuja 2014-11-13  487  		ep_bdlist_eqp_adv(ep);
efed421a94e62a7d Ashwini Pahuja 2014-11-13  488  		/* advance the buff pointer */
efed421a94e62a7d Ashwini Pahuja 2014-11-13  489  		buf_add += BD_MAX_BUFF_SIZE;
efed421a94e62a7d Ashwini Pahuja 2014-11-13  490  		dev_vdbg(bdc->dev, "buf_add:%08llx req_len:%d bd:%p eqp:%d\n",
efed421a94e62a7d Ashwini Pahuja 2014-11-13  491  				(unsigned long long)buf_add, req_len, bd,
efed421a94e62a7d Ashwini Pahuja 2014-11-13  492  							ep->bd_list.eqp_bdi);
efed421a94e62a7d Ashwini Pahuja 2014-11-13  493  		bd = bdi_to_bd(ep, ep->bd_list.eqp_bdi);
efed421a94e62a7d Ashwini Pahuja 2014-11-13  494  		bd->offset[3] = cpu_to_le32(BD_SBF);
efed421a94e62a7d Ashwini Pahuja 2014-11-13  495  	}
efed421a94e62a7d Ashwini Pahuja 2014-11-13  496  	/* clear the STOP BD fetch bit from the first bd of this xfr */
efed421a94e62a7d Ashwini Pahuja 2014-11-13  497  	bd = bdi_to_bd(ep, bd_xfr->start_bdi);
efed421a94e62a7d Ashwini Pahuja 2014-11-13 @498  	bd->offset[3] &= cpu_to_le32(~BD_SBF);
efed421a94e62a7d Ashwini Pahuja 2014-11-13  499  	/* the new eqp will be next hw dqp */
efed421a94e62a7d Ashwini Pahuja 2014-11-13  500  	bd_xfr->num_bds  = num_bds;
efed421a94e62a7d Ashwini Pahuja 2014-11-13  501  	bd_xfr->next_hwd_bdi = ep->bd_list.eqp_bdi;
efed421a94e62a7d Ashwini Pahuja 2014-11-13  502  	/* everything is written correctly before notifying the HW */
efed421a94e62a7d Ashwini Pahuja 2014-11-13  503  	wmb();
efed421a94e62a7d Ashwini Pahuja 2014-11-13  504  
efed421a94e62a7d Ashwini Pahuja 2014-11-13  505  	return 0;
efed421a94e62a7d Ashwini Pahuja 2014-11-13  506  }
efed421a94e62a7d Ashwini Pahuja 2014-11-13  507  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 34245 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: Chunfeng Yun <chunfeng.yun@mediatek.com>,
	Felipe Balbi <balbi@kernel.org>
Cc: Florian Fainelli <f.fainelli@gmail.com>,
	kbuild-all@lists.01.org,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Al Cooper <alcooperx@gmail.com>,
	linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org,
	bcm-kernel-feedback-list@broadcom.com,
	Matthias Brugger <matthias.bgg@gmail.com>,
	linux-mediatek@lists.infradead.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH RESEND v4 08/11] usb: gadget: bdc: use the BIT macro to define bit filed
Date: Wed, 13 Jan 2021 13:30:17 +0800	[thread overview]
Message-ID: <202101131315.9VCNOfZJ-lkp@intel.com> (raw)
In-Reply-To: <1610505748-30616-8-git-send-email-chunfeng.yun@mediatek.com>

[-- Attachment #1: Type: text/plain, Size: 8355 bytes --]

Hi Chunfeng,

I love your patch! Perhaps something to improve:

[auto build test WARNING on balbi-usb/testing/next]
[also build test WARNING on v5.11-rc3 next-20210112]
[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-gadget-bdc-fix-improper-SPDX-comment-style-for-header-file/20210113-105252
base:   https://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb.git testing/next
config: x86_64-randconfig-s022-20210113 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.3-208-g46a52ca4-dirty
        # https://github.com/0day-ci/linux/commit/b9301494d83b247a1c4c1ecc892a9f806dde0aaf
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Chunfeng-Yun/usb-gadget-bdc-fix-improper-SPDX-comment-style-for-header-file/20210113-105252
        git checkout b9301494d83b247a1c4c1ecc892a9f806dde0aaf
        # save the attached .config to linux build tree
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64 

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


"sparse warnings: (new ones prefixed by >>)"
>> drivers/usb/gadget/udc/bdc/bdc_ep.c:498:26: sparse: sparse: cast truncates bits from constant value (ffffffff7fffffff becomes 7fffffff)

vim +498 drivers/usb/gadget/udc/bdc/bdc_ep.c

efed421a94e62a7d Ashwini Pahuja 2014-11-13  423  
efed421a94e62a7d Ashwini Pahuja 2014-11-13  424  /* Setup the bd dma descriptor for a given request */
efed421a94e62a7d Ashwini Pahuja 2014-11-13  425  static int setup_bd_list_xfr(struct bdc *bdc, struct bdc_req *req, int num_bds)
efed421a94e62a7d Ashwini Pahuja 2014-11-13  426  {
efed421a94e62a7d Ashwini Pahuja 2014-11-13  427  	dma_addr_t buf_add = req->usb_req.dma;
efed421a94e62a7d Ashwini Pahuja 2014-11-13  428  	u32 maxp, tfs, dword2, dword3;
efed421a94e62a7d Ashwini Pahuja 2014-11-13  429  	struct bd_transfer *bd_xfr;
efed421a94e62a7d Ashwini Pahuja 2014-11-13  430  	struct bd_list *bd_list;
efed421a94e62a7d Ashwini Pahuja 2014-11-13  431  	struct bdc_ep *ep;
efed421a94e62a7d Ashwini Pahuja 2014-11-13  432  	struct bdc_bd *bd;
efed421a94e62a7d Ashwini Pahuja 2014-11-13  433  	int ret, bdnum;
efed421a94e62a7d Ashwini Pahuja 2014-11-13  434  	u32 req_len;
efed421a94e62a7d Ashwini Pahuja 2014-11-13  435  
efed421a94e62a7d Ashwini Pahuja 2014-11-13  436  	ep = req->ep;
efed421a94e62a7d Ashwini Pahuja 2014-11-13  437  	bd_list = &ep->bd_list;
efed421a94e62a7d Ashwini Pahuja 2014-11-13  438  	bd_xfr = &req->bd_xfr;
efed421a94e62a7d Ashwini Pahuja 2014-11-13  439  	bd_xfr->req = req;
efed421a94e62a7d Ashwini Pahuja 2014-11-13  440  	bd_xfr->start_bdi = bd_list->eqp_bdi;
efed421a94e62a7d Ashwini Pahuja 2014-11-13  441  	bd = bdi_to_bd(ep, bd_list->eqp_bdi);
efed421a94e62a7d Ashwini Pahuja 2014-11-13  442  	req_len = req->usb_req.length;
cc2e895c604c480b Felipe Balbi   2016-09-28  443  	maxp = usb_endpoint_maxp(ep->desc);
efed421a94e62a7d Ashwini Pahuja 2014-11-13  444  	tfs = roundup(req->usb_req.length, maxp);
efed421a94e62a7d Ashwini Pahuja 2014-11-13  445  	tfs = tfs/maxp;
efed421a94e62a7d Ashwini Pahuja 2014-11-13  446  	dev_vdbg(bdc->dev, "%s ep:%s num_bds:%d tfs:%d r_len:%d bd:%p\n",
efed421a94e62a7d Ashwini Pahuja 2014-11-13  447  				__func__, ep->name, num_bds, tfs, req_len, bd);
efed421a94e62a7d Ashwini Pahuja 2014-11-13  448  
efed421a94e62a7d Ashwini Pahuja 2014-11-13  449  	for (bdnum = 0; bdnum < num_bds; bdnum++) {
efed421a94e62a7d Ashwini Pahuja 2014-11-13  450  		dword2 = dword3 = 0;
efed421a94e62a7d Ashwini Pahuja 2014-11-13  451  		/* First bd */
efed421a94e62a7d Ashwini Pahuja 2014-11-13  452  		if (!bdnum) {
efed421a94e62a7d Ashwini Pahuja 2014-11-13  453  			dword3 |= BD_SOT|BD_SBF|(tfs<<BD_TFS_SHIFT);
efed421a94e62a7d Ashwini Pahuja 2014-11-13  454  			dword2 |= BD_LTF;
efed421a94e62a7d Ashwini Pahuja 2014-11-13  455  			/* format of first bd for ep0 is different than other */
016040268ccafaa7 Dan Carpenter  2014-11-29  456  			if (ep->ep_num == 1) {
efed421a94e62a7d Ashwini Pahuja 2014-11-13  457  				ret = setup_first_bd_ep0(bdc, req, &dword3);
efed421a94e62a7d Ashwini Pahuja 2014-11-13  458  				if (ret)
efed421a94e62a7d Ashwini Pahuja 2014-11-13  459  					return ret;
efed421a94e62a7d Ashwini Pahuja 2014-11-13  460  			}
016040268ccafaa7 Dan Carpenter  2014-11-29  461  		}
efed421a94e62a7d Ashwini Pahuja 2014-11-13  462  		if (!req->ep->dir)
efed421a94e62a7d Ashwini Pahuja 2014-11-13  463  			dword3 |= BD_ISP;
efed421a94e62a7d Ashwini Pahuja 2014-11-13  464  
efed421a94e62a7d Ashwini Pahuja 2014-11-13  465  		if (req_len > BD_MAX_BUFF_SIZE) {
efed421a94e62a7d Ashwini Pahuja 2014-11-13  466  			dword2 |= BD_MAX_BUFF_SIZE;
efed421a94e62a7d Ashwini Pahuja 2014-11-13  467  			req_len -= BD_MAX_BUFF_SIZE;
efed421a94e62a7d Ashwini Pahuja 2014-11-13  468  		} else {
efed421a94e62a7d Ashwini Pahuja 2014-11-13  469  			/* this should be the last bd */
efed421a94e62a7d Ashwini Pahuja 2014-11-13  470  			dword2 |= req_len;
efed421a94e62a7d Ashwini Pahuja 2014-11-13  471  			dword3 |= BD_IOC;
efed421a94e62a7d Ashwini Pahuja 2014-11-13  472  			dword3 |= BD_EOT;
efed421a94e62a7d Ashwini Pahuja 2014-11-13  473  		}
efed421a94e62a7d Ashwini Pahuja 2014-11-13  474  		/* Currently only 1 INT target is supported */
efed421a94e62a7d Ashwini Pahuja 2014-11-13  475  		dword2 |= BD_INTR_TARGET(0);
efed421a94e62a7d Ashwini Pahuja 2014-11-13  476  		bd = bdi_to_bd(ep, ep->bd_list.eqp_bdi);
efed421a94e62a7d Ashwini Pahuja 2014-11-13  477  		if (unlikely(!bd)) {
efed421a94e62a7d Ashwini Pahuja 2014-11-13  478  			dev_err(bdc->dev, "Err bd pointing to wrong addr\n");
efed421a94e62a7d Ashwini Pahuja 2014-11-13  479  			return -EINVAL;
efed421a94e62a7d Ashwini Pahuja 2014-11-13  480  		}
efed421a94e62a7d Ashwini Pahuja 2014-11-13  481  		/* write bd */
efed421a94e62a7d Ashwini Pahuja 2014-11-13  482  		bd->offset[0] = cpu_to_le32(lower_32_bits(buf_add));
efed421a94e62a7d Ashwini Pahuja 2014-11-13  483  		bd->offset[1] = cpu_to_le32(upper_32_bits(buf_add));
efed421a94e62a7d Ashwini Pahuja 2014-11-13  484  		bd->offset[2] = cpu_to_le32(dword2);
efed421a94e62a7d Ashwini Pahuja 2014-11-13  485  		bd->offset[3] = cpu_to_le32(dword3);
efed421a94e62a7d Ashwini Pahuja 2014-11-13  486  		/* advance eqp pointer */
efed421a94e62a7d Ashwini Pahuja 2014-11-13  487  		ep_bdlist_eqp_adv(ep);
efed421a94e62a7d Ashwini Pahuja 2014-11-13  488  		/* advance the buff pointer */
efed421a94e62a7d Ashwini Pahuja 2014-11-13  489  		buf_add += BD_MAX_BUFF_SIZE;
efed421a94e62a7d Ashwini Pahuja 2014-11-13  490  		dev_vdbg(bdc->dev, "buf_add:%08llx req_len:%d bd:%p eqp:%d\n",
efed421a94e62a7d Ashwini Pahuja 2014-11-13  491  				(unsigned long long)buf_add, req_len, bd,
efed421a94e62a7d Ashwini Pahuja 2014-11-13  492  							ep->bd_list.eqp_bdi);
efed421a94e62a7d Ashwini Pahuja 2014-11-13  493  		bd = bdi_to_bd(ep, ep->bd_list.eqp_bdi);
efed421a94e62a7d Ashwini Pahuja 2014-11-13  494  		bd->offset[3] = cpu_to_le32(BD_SBF);
efed421a94e62a7d Ashwini Pahuja 2014-11-13  495  	}
efed421a94e62a7d Ashwini Pahuja 2014-11-13  496  	/* clear the STOP BD fetch bit from the first bd of this xfr */
efed421a94e62a7d Ashwini Pahuja 2014-11-13  497  	bd = bdi_to_bd(ep, bd_xfr->start_bdi);
efed421a94e62a7d Ashwini Pahuja 2014-11-13 @498  	bd->offset[3] &= cpu_to_le32(~BD_SBF);
efed421a94e62a7d Ashwini Pahuja 2014-11-13  499  	/* the new eqp will be next hw dqp */
efed421a94e62a7d Ashwini Pahuja 2014-11-13  500  	bd_xfr->num_bds  = num_bds;
efed421a94e62a7d Ashwini Pahuja 2014-11-13  501  	bd_xfr->next_hwd_bdi = ep->bd_list.eqp_bdi;
efed421a94e62a7d Ashwini Pahuja 2014-11-13  502  	/* everything is written correctly before notifying the HW */
efed421a94e62a7d Ashwini Pahuja 2014-11-13  503  	wmb();
efed421a94e62a7d Ashwini Pahuja 2014-11-13  504  
efed421a94e62a7d Ashwini Pahuja 2014-11-13  505  	return 0;
efed421a94e62a7d Ashwini Pahuja 2014-11-13  506  }
efed421a94e62a7d Ashwini Pahuja 2014-11-13  507  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 34245 bytes --]

[-- Attachment #3: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2021-01-13  5:30 UTC|newest]

Thread overview: 70+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-13  2:42 [PATCH RESEND v4 01/11] usb: gadget: bdc: fix improper SPDX comment style for header file Chunfeng Yun
2021-01-13  2:42 ` Chunfeng Yun
2021-01-13  2:42 ` Chunfeng Yun
2021-01-13  2:42 ` [PATCH RESEND v4 02/11] usb: gadget: bdc: remove bdc_ep_set_halt() declaration Chunfeng Yun
2021-01-13  2:42   ` Chunfeng Yun
2021-01-13  2:42   ` Chunfeng Yun
2021-01-13  8:41   ` Felipe Balbi
2021-01-13  8:41     ` Felipe Balbi
2021-01-13  8:41     ` Felipe Balbi
2021-01-13  2:42 ` [PATCH RESEND v4 03/11] usb: gadget: bdc: prefer pointer dereference to pointer type Chunfeng Yun
2021-01-13  2:42   ` Chunfeng Yun
2021-01-13  2:42   ` Chunfeng Yun
2021-01-13  8:41   ` Felipe Balbi
2021-01-13  8:41     ` Felipe Balbi
2021-01-13  8:41     ` Felipe Balbi
2021-01-13  2:42 ` [PATCH RESEND v4 04/11] usb: gadget: bdc: fix warning of embedded function name Chunfeng Yun
2021-01-13  2:42   ` Chunfeng Yun
2021-01-13  2:42   ` Chunfeng Yun
2021-01-13  8:42   ` Felipe Balbi
2021-01-13  8:42     ` Felipe Balbi
2021-01-13  8:42     ` Felipe Balbi
2021-01-13  2:42 ` [PATCH RESEND v4 05/11] usb: gadget: bdc: fix check warning of block comments alignment Chunfeng Yun
2021-01-13  2:42   ` Chunfeng Yun
2021-01-13  2:42   ` Chunfeng Yun
2021-01-13  8:43   ` Felipe Balbi
2021-01-13  8:43     ` Felipe Balbi
2021-01-13  8:43     ` Felipe Balbi
2021-01-13  2:42 ` [PATCH RESEND v4 06/11] usb: gadget: bdc: add identifier name for function declaraion Chunfeng Yun
2021-01-13  2:42   ` Chunfeng Yun
2021-01-13  2:42   ` Chunfeng Yun
2021-01-13  8:43   ` Felipe Balbi
2021-01-13  8:43     ` Felipe Balbi
2021-01-13  8:43     ` Felipe Balbi
2021-01-13  2:42 ` [PATCH RESEND v4 07/11] usb: gadget: bdc: avoid precedence issues Chunfeng Yun
2021-01-13  2:42   ` Chunfeng Yun
2021-01-13  2:42   ` Chunfeng Yun
2021-01-13  8:44   ` Felipe Balbi
2021-01-13  8:44     ` Felipe Balbi
2021-01-13  8:44     ` Felipe Balbi
2021-01-13  2:42 ` [PATCH RESEND v4 08/11] usb: gadget: bdc: use the BIT macro to define bit filed Chunfeng Yun
2021-01-13  2:42   ` Chunfeng Yun
2021-01-13  2:42   ` Chunfeng Yun
2021-01-13  5:30   ` kernel test robot [this message]
2021-01-13  5:30     ` kernel test robot
2021-01-13  5:30     ` kernel test robot
2021-01-13  5:30     ` kernel test robot
2021-01-13  8:44   ` Felipe Balbi
2021-01-13  8:44     ` Felipe Balbi
2021-01-13  8:44     ` Felipe Balbi
2021-01-13  2:42 ` [PATCH RESEND v4 09/11] usb: gadget: bdc: fix checkpatch.pl tab warning Chunfeng Yun
2021-01-13  2:42   ` Chunfeng Yun
2021-01-13  2:42   ` Chunfeng Yun
2021-01-13  8:46   ` Felipe Balbi
2021-01-13  8:46     ` Felipe Balbi
2021-01-13  8:46     ` Felipe Balbi
2021-01-13  2:42 ` [PATCH RESEND v4 10/11] usb: gadget: bdc: fix checkpatch.pl spacing error Chunfeng Yun
2021-01-13  2:42   ` Chunfeng Yun
2021-01-13  2:42   ` Chunfeng Yun
2021-01-13  8:46   ` Felipe Balbi
2021-01-13  8:46     ` Felipe Balbi
2021-01-13  8:46     ` Felipe Balbi
2021-01-13  2:42 ` [PATCH RESEND v4 11/11] usb: gadget: bdc: fix checkpatch.pl repeated word warning Chunfeng Yun
2021-01-13  2:42   ` Chunfeng Yun
2021-01-13  2:42   ` Chunfeng Yun
2021-01-13  8:47   ` Felipe Balbi
2021-01-13  8:47     ` Felipe Balbi
2021-01-13  8:47     ` Felipe Balbi
2021-01-13  8:40 ` [PATCH RESEND v4 01/11] usb: gadget: bdc: fix improper SPDX comment style for header file Felipe Balbi
2021-01-13  8:40   ` Felipe Balbi
2021-01-13  8:40   ` Felipe Balbi

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=202101131315.9VCNOfZJ-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=alcooperx@gmail.com \
    --cc=balbi@kernel.org \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=chunfeng.yun@mediatek.com \
    --cc=f.fainelli@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=matthias.bgg@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.