From: kernel test robot <lkp@intel.com>
To: Emil Renner Berthing <kernel@esmil.dk>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [esmil:vsrv 4/7] drivers/net/ethernet/vlsi/vlsi-mac.c:202:9: sparse: sparse: incorrect type in argument 2 (different address spaces)
Date: Thu, 7 Aug 2025 22:00:15 +0800 [thread overview]
Message-ID: <202508072138.6KPhLRF4-lkp@intel.com> (raw)
tree: https://github.com/esmil/linux vsrv
head: 58e54ef4640355003af8e733da39cafa53ad38a9
commit: 17e17550692a1c7e7c8b2c8ddc155ccf02676e65 [4/7] net: vlsi: Add VLSI ethernet driver
config: sparc-randconfig-r121-20250807 (https://download.01.org/0day-ci/archive/20250807/202508072138.6KPhLRF4-lkp@intel.com/config)
compiler: sparc64-linux-gcc (GCC) 15.1.0
reproduce: (https://download.01.org/0day-ci/archive/20250807/202508072138.6KPhLRF4-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/202508072138.6KPhLRF4-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
>> drivers/net/ethernet/vlsi/vlsi-mac.c:202:9: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const * @@ got void [noderef] __iomem * @@
drivers/net/ethernet/vlsi/vlsi-mac.c:202:9: sparse: expected void const *
drivers/net/ethernet/vlsi/vlsi-mac.c:202:9: sparse: got void [noderef] __iomem *
>> drivers/net/ethernet/vlsi/vlsi-mac.c:214:38: sparse: sparse: cast removes address space '__iomem' of expression
>> drivers/net/ethernet/vlsi/vlsi-mac.c:554:50: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected unsigned int volatile [usertype] *rxbase @@ got void [noderef] __iomem * @@
drivers/net/ethernet/vlsi/vlsi-mac.c:554:50: sparse: expected unsigned int volatile [usertype] *rxbase
drivers/net/ethernet/vlsi/vlsi-mac.c:554:50: sparse: got void [noderef] __iomem *
>> drivers/net/ethernet/vlsi/vlsi-mac.c:805:49: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected unsigned int volatile [usertype] *txmem @@ got void [noderef] __iomem * @@
drivers/net/ethernet/vlsi/vlsi-mac.c:805:49: sparse: expected unsigned int volatile [usertype] *txmem
drivers/net/ethernet/vlsi/vlsi-mac.c:805:49: sparse: got void [noderef] __iomem *
vim +202 drivers/net/ethernet/vlsi/vlsi-mac.c
192
193 struct device *dev = kobj_to_dev(kobj);
194 struct vsrves01_private *db = dev_get_drvdata(dev);
195
196 if (offset > 512)
197 return -1;
198
199 if (offset + size > 512)
200 size = 512-offset;
201
> 202 memcpy(buf, db->membase + offset, size);
203
204 return size;
205 }
206
207 static ssize_t vsrves01_sysfs_set_regmem(struct file *file, struct kobject *kobj,
208 const struct bin_attribute *attr,
209 char *buf, loff_t offset,
210 size_t size)
211 {
212 struct device *dev = kobj_to_dev(kobj);
213 struct vsrves01_private *db = dev_get_drvdata(dev);
> 214 volatile uint32_t *ethmem = (void *)db->membase;
215 int ret = 0;
216
217 if (offset > 512)
218 return -1;
219
220 if (offset + size > 512)
221 size = 512-offset;
222
223 while (size > 0) {
224 uint32_t value;
225 uint32_t addr = (unsigned)offset >> 2;
226 uint32_t oldvalue = ethmem[addr];
227
228 memcpy(&value, buf, 4);
229
230 //dprintk("RegMEM Write %d bytes, at 0x%x (0x%x) %x => %x\n", size, (unsigned)offset, addr, oldvalue, value);
231 if (addr == 0 && ((oldvalue&~0x81) == (value&~0x81))) {
232 ethmem[0] = value;
233 ret += 4;
234 } else if (addr >= 103 && addr < 120) {
235 ethmem[addr] = value;
236 ret += 4;
237 } else {
238 return ret;
239 }
240
241 buf += 4;
242 offset +=4;
243 size -=4;
244 }
245
246 return ret;
247 }
248
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2025-08-07 14:00 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=202508072138.6KPhLRF4-lkp@intel.com \
--to=lkp@intel.com \
--cc=kernel@esmil.dk \
--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 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.