All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Peter Chen <peter.chen@cixtech.com>
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org,
	Arnd Bergmann <arnd@arndb.de>
Subject: drivers/usb/cdns3/cdnsp-gadget.c:168:9: sparse: sparse: cast from restricted __le32
Date: Sat, 18 Jul 2026 15:49:42 +0800	[thread overview]
Message-ID: <202607181505.CVpdSKHV-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   94515f3a7d4256a5062176b7d6ed0471938cd51a
commit: e4d7362dc9cd50b0fc74c8649aa241376c48936c usb: cdns3: Add USBSSP platform driver support
date:   3 months ago
config: arc-randconfig-r123-20260716 (https://download.01.org/0day-ci/archive/20260718/202607181505.CVpdSKHV-lkp@intel.com/config)
compiler: arc-linux-gcc (GCC) 11.5.0
sparse: v0.6.5-rc1
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260718/202607181505.CVpdSKHV-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Fixes: e4d7362dc9cd ("usb: cdns3: Add USBSSP platform driver support")
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202607181505.CVpdSKHV-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
   drivers/usb/cdns3/cdnsp-gadget.c:166:16: sparse: sparse: cast to restricted __le32
   drivers/usb/cdns3/cdnsp-gadget.c:166:16: sparse: sparse: cast to restricted __le32
   drivers/usb/cdns3/cdnsp-gadget.c:166:16: sparse: sparse: cast to restricted __le32
   drivers/usb/cdns3/cdnsp-gadget.c:166:16: sparse: sparse: cast to restricted __le32
   drivers/usb/cdns3/cdnsp-gadget.c:166:16: sparse: sparse: cast to restricted __le32
   drivers/usb/cdns3/cdnsp-gadget.c:166:16: sparse: sparse: cast to restricted __le32
   drivers/usb/cdns3/cdnsp-gadget.c:168:9: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected unsigned int [usertype] val @@     got restricted __le32 [usertype] @@
   drivers/usb/cdns3/cdnsp-gadget.c:168:9: sparse:     expected unsigned int [usertype] val
   drivers/usb/cdns3/cdnsp-gadget.c:168:9: sparse:     got restricted __le32 [usertype]
>> drivers/usb/cdns3/cdnsp-gadget.c:168:9: sparse: sparse: cast from restricted __le32
>> drivers/usb/cdns3/cdnsp-gadget.c:168:9: sparse: sparse: cast from restricted __le32
>> drivers/usb/cdns3/cdnsp-gadget.c:168:9: sparse: sparse: cast from restricted __le32
>> drivers/usb/cdns3/cdnsp-gadget.c:168:9: sparse: sparse: cast from restricted __le32

vim +168 drivers/usb/cdns3/cdnsp-gadget.c

3d82904559f4f5 Pawel Laszczak 2020-12-07  150  
241e2ce88e5a49 Pawel Laszczak 2025-04-18  151  static void cdnsp_set_apb_timeout_value(struct cdnsp_device *pdev)
241e2ce88e5a49 Pawel Laszczak 2025-04-18  152  {
241e2ce88e5a49 Pawel Laszczak 2025-04-18  153  	struct cdns *cdns = dev_get_drvdata(pdev->dev);
241e2ce88e5a49 Pawel Laszczak 2025-04-18  154  	__le32 __iomem *reg;
241e2ce88e5a49 Pawel Laszczak 2025-04-18  155  	void __iomem *base;
241e2ce88e5a49 Pawel Laszczak 2025-04-18  156  	u32 offset = 0;
241e2ce88e5a49 Pawel Laszczak 2025-04-18  157  	u32 val;
241e2ce88e5a49 Pawel Laszczak 2025-04-18  158  
241e2ce88e5a49 Pawel Laszczak 2025-04-18  159  	if (!cdns->override_apb_timeout)
241e2ce88e5a49 Pawel Laszczak 2025-04-18  160  		return;
241e2ce88e5a49 Pawel Laszczak 2025-04-18  161  
241e2ce88e5a49 Pawel Laszczak 2025-04-18  162  	base = &pdev->cap_regs->hc_capbase;
241e2ce88e5a49 Pawel Laszczak 2025-04-18  163  	offset = cdnsp_find_next_ext_cap(base, offset, D_XEC_PRE_REGS_CAP);
241e2ce88e5a49 Pawel Laszczak 2025-04-18  164  	reg = base + offset + REG_CHICKEN_BITS_3_OFFSET;
241e2ce88e5a49 Pawel Laszczak 2025-04-18  165  
241e2ce88e5a49 Pawel Laszczak 2025-04-18 @166  	val  = le32_to_cpu(readl(reg));
241e2ce88e5a49 Pawel Laszczak 2025-04-18  167  	val = CHICKEN_APB_TIMEOUT_SET(val, cdns->override_apb_timeout);
241e2ce88e5a49 Pawel Laszczak 2025-04-18 @168  	writel(cpu_to_le32(val), reg);
241e2ce88e5a49 Pawel Laszczak 2025-04-18  169  }
241e2ce88e5a49 Pawel Laszczak 2025-04-18  170  

:::::: The code at line 168 was first introduced by commit
:::::: 241e2ce88e5a494be7a5d44c0697592f1632fbee usb: cdnsp: Fix issue with resuming from L1

:::::: TO: Pawel Laszczak <pawell@cadence.com>
:::::: CC: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

             reply	other threads:[~2026-07-18  7:50 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-18  7:49 kernel test robot [this message]
2026-07-18  9:30 ` drivers/usb/cdns3/cdnsp-gadget.c:168:9: sparse: sparse: cast from restricted __le32 Arnd Bergmann

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=202607181505.CVpdSKHV-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=arnd@arndb.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=peter.chen@cixtech.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.