lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202012070447.RNwU76Yy-lkp@intel.com>
Date:   Mon, 7 Dec 2020 04:12:52 +0800
From:   kernel test robot <lkp@...el.com>
To:     Rasmus Villemoes <linux@...musvillemoes.dk>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        Li Yang <leoyang.li@....com>, Timur Tabi <timur@...nel.org>
Subject: drivers/usb/gadget/udc/fsl_qe_udc.c:837:33: sparse: sparse: non
 size-preserving integer to pointer cast

Hi Rasmus,

First bad commit (maybe != root cause):

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   7059c2c00a2196865c2139083cbef47cd18109b6
commit: 5a35435ef4e6e4bd2aabd6706b146b298a9cffe5 soc: fsl: qe: remove PPC32 dependency from CONFIG_QUICC_ENGINE
date:   12 months ago
config: powerpc64-randconfig-s031-20201207 (attached as .config)
compiler: powerpc64-linux-gcc (GCC) 9.3.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.3-179-ga00755aa-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=5a35435ef4e6e4bd2aabd6706b146b298a9cffe5
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout 5a35435ef4e6e4bd2aabd6706b146b298a9cffe5
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=powerpc64 

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


"sparse warnings: (new ones prefixed by >>)"
   drivers/usb/gadget/udc/fsl_qe_udc.c:302:27: sparse:     got restricted __be32 [noderef] <asn:2> *
   drivers/usb/gadget/udc/fsl_qe_udc.c:317:51: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected unsigned short const volatile [noderef] [usertype] <asn:2> *addr @@     got restricted __be16 [noderef] <asn:2> * @@
   drivers/usb/gadget/udc/fsl_qe_udc.c:317:51: sparse:     expected unsigned short const volatile [noderef] [usertype] <asn:2> *addr
   drivers/usb/gadget/udc/fsl_qe_udc.c:317:51: sparse:     got restricted __be16 [noderef] <asn:2> *
   drivers/usb/gadget/udc/fsl_qe_udc.c:334:42: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected unsigned short volatile [noderef] [usertype] <asn:2> *addr @@     got restricted __be16 [noderef] <asn:2> * @@
   drivers/usb/gadget/udc/fsl_qe_udc.c:334:42: sparse:     expected unsigned short volatile [noderef] [usertype] <asn:2> *addr
   drivers/usb/gadget/udc/fsl_qe_udc.c:334:42: sparse:     got restricted __be16 [noderef] <asn:2> *
   drivers/usb/gadget/udc/fsl_qe_udc.c:387:27: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected unsigned int volatile [noderef] [usertype] <asn:2> *addr @@     got restricted __be32 [noderef] <asn:2> * @@
   drivers/usb/gadget/udc/fsl_qe_udc.c:387:27: sparse:     expected unsigned int volatile [noderef] [usertype] <asn:2> *addr
   drivers/usb/gadget/udc/fsl_qe_udc.c:387:27: sparse:     got restricted __be32 [noderef] <asn:2> *
   drivers/usb/gadget/udc/fsl_qe_udc.c:391:19: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected unsigned int volatile [noderef] [usertype] <asn:2> *addr @@     got restricted __be32 [noderef] <asn:2> * @@
   drivers/usb/gadget/udc/fsl_qe_udc.c:391:19: sparse:     expected unsigned int volatile [noderef] [usertype] <asn:2> *addr
   drivers/usb/gadget/udc/fsl_qe_udc.c:391:19: sparse:     got restricted __be32 [noderef] <asn:2> *
   drivers/usb/gadget/udc/fsl_qe_udc.c:396:27: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected unsigned int volatile [noderef] [usertype] <asn:2> *addr @@     got restricted __be32 [noderef] <asn:2> * @@
   drivers/usb/gadget/udc/fsl_qe_udc.c:396:27: sparse:     expected unsigned int volatile [noderef] [usertype] <asn:2> *addr
   drivers/usb/gadget/udc/fsl_qe_udc.c:396:27: sparse:     got restricted __be32 [noderef] <asn:2> *
   drivers/usb/gadget/udc/fsl_qe_udc.c:400:19: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected unsigned int volatile [noderef] [usertype] <asn:2> *addr @@     got restricted __be32 [noderef] <asn:2> * @@
   drivers/usb/gadget/udc/fsl_qe_udc.c:400:19: sparse:     expected unsigned int volatile [noderef] [usertype] <asn:2> *addr
   drivers/usb/gadget/udc/fsl_qe_udc.c:400:19: sparse:     got restricted __be32 [noderef] <asn:2> *
   drivers/usb/gadget/udc/fsl_qe_udc.c:456:27: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected unsigned int volatile [noderef] [usertype] <asn:2> *addr @@     got restricted __be32 [noderef] <asn:2> * @@
   drivers/usb/gadget/udc/fsl_qe_udc.c:456:27: sparse:     expected unsigned int volatile [noderef] [usertype] <asn:2> *addr
   drivers/usb/gadget/udc/fsl_qe_udc.c:456:27: sparse:     got restricted __be32 [noderef] <asn:2> *
   drivers/usb/gadget/udc/fsl_qe_udc.c:461:19: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected unsigned int volatile [noderef] [usertype] <asn:2> *addr @@     got restricted __be32 [noderef] <asn:2> * @@
   drivers/usb/gadget/udc/fsl_qe_udc.c:461:19: sparse:     expected unsigned int volatile [noderef] [usertype] <asn:2> *addr
   drivers/usb/gadget/udc/fsl_qe_udc.c:461:19: sparse:     got restricted __be32 [noderef] <asn:2> *
   drivers/usb/gadget/udc/fsl_qe_udc.c:506:42: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected unsigned short volatile [noderef] [usertype] <asn:2> *addr @@     got restricted __be16 [noderef] <asn:2> * @@
   drivers/usb/gadget/udc/fsl_qe_udc.c:506:42: sparse:     expected unsigned short volatile [noderef] [usertype] <asn:2> *addr
   drivers/usb/gadget/udc/fsl_qe_udc.c:506:42: sparse:     got restricted __be16 [noderef] <asn:2> *
   drivers/usb/gadget/udc/fsl_qe_udc.c:770:25: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected unsigned short const volatile [noderef] [usertype] <asn:2> *addr @@     got restricted __be16 [noderef] <asn:2> * @@
   drivers/usb/gadget/udc/fsl_qe_udc.c:770:25: sparse:     expected unsigned short const volatile [noderef] [usertype] <asn:2> *addr
   drivers/usb/gadget/udc/fsl_qe_udc.c:770:25: sparse:     got restricted __be16 [noderef] <asn:2> *
   drivers/usb/gadget/udc/fsl_qe_udc.c:771:30: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected unsigned short volatile [noderef] [usertype] <asn:2> *addr @@     got restricted __be16 [noderef] <asn:2> * @@
   drivers/usb/gadget/udc/fsl_qe_udc.c:771:30: sparse:     expected unsigned short volatile [noderef] [usertype] <asn:2> *addr
   drivers/usb/gadget/udc/fsl_qe_udc.c:771:30: sparse:     got restricted __be16 [noderef] <asn:2> *
   drivers/usb/gadget/udc/fsl_qe_udc.c:836:68: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected unsigned int const volatile [noderef] [usertype] <asn:2> *addr @@     got restricted __be32 [noderef] <asn:2> * @@
   drivers/usb/gadget/udc/fsl_qe_udc.c:836:68: sparse:     expected unsigned int const volatile [noderef] [usertype] <asn:2> *addr
   drivers/usb/gadget/udc/fsl_qe_udc.c:836:68: sparse:     got restricted __be32 [noderef] <asn:2> *
   drivers/usb/gadget/udc/fsl_qe_udc.c:964:68: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected unsigned int const volatile [noderef] [usertype] <asn:2> *addr @@     got restricted __be32 [noderef] <asn:2> * @@
   drivers/usb/gadget/udc/fsl_qe_udc.c:964:68: sparse:     expected unsigned int const volatile [noderef] [usertype] <asn:2> *addr
   drivers/usb/gadget/udc/fsl_qe_udc.c:964:68: sparse:     got restricted __be32 [noderef] <asn:2> *
   drivers/usb/gadget/udc/fsl_qe_udc.c:1074:33: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected unsigned short const volatile [noderef] [usertype] <asn:2> *addr @@     got restricted __be16 [noderef] <asn:2> * @@
   drivers/usb/gadget/udc/fsl_qe_udc.c:1074:33: sparse:     expected unsigned short const volatile [noderef] [usertype] <asn:2> *addr
   drivers/usb/gadget/udc/fsl_qe_udc.c:1074:33: sparse:     got restricted __be16 [noderef] <asn:2> *
   drivers/usb/gadget/udc/fsl_qe_udc.c:1075:22: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected unsigned short volatile [noderef] [usertype] <asn:2> *addr @@     got restricted __be16 [noderef] <asn:2> * @@
   drivers/usb/gadget/udc/fsl_qe_udc.c:1075:22: sparse:     expected unsigned short volatile [noderef] [usertype] <asn:2> *addr
   drivers/usb/gadget/udc/fsl_qe_udc.c:1075:22: sparse:     got restricted __be16 [noderef] <asn:2> *
   drivers/usb/gadget/udc/fsl_qe_udc.c:1089:27: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected unsigned int volatile [noderef] [usertype] <asn:2> *addr @@     got restricted __be32 [noderef] <asn:2> * @@
   drivers/usb/gadget/udc/fsl_qe_udc.c:1089:27: sparse:     expected unsigned int volatile [noderef] [usertype] <asn:2> *addr
   drivers/usb/gadget/udc/fsl_qe_udc.c:1089:27: sparse:     got restricted __be32 [noderef] <asn:2> *
   drivers/usb/gadget/udc/fsl_qe_udc.c:1114:30: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected unsigned short volatile [noderef] [usertype] <asn:2> *addr @@     got restricted __be16 [noderef] <asn:2> * @@
   drivers/usb/gadget/udc/fsl_qe_udc.c:1114:30: sparse:     expected unsigned short volatile [noderef] [usertype] <asn:2> *addr
   drivers/usb/gadget/udc/fsl_qe_udc.c:1114:30: sparse:     got restricted __be16 [noderef] <asn:2> *
   drivers/usb/gadget/udc/fsl_qe_udc.c:1124:30: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected unsigned short volatile [noderef] [usertype] <asn:2> *addr @@     got restricted __be16 [noderef] <asn:2> * @@
   drivers/usb/gadget/udc/fsl_qe_udc.c:1124:30: sparse:     expected unsigned short volatile [noderef] [usertype] <asn:2> *addr
   drivers/usb/gadget/udc/fsl_qe_udc.c:1124:30: sparse:     got restricted __be16 [noderef] <asn:2> *
   drivers/usb/gadget/udc/fsl_qe_udc.c:1367:27: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected unsigned int volatile [noderef] [usertype] <asn:2> *addr @@     got restricted __be32 [noderef] <asn:2> * @@
   drivers/usb/gadget/udc/fsl_qe_udc.c:1367:27: sparse:     expected unsigned int volatile [noderef] [usertype] <asn:2> *addr
   drivers/usb/gadget/udc/fsl_qe_udc.c:1367:27: sparse:     got restricted __be32 [noderef] <asn:2> *
   drivers/usb/gadget/udc/fsl_qe_udc.c:1431:27: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected unsigned int volatile [noderef] [usertype] <asn:2> *addr @@     got restricted __be32 [noderef] <asn:2> * @@
   drivers/usb/gadget/udc/fsl_qe_udc.c:1431:27: sparse:     expected unsigned int volatile [noderef] [usertype] <asn:2> *addr
   drivers/usb/gadget/udc/fsl_qe_udc.c:1431:27: sparse:     got restricted __be32 [noderef] <asn:2> *
   drivers/usb/gadget/udc/fsl_qe_udc.c:1490:60: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected unsigned int const volatile [noderef] [usertype] <asn:2> *addr @@     got restricted __be32 [noderef] <asn:2> * @@
   drivers/usb/gadget/udc/fsl_qe_udc.c:1490:60: sparse:     expected unsigned int const volatile [noderef] [usertype] <asn:2> *addr
   drivers/usb/gadget/udc/fsl_qe_udc.c:1490:60: sparse:     got restricted __be32 [noderef] <asn:2> *
   drivers/usb/gadget/udc/fsl_qe_udc.c:2287:22: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected unsigned short volatile [noderef] [usertype] <asn:2> *addr @@     got restricted __be16 [noderef] <asn:2> * @@
   drivers/usb/gadget/udc/fsl_qe_udc.c:2287:22: sparse:     expected unsigned short volatile [noderef] [usertype] <asn:2> *addr
   drivers/usb/gadget/udc/fsl_qe_udc.c:2287:22: sparse:     got restricted __be16 [noderef] <asn:2> *
   drivers/usb/gadget/udc/fsl_qe_udc.c:2288:22: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected unsigned short volatile [noderef] [usertype] <asn:2> *addr @@     got restricted __be16 [noderef] <asn:2> * @@
   drivers/usb/gadget/udc/fsl_qe_udc.c:2288:22: sparse:     expected unsigned short volatile [noderef] [usertype] <asn:2> *addr
   drivers/usb/gadget/udc/fsl_qe_udc.c:2288:22: sparse:     got restricted __be16 [noderef] <asn:2> *
   drivers/usb/gadget/udc/fsl_qe_udc.c:1960:56: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected unsigned short const volatile [noderef] [usertype] <asn:2> *addr @@     got restricted __be16 [noderef] <asn:2> * @@
   drivers/usb/gadget/udc/fsl_qe_udc.c:1960:56: sparse:     expected unsigned short const volatile [noderef] [usertype] <asn:2> *addr
   drivers/usb/gadget/udc/fsl_qe_udc.c:1960:56: sparse:     got restricted __be16 [noderef] <asn:2> *
   drivers/usb/gadget/udc/fsl_qe_udc.c:1978:30: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned short [usertype] @@     got restricted __le16 [usertype] @@
   drivers/usb/gadget/udc/fsl_qe_udc.c:1978:30: sparse:     expected unsigned short [usertype]
   drivers/usb/gadget/udc/fsl_qe_udc.c:1978:30: sparse:     got restricted __le16 [usertype]
   drivers/usb/gadget/udc/fsl_qe_udc.c:2174:62: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected unsigned int const volatile [noderef] [usertype] <asn:2> *addr @@     got restricted __be32 [noderef] <asn:2> * @@
   drivers/usb/gadget/udc/fsl_qe_udc.c:2174:62: sparse:     expected unsigned int const volatile [noderef] [usertype] <asn:2> *addr
   drivers/usb/gadget/udc/fsl_qe_udc.c:2174:62: sparse:     got restricted __be32 [noderef] <asn:2> *
   drivers/usb/gadget/udc/fsl_qe_udc.c:2199:62: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected unsigned int const volatile [noderef] [usertype] <asn:2> *addr @@     got restricted __be32 [noderef] <asn:2> * @@
   drivers/usb/gadget/udc/fsl_qe_udc.c:2199:62: sparse:     expected unsigned int const volatile [noderef] [usertype] <asn:2> *addr
   drivers/usb/gadget/udc/fsl_qe_udc.c:2199:62: sparse:     got restricted __be32 [noderef] <asn:2> *
   drivers/usb/gadget/udc/fsl_qe_udc.c:2220:31: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected unsigned short const volatile [noderef] [usertype] <asn:2> *addr @@     got restricted __be16 [noderef] <asn:2> * @@
   drivers/usb/gadget/udc/fsl_qe_udc.c:2220:31: sparse:     expected unsigned short const volatile [noderef] [usertype] <asn:2> *addr
   drivers/usb/gadget/udc/fsl_qe_udc.c:2220:31: sparse:     got restricted __be16 [noderef] <asn:2> *
   drivers/usb/gadget/udc/fsl_qe_udc.c:2221:29: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected unsigned short const volatile [noderef] [usertype] <asn:2> *addr @@     got restricted __be16 [noderef] <asn:2> * @@
   drivers/usb/gadget/udc/fsl_qe_udc.c:2221:29: sparse:     expected unsigned short const volatile [noderef] [usertype] <asn:2> *addr
   drivers/usb/gadget/udc/fsl_qe_udc.c:2221:29: sparse:     got restricted __be16 [noderef] <asn:2> *
   drivers/usb/gadget/udc/fsl_qe_udc.c:2223:22: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected unsigned short volatile [noderef] [usertype] <asn:2> *addr @@     got restricted __be16 [noderef] <asn:2> * @@
   drivers/usb/gadget/udc/fsl_qe_udc.c:2223:22: sparse:     expected unsigned short volatile [noderef] [usertype] <asn:2> *addr
   drivers/usb/gadget/udc/fsl_qe_udc.c:2223:22: sparse:     got restricted __be16 [noderef] <asn:2> *
   drivers/usb/gadget/udc/fsl_qe_udc.c:2343:16: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int [usertype] offset @@     got restricted __be32 const [usertype] @@
   drivers/usb/gadget/udc/fsl_qe_udc.c:2343:16: sparse:     expected unsigned int [usertype] offset
   drivers/usb/gadget/udc/fsl_qe_udc.c:2343:16: sparse:     got restricted __be32 const [usertype]
   drivers/usb/gadget/udc/fsl_qe_udc.c:2390:19: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected unsigned short volatile [noderef] [usertype] <asn:2> *addr @@     got restricted __be16 [noderef] <asn:2> * @@
   drivers/usb/gadget/udc/fsl_qe_udc.c:2390:19: sparse:     expected unsigned short volatile [noderef] [usertype] <asn:2> *addr
   drivers/usb/gadget/udc/fsl_qe_udc.c:2390:19: sparse:     got restricted __be16 [noderef] <asn:2> *
   drivers/usb/gadget/udc/fsl_qe_udc.c:2392:19: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected unsigned short volatile [noderef] [usertype] <asn:2> *addr @@     got restricted __be16 [noderef] <asn:2> * @@
   drivers/usb/gadget/udc/fsl_qe_udc.c:2392:19: sparse:     expected unsigned short volatile [noderef] [usertype] <asn:2> *addr
   drivers/usb/gadget/udc/fsl_qe_udc.c:2392:19: sparse:     got restricted __be16 [noderef] <asn:2> *
>> drivers/usb/gadget/udc/fsl_qe_udc.c:837:33: sparse: sparse: non size-preserving integer to pointer cast
   drivers/usb/gadget/udc/fsl_qe_udc.c:965:33: sparse: sparse: non size-preserving integer to pointer cast
   drivers/usb/gadget/udc/fsl_qe_udc.c:1491:25: sparse: sparse: non size-preserving integer to pointer cast
   drivers/usb/gadget/udc/fsl_qe_udc.c:2071:28: sparse: sparse: context imbalance in 'setup_received_handle' - unexpected unlock

vim +837 drivers/usb/gadget/udc/fsl_qe_udc.c

3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02  807  
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02  808  static int qe_ep0_rx(struct qe_udc *udc)
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02  809  {
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02  810  	struct qe_ep *ep = &udc->eps[0];
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02  811  	struct qe_frame *pframe;
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02  812  	struct qe_bd __iomem *bd;
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02  813  	u32 bdstatus, length;
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02  814  	u32 vaddr;
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02  815  
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02  816  	pframe = ep->rxframe;
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02  817  
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02  818  	if (ep->dir == USB_DIR_IN) {
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02  819  		dev_err(udc->dev, "ep0 not a control endpoint\n");
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02  820  		return -EINVAL;
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02  821  	}
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02  822  
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02  823  	bd = ep->n_rxbd;
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02  824  	bdstatus = in_be32((u32 __iomem *)bd);
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02  825  	length = bdstatus & BD_LENGTH_MASK;
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02  826  
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02  827  	while (!(bdstatus & R_E) && length) {
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02  828  		if ((bdstatus & R_F) && (bdstatus & R_L)
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02  829  			&& !(bdstatus & R_ERROR)) {
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02  830  			if (length == USB_CRC_SIZE) {
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02  831  				udc->ep0_state = WAIT_FOR_SETUP;
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02  832  				dev_vdbg(udc->dev,
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02  833  					"receive a ZLP in status phase\n");
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02  834  			} else {
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02  835  				qe_frame_clean(pframe);
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02  836  				vaddr = (u32)phys_to_virt(in_be32(&bd->buf));
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02 @837  				frame_set_data(pframe, (u8 *)vaddr);
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02  838  				frame_set_length(pframe,
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02  839  						(length - USB_CRC_SIZE));
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02  840  				frame_set_status(pframe, FRAME_OK);
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02  841  				switch (bdstatus & R_PID) {
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02  842  				case R_PID_SETUP:
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02  843  					frame_set_info(pframe, PID_SETUP);
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02  844  					break;
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02  845  				case R_PID_DATA1:
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02  846  					frame_set_info(pframe, PID_DATA1);
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02  847  					break;
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02  848  				default:
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02  849  					frame_set_info(pframe, PID_DATA0);
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02  850  					break;
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02  851  				}
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02  852  
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02  853  				if ((bdstatus & R_PID) == R_PID_SETUP)
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02  854  					ep0_setup_handle(udc);
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02  855  				else
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02  856  					qe_ep_rxframe_handle(ep);
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02  857  			}
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02  858  		} else {
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02  859  			dev_err(udc->dev, "The receive frame with error!\n");
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02  860  		}
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02  861  
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02  862  		/* note: don't clear the rxbd's buffer address */
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02  863  		recycle_one_rxbd(ep);
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02  864  
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02  865  		/* Get next BD */
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02  866  		if (bdstatus & R_W)
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02  867  			bd = ep->rxbase;
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02  868  		else
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02  869  			bd++;
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02  870  
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02  871  		bdstatus = in_be32((u32 __iomem *)bd);
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02  872  		length = bdstatus & BD_LENGTH_MASK;
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02  873  
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02  874  	}
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02  875  
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02  876  	ep->n_rxbd = bd;
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02  877  
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02  878  	return 0;
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02  879  }
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02  880  

:::::: The code at line 837 was first introduced by commit
:::::: 3948f0e0c999a6201e9898bb8fbe3c6cc1199276 usb: add Freescale QE/CPM USB peripheral controller driver

:::::: TO: Li Yang <leoli@...escale.com>
:::::: CC: Greg Kroah-Hartman <gregkh@...e.de>

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

Download attachment ".config.gz" of type "application/gzip" (22237 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ