public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Greg Ungerer <gerg@linux-m68k.org>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
	Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Subject: drivers/usb/isp1760/isp1760-udc.c:270:17: sparse: sparse: incorrect type in assignment (different base types)
Date: Tue, 18 Aug 2020 20:44:33 +0800	[thread overview]
Message-ID: <202008182027.7hXEPrZe%lkp@intel.com> (raw)

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   06a4ec1d9dc652e17ee3ac2ceb6c7cf6c2b75cdd
commit: 005b73d0dd83c9cb9420a196bea8070cde30ecac m68knommu: __force type casts for raw IO access
date:   3 weeks ago
config: m68k-randconfig-s031-20200818 (attached as .config)
compiler: m68k-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.2-180-g49f7e13a-dirty
        git checkout 005b73d0dd83c9cb9420a196bea8070cde30ecac
        # 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=m68k 

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/isp1760/isp1760-udc.c:212:24: sparse: sparse: cast to restricted __le32
   drivers/usb/isp1760/isp1760-udc.c:212:24: sparse: sparse: cast to restricted __le32
   drivers/usb/isp1760/isp1760-udc.c:212:24: sparse: sparse: cast to restricted __le32
   drivers/usb/isp1760/isp1760-udc.c:212:24: sparse: sparse: cast to restricted __le32
   drivers/usb/isp1760/isp1760-udc.c:212:24: sparse: sparse: cast to restricted __le32
   drivers/usb/isp1760/isp1760-udc.c:212:24: sparse: sparse: cast to restricted __le32
   drivers/usb/isp1760/isp1760-udc.c:214:31: sparse: sparse: cast to restricted __le16
   drivers/usb/isp1760/isp1760-udc.c:214:31: sparse: sparse: cast to restricted __le16
   drivers/usb/isp1760/isp1760-udc.c:214:31: sparse: sparse: cast to restricted __le16
   drivers/usb/isp1760/isp1760-udc.c:214:31: sparse: sparse: cast to restricted __le16
   drivers/usb/isp1760/isp1760-udc.c:268:53: sparse: sparse: incorrect type in argument 3 (different base types) @@     expected unsigned int [usertype] val @@     got restricted __le32 [usertype] @@
   drivers/usb/isp1760/isp1760-udc.c:268:53: sparse:     expected unsigned int [usertype] val
   drivers/usb/isp1760/isp1760-udc.c:268:53: sparse:     got restricted __le32 [usertype]
>> drivers/usb/isp1760/isp1760-udc.c:270:17: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned short volatile [usertype] @@     got restricted __le16 [usertype] @@
>> drivers/usb/isp1760/isp1760-udc.c:270:17: sparse:     expected unsigned short volatile [usertype]
   drivers/usb/isp1760/isp1760-udc.c:270:17: sparse:     got restricted __le16 [usertype]
   drivers/usb/isp1760/isp1760-udc.c:485:9: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned short volatile [usertype] @@     got restricted __le16 [usertype] @@
   drivers/usb/isp1760/isp1760-udc.c:485:9: sparse:     expected unsigned short volatile [usertype]
   drivers/usb/isp1760/isp1760-udc.c:485:9: sparse:     got restricted __le16 [usertype]

# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=005b73d0dd83c9cb9420a196bea8070cde30ecac
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 005b73d0dd83c9cb9420a196bea8070cde30ecac
vim +270 drivers/usb/isp1760/isp1760-udc.c

0316ca6319b98e4 drivers/usb/host/isp1760-udc.c Laurent Pinchart 2015-01-21  241  
0316ca6319b98e4 drivers/usb/host/isp1760-udc.c Laurent Pinchart 2015-01-21  242  static void isp1760_udc_transmit(struct isp1760_ep *ep,
0316ca6319b98e4 drivers/usb/host/isp1760-udc.c Laurent Pinchart 2015-01-21  243  				 struct isp1760_request *req)
0316ca6319b98e4 drivers/usb/host/isp1760-udc.c Laurent Pinchart 2015-01-21  244  {
0316ca6319b98e4 drivers/usb/host/isp1760-udc.c Laurent Pinchart 2015-01-21  245  	struct isp1760_udc *udc = ep->udc;
0316ca6319b98e4 drivers/usb/host/isp1760-udc.c Laurent Pinchart 2015-01-21  246  	u32 *buf = req->req.buf + req->req.actual;
0316ca6319b98e4 drivers/usb/host/isp1760-udc.c Laurent Pinchart 2015-01-21  247  	int i;
0316ca6319b98e4 drivers/usb/host/isp1760-udc.c Laurent Pinchart 2015-01-21  248  
0316ca6319b98e4 drivers/usb/host/isp1760-udc.c Laurent Pinchart 2015-01-21  249  	req->packet_size = min(req->req.length - req->req.actual,
0316ca6319b98e4 drivers/usb/host/isp1760-udc.c Laurent Pinchart 2015-01-21  250  			       ep->maxpacket);
0316ca6319b98e4 drivers/usb/host/isp1760-udc.c Laurent Pinchart 2015-01-21  251  
0316ca6319b98e4 drivers/usb/host/isp1760-udc.c Laurent Pinchart 2015-01-21  252  	dev_dbg(udc->isp->dev, "%s: transferring %u bytes (%u/%u done)\n",
0316ca6319b98e4 drivers/usb/host/isp1760-udc.c Laurent Pinchart 2015-01-21  253  		__func__, req->packet_size, req->req.actual,
0316ca6319b98e4 drivers/usb/host/isp1760-udc.c Laurent Pinchart 2015-01-21  254  		req->req.length);
0316ca6319b98e4 drivers/usb/host/isp1760-udc.c Laurent Pinchart 2015-01-21  255  
0316ca6319b98e4 drivers/usb/host/isp1760-udc.c Laurent Pinchart 2015-01-21  256  	__isp1760_udc_select_ep(ep, USB_DIR_IN);
0316ca6319b98e4 drivers/usb/host/isp1760-udc.c Laurent Pinchart 2015-01-21  257  
0316ca6319b98e4 drivers/usb/host/isp1760-udc.c Laurent Pinchart 2015-01-21  258  	if (req->packet_size)
0316ca6319b98e4 drivers/usb/host/isp1760-udc.c Laurent Pinchart 2015-01-21  259  		isp1760_udc_write(udc, DC_BUFLEN, req->packet_size);
0316ca6319b98e4 drivers/usb/host/isp1760-udc.c Laurent Pinchart 2015-01-21  260  
0316ca6319b98e4 drivers/usb/host/isp1760-udc.c Laurent Pinchart 2015-01-21  261  	/*
0316ca6319b98e4 drivers/usb/host/isp1760-udc.c Laurent Pinchart 2015-01-21  262  	 * Make sure not to write more than one extra byte, otherwise extra data
0316ca6319b98e4 drivers/usb/host/isp1760-udc.c Laurent Pinchart 2015-01-21  263  	 * will stay in the FIFO and will be transmitted during the next control
0316ca6319b98e4 drivers/usb/host/isp1760-udc.c Laurent Pinchart 2015-01-21  264  	 * request. The endpoint control CLBUF bit is supposed to allow flushing
0316ca6319b98e4 drivers/usb/host/isp1760-udc.c Laurent Pinchart 2015-01-21  265  	 * the FIFO for this kind of conditions, but doesn't seem to work.
0316ca6319b98e4 drivers/usb/host/isp1760-udc.c Laurent Pinchart 2015-01-21  266  	 */
0316ca6319b98e4 drivers/usb/host/isp1760-udc.c Laurent Pinchart 2015-01-21  267  	for (i = req->packet_size; i > 2; i -= 4, ++buf)
0316ca6319b98e4 drivers/usb/host/isp1760-udc.c Laurent Pinchart 2015-01-21  268  		isp1760_udc_write(udc, DC_DATAPORT, cpu_to_le32(*buf));
0316ca6319b98e4 drivers/usb/host/isp1760-udc.c Laurent Pinchart 2015-01-21  269  	if (i > 0)
0316ca6319b98e4 drivers/usb/host/isp1760-udc.c Laurent Pinchart 2015-01-21 @270  		writew(cpu_to_le16(*(u16 *)buf), udc->regs + DC_DATAPORT);
0316ca6319b98e4 drivers/usb/host/isp1760-udc.c Laurent Pinchart 2015-01-21  271  
0316ca6319b98e4 drivers/usb/host/isp1760-udc.c Laurent Pinchart 2015-01-21  272  	if (ep->addr == 0)
0316ca6319b98e4 drivers/usb/host/isp1760-udc.c Laurent Pinchart 2015-01-21  273  		isp1760_udc_write(udc, DC_CTRLFUNC, DC_DSEN);
0316ca6319b98e4 drivers/usb/host/isp1760-udc.c Laurent Pinchart 2015-01-21  274  	if (!req->packet_size)
0316ca6319b98e4 drivers/usb/host/isp1760-udc.c Laurent Pinchart 2015-01-21  275  		isp1760_udc_write(udc, DC_CTRLFUNC, DC_VENDP);
0316ca6319b98e4 drivers/usb/host/isp1760-udc.c Laurent Pinchart 2015-01-21  276  }
0316ca6319b98e4 drivers/usb/host/isp1760-udc.c Laurent Pinchart 2015-01-21  277  

:::::: The code at line 270 was first introduced by commit
:::::: 0316ca6319b98e485325be98a47d08fed07ead43 usb: isp1760: Add device controller support

:::::: TO: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
:::::: CC: Felipe Balbi <balbi@ti.com>

---
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: 21945 bytes --]

             reply	other threads:[~2020-08-18 13:05 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-18 12:44 kernel test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2020-10-21  0:39 drivers/usb/isp1760/isp1760-udc.c:270:17: sparse: sparse: incorrect type in assignment (different base types) kernel test robot
2021-04-06  4:10 kernel test robot

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=202008182027.7hXEPrZe%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=gerg@linux-m68k.org \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luc.vanoostenryck@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox