drivers/pinctrl/pinctrl-tb10x.c:502:30: sparse: sparse: incorrect type in argument 1 (different address spaces)
From: kernel test robot
Date: Mon May 25 2026 - 03:28:32 EST
Hi Krzysztof,
First bad commit (maybe != root cause):
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: e7ae89a0c97ce2b68b0983cd01eda67cf373517d
commit: 1982621decaf788d0611fc291fe89b297b6e5510 pinctrl: Allow compile testing for K210, TB10X and ZYNQ
date: 11 months ago
config: alpha-randconfig-r122-20260524 (https://download.01.org/0day-ci/archive/20260525/202605251505.dn9V3jLY-lkp@xxxxxxxxx/config)
compiler: alpha-linux-gcc (GCC) 14.3.0
sparse: v0.6.5-rc1
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260525/202605251505.dn9V3jLY-lkp@xxxxxxxxx/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: 1982621decaf ("pinctrl: Allow compile testing for K210, TB10X and ZYNQ")
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202605251505.dn9V3jLY-lkp@xxxxxxxxx/
sparse warnings: (new ones prefixed by >>)
drivers/pinctrl/pinctrl-tb10x.c:770:21: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void *base @@ got void [noderef] __iomem * @@
drivers/pinctrl/pinctrl-tb10x.c:770:21: sparse: expected void *base
drivers/pinctrl/pinctrl-tb10x.c:770:21: sparse: got void [noderef] __iomem *
>> drivers/pinctrl/pinctrl-tb10x.c:502:30: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __iomem *addr @@ got void *base @@
drivers/pinctrl/pinctrl-tb10x.c:502:30: sparse: expected void const [noderef] __iomem *addr
drivers/pinctrl/pinctrl-tb10x.c:502:30: sparse: got void *base
>> drivers/pinctrl/pinctrl-tb10x.c:504:30: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem *addr @@ got void *base @@
drivers/pinctrl/pinctrl-tb10x.c:504:30: sparse: expected void [noderef] __iomem *addr
drivers/pinctrl/pinctrl-tb10x.c:504:30: sparse: got void *base
>> drivers/pinctrl/pinctrl-tb10x.c:502:30: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __iomem *addr @@ got void *base @@
drivers/pinctrl/pinctrl-tb10x.c:502:30: sparse: expected void const [noderef] __iomem *addr
drivers/pinctrl/pinctrl-tb10x.c:502:30: sparse: got void *base
>> drivers/pinctrl/pinctrl-tb10x.c:504:30: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem *addr @@ got void *base @@
drivers/pinctrl/pinctrl-tb10x.c:504:30: sparse: expected void [noderef] __iomem *addr
drivers/pinctrl/pinctrl-tb10x.c:504:30: sparse: got void *base
drivers/pinctrl/pinctrl-tb10x.c:511:31: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __iomem *addr @@ got void *base @@
drivers/pinctrl/pinctrl-tb10x.c:511:31: sparse: expected void const [noderef] __iomem *addr
drivers/pinctrl/pinctrl-tb10x.c:511:31: sparse: got void *base
vim +502 drivers/pinctrl/pinctrl-tb10x.c
5aad0db1c1ebb0 Christian Ruppert 2013-10-15 491
5aad0db1c1ebb0 Christian Ruppert 2013-10-15 492 static inline void tb10x_pinctrl_set_config(struct tb10x_pinctrl *state,
5aad0db1c1ebb0 Christian Ruppert 2013-10-15 493 unsigned int port, unsigned int mode)
5aad0db1c1ebb0 Christian Ruppert 2013-10-15 494 {
5aad0db1c1ebb0 Christian Ruppert 2013-10-15 495 u32 pcfg;
5aad0db1c1ebb0 Christian Ruppert 2013-10-15 496
5aad0db1c1ebb0 Christian Ruppert 2013-10-15 497 if (state->ports[port].count)
5aad0db1c1ebb0 Christian Ruppert 2013-10-15 498 return;
5aad0db1c1ebb0 Christian Ruppert 2013-10-15 499
5aad0db1c1ebb0 Christian Ruppert 2013-10-15 500 state->ports[port].mode = mode;
5aad0db1c1ebb0 Christian Ruppert 2013-10-15 501
5aad0db1c1ebb0 Christian Ruppert 2013-10-15 @502 pcfg = ioread32(state->base) & ~(PCFG_PORT_MASK(port));
5aad0db1c1ebb0 Christian Ruppert 2013-10-15 503 pcfg |= (mode << (PCFG_PORT_BITWIDTH * port)) & PCFG_PORT_MASK(port);
5aad0db1c1ebb0 Christian Ruppert 2013-10-15 @504 iowrite32(pcfg, state->base);
5aad0db1c1ebb0 Christian Ruppert 2013-10-15 505 }
5aad0db1c1ebb0 Christian Ruppert 2013-10-15 506
:::::: The code at line 502 was first introduced by commit
:::::: 5aad0db1c1ebb0f5be79f0adbecc16a2f0259b21 pinctrl: add TB10x pin control driver
:::::: TO: Christian Ruppert <christian.ruppert@xxxxxxxxxx>
:::::: CC: Linus Walleij <linus.walleij@xxxxxxxxxx>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki