public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Ondrej Zary <linux@rainbow-software.org>
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org,
	Andy Shevchenko <andy.shevchenko@gmail.com>
Subject: drivers/net/ethernet/dlink/dl2k.c:483:17: sparse: sparse: incorrect type in argument 1 (different base types)
Date: Sun, 3 Dec 2023 14:31:37 +0800	[thread overview]
Message-ID: <202312030058.hfZPTXd7-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   815fb87b753055df2d9e50f6cd80eb10235fe3e9
commit: c3f45d322cbd379c46466cc2ecab7e2d719b22ed dl2k: Add support for IP1000A-based cards
date:   8 years ago
config: s390-randconfig-r121-20231106 (https://download.01.org/0day-ci/archive/20231203/202312030058.hfZPTXd7-lkp@intel.com/config)
compiler: s390-linux-gcc (GCC) 13.2.0
reproduce: (https://download.01.org/0day-ci/archive/20231203/202312030058.hfZPTXd7-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
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202312030058.hfZPTXd7-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
>> drivers/net/ethernet/dlink/dl2k.c:483:17: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected unsigned short [usertype] value @@     got restricted __le16 [usertype] @@
   drivers/net/ethernet/dlink/dl2k.c:483:17: sparse:     expected unsigned short [usertype] value
   drivers/net/ethernet/dlink/dl2k.c:483:17: sparse:     got restricted __le16 [usertype]
   drivers/net/ethernet/dlink/dl2k.c:366:35: sparse: sparse: restricted __le32 degrades to integer
   drivers/net/ethernet/dlink/dl2k.c: note: in included file (through arch/s390/include/asm/io.h, include/linux/io.h, include/linux/pci.h, ...):
   include/asm-generic/io.h:155:22: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected unsigned short [usertype] val @@     got restricted __le16 [usertype] @@
   include/asm-generic/io.h:155:22: sparse:     expected unsigned short [usertype] val
   include/asm-generic/io.h:155:22: sparse:     got restricted __le16 [usertype]
   include/asm-generic/io.h:121:16: sparse: sparse: cast to restricted __le16
   include/asm-generic/io.h:121:16: sparse: sparse: cast to restricted __le16
   include/asm-generic/io.h:121:16: sparse: sparse: cast to restricted __le16
   include/asm-generic/io.h:121:16: sparse: sparse: cast to restricted __le16
   include/asm-generic/io.h:129:16: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:129:16: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:129:16: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:129:16: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:129:16: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:129:16: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:163:22: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected unsigned int [usertype] val @@     got restricted __le32 [usertype] @@
   include/asm-generic/io.h:163:22: sparse:     expected unsigned int [usertype] val
   include/asm-generic/io.h:163:22: sparse:     got restricted __le32 [usertype]
   include/asm-generic/io.h:155:22: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected unsigned short [usertype] val @@     got restricted __le16 [usertype] @@
   include/asm-generic/io.h:155:22: sparse:     expected unsigned short [usertype] val
   include/asm-generic/io.h:155:22: sparse:     got restricted __le16 [usertype]
   include/asm-generic/io.h:129:16: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:129:16: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:129:16: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:129:16: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:129:16: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:129:16: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:163:22: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected unsigned int [usertype] val @@     got restricted __le32 [usertype] @@
   include/asm-generic/io.h:163:22: sparse:     expected unsigned int [usertype] val
   include/asm-generic/io.h:163:22: sparse:     got restricted __le32 [usertype]
   include/asm-generic/io.h:155:22: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected unsigned short [usertype] val @@     got restricted __le16 [usertype] @@
   include/asm-generic/io.h:155:22: sparse:     expected unsigned short [usertype] val
   include/asm-generic/io.h:155:22: sparse:     got restricted __le16 [usertype]
   include/asm-generic/io.h:155:22: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected unsigned short [usertype] val @@     got restricted __le16 [usertype] @@
   include/asm-generic/io.h:155:22: sparse:     expected unsigned short [usertype] val
   include/asm-generic/io.h:155:22: sparse:     got restricted __le16 [usertype]
   include/asm-generic/io.h:163:22: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected unsigned int [usertype] val @@     got restricted __le32 [usertype] @@
   include/asm-generic/io.h:163:22: sparse:     expected unsigned int [usertype] val
   include/asm-generic/io.h:163:22: sparse:     got restricted __le32 [usertype]
   include/asm-generic/io.h:163:22: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected unsigned int [usertype] val @@     got restricted __le32 [usertype] @@
   include/asm-generic/io.h:163:22: sparse:     expected unsigned int [usertype] val
   include/asm-generic/io.h:163:22: sparse:     got restricted __le32 [usertype]
   include/asm-generic/io.h:129:16: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:129:16: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:129:16: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:129:16: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:129:16: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:129:16: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:163:22: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected unsigned int [usertype] val @@     got restricted __le32 [usertype] @@
   include/asm-generic/io.h:163:22: sparse:     expected unsigned int [usertype] val
   include/asm-generic/io.h:163:22: sparse:     got restricted __le32 [usertype]
   include/asm-generic/io.h:155:22: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected unsigned short [usertype] val @@     got restricted __le16 [usertype] @@
   include/asm-generic/io.h:155:22: sparse:     expected unsigned short [usertype] val
   include/asm-generic/io.h:155:22: sparse:     got restricted __le16 [usertype]
   include/asm-generic/io.h:163:22: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected unsigned int [usertype] val @@     got restricted __le32 [usertype] @@
   include/asm-generic/io.h:163:22: sparse:     expected unsigned int [usertype] val
   include/asm-generic/io.h:163:22: sparse:     got restricted __le32 [usertype]
   include/asm-generic/io.h:129:16: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:129:16: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:129:16: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:129:16: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:129:16: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:129:16: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:163:22: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected unsigned int [usertype] val @@     got restricted __le32 [usertype] @@
   include/asm-generic/io.h:163:22: sparse:     expected unsigned int [usertype] val
   include/asm-generic/io.h:163:22: sparse:     got restricted __le32 [usertype]
   include/asm-generic/io.h:129:16: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:129:16: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:129:16: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:129:16: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:129:16: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:129:16: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:163:22: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected unsigned int [usertype] val @@     got restricted __le32 [usertype] @@
   include/asm-generic/io.h:163:22: sparse:     expected unsigned int [usertype] val
   include/asm-generic/io.h:163:22: sparse:     got restricted __le32 [usertype]
   include/asm-generic/io.h:155:22: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected unsigned short [usertype] val @@     got restricted __le16 [usertype] @@
   include/asm-generic/io.h:155:22: sparse:     expected unsigned short [usertype] val
   include/asm-generic/io.h:155:22: sparse:     got restricted __le16 [usertype]
   include/asm-generic/io.h:129:16: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:129:16: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:129:16: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:129:16: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:129:16: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:129:16: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:163:22: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected unsigned int [usertype] val @@     got restricted __le32 [usertype] @@
   include/asm-generic/io.h:163:22: sparse:     expected unsigned int [usertype] val
   include/asm-generic/io.h:163:22: sparse:     got restricted __le32 [usertype]
   include/asm-generic/io.h:163:22: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected unsigned int [usertype] val @@     got restricted __le32 [usertype] @@
   include/asm-generic/io.h:163:22: sparse:     expected unsigned int [usertype] val
   include/asm-generic/io.h:163:22: sparse:     got restricted __le32 [usertype]
   include/asm-generic/io.h:129:16: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:129:16: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:129:16: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:129:16: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:129:16: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:129:16: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:163:22: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected unsigned int [usertype] val @@     got restricted __le32 [usertype] @@
   include/asm-generic/io.h:163:22: sparse:     expected unsigned int [usertype] val

vim +483 drivers/net/ethernet/dlink/dl2k.c

   448	
   449	static int
   450	rio_open (struct net_device *dev)
   451	{
   452		struct netdev_private *np = netdev_priv(dev);
   453		void __iomem *ioaddr = np->ioaddr;
   454		const int irq = np->pdev->irq;
   455		int i;
   456		u16 macctrl;
   457	
   458		i = request_irq(irq, rio_interrupt, IRQF_SHARED, dev->name, dev);
   459		if (i)
   460			return i;
   461	
   462		/* Reset all logic functions */
   463		dw16(ASICCtrl + 2,
   464		     GlobalReset | DMAReset | FIFOReset | NetworkReset | HostReset);
   465		mdelay(10);
   466	
   467		rio_set_led_mode(dev);
   468	
   469		/* DebugCtrl bit 4, 5, 9 must set */
   470		dw32(DebugCtrl, dr32(DebugCtrl) | 0x0230);
   471	
   472		/* Jumbo frame */
   473		if (np->jumbo != 0)
   474			dw16(MaxFrameSize, MAX_JUMBO+14);
   475	
   476		alloc_list (dev);
   477	
   478		/* Set station address */
   479		/* 16 or 32-bit access is required by TC9020 datasheet but 8-bit works
   480		 * too. However, it doesn't work on IP1000A so we use 16-bit access.
   481		 */
   482		for (i = 0; i < 3; i++)
 > 483			dw16(StationAddr0 + 2 * i,
   484			     cpu_to_le16(((u16 *)dev->dev_addr)[i]));
   485	
   486		set_multicast (dev);
   487		if (np->coalesce) {
   488			dw32(RxDMAIntCtrl, np->rx_coalesce | np->rx_timeout << 16);
   489		}
   490		/* Set RIO to poll every N*320nsec. */
   491		dw8(RxDMAPollPeriod, 0x20);
   492		dw8(TxDMAPollPeriod, 0xff);
   493		dw8(RxDMABurstThresh, 0x30);
   494		dw8(RxDMAUrgentThresh, 0x30);
   495		dw32(RmonStatMask, 0x0007ffff);
   496		/* clear statistics */
   497		clear_stats (dev);
   498	
   499		/* VLAN supported */
   500		if (np->vlan) {
   501			/* priority field in RxDMAIntCtrl  */
   502			dw32(RxDMAIntCtrl, dr32(RxDMAIntCtrl) | 0x7 << 10);
   503			/* VLANId */
   504			dw16(VLANId, np->vlan);
   505			/* Length/Type should be 0x8100 */
   506			dw32(VLANTag, 0x8100 << 16 | np->vlan);
   507			/* Enable AutoVLANuntagging, but disable AutoVLANtagging.
   508			   VLAN information tagged by TFC' VID, CFI fields. */
   509			dw32(MACCtrl, dr32(MACCtrl) | AutoVLANuntagging);
   510		}
   511	
   512		setup_timer(&np->timer, rio_timer, (unsigned long)dev);
   513		np->timer.expires = jiffies + 1*HZ;
   514		add_timer (&np->timer);
   515	
   516		/* Start Tx/Rx */
   517		dw32(MACCtrl, dr32(MACCtrl) | StatsEnable | RxEnable | TxEnable);
   518	
   519		macctrl = 0;
   520		macctrl |= (np->vlan) ? AutoVLANuntagging : 0;
   521		macctrl |= (np->full_duplex) ? DuplexSelect : 0;
   522		macctrl |= (np->tx_flow) ? TxFlowControlEnable : 0;
   523		macctrl |= (np->rx_flow) ? RxFlowControlEnable : 0;
   524		dw16(MACCtrl, macctrl);
   525	
   526		netif_start_queue (dev);
   527	
   528		dl2k_enable_int(np);
   529		return 0;
   530	}
   531	

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

                 reply	other threads:[~2023-12-03  6:32 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=202312030058.hfZPTXd7-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=andy.shevchenko@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@rainbow-software.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    /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