drivers/staging/comedi/drivers/addi_apci_3120.c:164:9: sparse: sparse: cast removes address space '__iomem' of expression

From: kernel test robot
Date: Sat Aug 22 2020 - 11:03:10 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: f873db9acd3c92d4741bc3676c9eb511b2f9a6f6
commit: 670d0a4b10704667765f7d18f7592993d02783aa sparse: use identifiers to define address spaces
date: 9 weeks ago
config: riscv-randconfig-s032-20200822 (attached as .config)
compiler: riscv32-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-191-g10164920-dirty
git checkout 670d0a4b10704667765f7d18f7592993d02783aa
# 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=riscv

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>


sparse warnings: (new ones prefixed by >>)

>> drivers/staging/comedi/drivers/addi_apci_3120.c:164:9: sparse: sparse: cast removes address space '__iomem' of expression
>> drivers/staging/comedi/drivers/addi_apci_3120.c:164:9: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got void * @@
>> drivers/staging/comedi/drivers/addi_apci_3120.c:164:9: sparse: expected void volatile [noderef] __iomem *addr
drivers/staging/comedi/drivers/addi_apci_3120.c:164:9: sparse: got void *
drivers/staging/comedi/drivers/addi_apci_3120.c:165:9: sparse: sparse: cast removes address space '__iomem' of expression
drivers/staging/comedi/drivers/addi_apci_3120.c:165:9: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got void * @@
drivers/staging/comedi/drivers/addi_apci_3120.c:165:9: sparse: expected void volatile [noderef] __iomem *addr
drivers/staging/comedi/drivers/addi_apci_3120.c:165:9: sparse: got void *
drivers/staging/comedi/drivers/addi_apci_3120.c:167:9: sparse: sparse: cast removes address space '__iomem' of expression
drivers/staging/comedi/drivers/addi_apci_3120.c:167:9: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got void * @@
drivers/staging/comedi/drivers/addi_apci_3120.c:167:9: sparse: expected void volatile [noderef] __iomem *addr
drivers/staging/comedi/drivers/addi_apci_3120.c:167:9: sparse: got void *
drivers/staging/comedi/drivers/addi_apci_3120.c:168:9: sparse: sparse: cast removes address space '__iomem' of expression
drivers/staging/comedi/drivers/addi_apci_3120.c:168:9: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got void * @@
drivers/staging/comedi/drivers/addi_apci_3120.c:168:9: sparse: expected void volatile [noderef] __iomem *addr
drivers/staging/comedi/drivers/addi_apci_3120.c:168:9: sparse: got void *
drivers/staging/comedi/drivers/addi_apci_3120.c:177:9: sparse: sparse: cast removes address space '__iomem' of expression
drivers/staging/comedi/drivers/addi_apci_3120.c:177:9: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got void * @@
drivers/staging/comedi/drivers/addi_apci_3120.c:177:9: sparse: expected void volatile [noderef] __iomem *addr
drivers/staging/comedi/drivers/addi_apci_3120.c:177:9: sparse: got void *
drivers/staging/comedi/drivers/addi_apci_3120.c:185:9: sparse: sparse: cast removes address space '__iomem' of expression
drivers/staging/comedi/drivers/addi_apci_3120.c:185:9: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got void * @@
drivers/staging/comedi/drivers/addi_apci_3120.c:185:9: sparse: expected void volatile [noderef] __iomem *addr
drivers/staging/comedi/drivers/addi_apci_3120.c:185:9: sparse: got void *
drivers/staging/comedi/drivers/addi_apci_3120.c:195:9: sparse: sparse: cast removes address space '__iomem' of expression
drivers/staging/comedi/drivers/addi_apci_3120.c:195:9: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got void * @@
drivers/staging/comedi/drivers/addi_apci_3120.c:195:9: sparse: expected void volatile [noderef] __iomem *addr
drivers/staging/comedi/drivers/addi_apci_3120.c:195:9: sparse: got void *
drivers/staging/comedi/drivers/addi_apci_3120.c:199:9: sparse: sparse: cast removes address space '__iomem' of expression
drivers/staging/comedi/drivers/addi_apci_3120.c:199:9: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got void * @@
drivers/staging/comedi/drivers/addi_apci_3120.c:199:9: sparse: expected void volatile [noderef] __iomem *addr
drivers/staging/comedi/drivers/addi_apci_3120.c:199:9: sparse: got void *
drivers/staging/comedi/drivers/addi_apci_3120.c:310:9: sparse: sparse: cast removes address space '__iomem' of expression
>> drivers/staging/comedi/drivers/addi_apci_3120.c:310:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *addr @@ got void * @@
>> drivers/staging/comedi/drivers/addi_apci_3120.c:310:9: sparse: expected void const volatile [noderef] __iomem *addr
drivers/staging/comedi/drivers/addi_apci_3120.c:310:9: sparse: got void *
drivers/staging/comedi/drivers/addi_apci_3120.c:319:9: sparse: sparse: cast removes address space '__iomem' of expression
drivers/staging/comedi/drivers/addi_apci_3120.c:319:9: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got void * @@
drivers/staging/comedi/drivers/addi_apci_3120.c:319:9: sparse: expected void volatile [noderef] __iomem *addr
drivers/staging/comedi/drivers/addi_apci_3120.c:319:9: sparse: got void *
drivers/staging/comedi/drivers/addi_apci_3120.c:322:9: sparse: sparse: cast removes address space '__iomem' of expression
drivers/staging/comedi/drivers/addi_apci_3120.c:322:9: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got void * @@
drivers/staging/comedi/drivers/addi_apci_3120.c:322:9: sparse: expected void volatile [noderef] __iomem *addr
drivers/staging/comedi/drivers/addi_apci_3120.c:322:9: sparse: got void *
drivers/staging/comedi/drivers/addi_apci_3120.c:326:17: sparse: sparse: cast removes address space '__iomem' of expression
drivers/staging/comedi/drivers/addi_apci_3120.c:326:17: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got void * @@
drivers/staging/comedi/drivers/addi_apci_3120.c:326:17: sparse: expected void volatile [noderef] __iomem *addr
drivers/staging/comedi/drivers/addi_apci_3120.c:326:17: sparse: got void *
drivers/staging/comedi/drivers/addi_apci_3120.c:329:17: sparse: sparse: cast removes address space '__iomem' of expression
drivers/staging/comedi/drivers/addi_apci_3120.c:329:17: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got void * @@
drivers/staging/comedi/drivers/addi_apci_3120.c:329:17: sparse: expected void volatile [noderef] __iomem *addr
drivers/staging/comedi/drivers/addi_apci_3120.c:329:17: sparse: got void *
drivers/staging/comedi/drivers/addi_apci_3120.c:340:9: sparse: sparse: cast removes address space '__iomem' of expression
drivers/staging/comedi/drivers/addi_apci_3120.c:340:9: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got void * @@
drivers/staging/comedi/drivers/addi_apci_3120.c:340:9: sparse: expected void volatile [noderef] __iomem *addr
drivers/staging/comedi/drivers/addi_apci_3120.c:340:9: sparse: got void *
drivers/staging/comedi/drivers/addi_apci_3120.c:343:15: sparse: sparse: cast removes address space '__iomem' of expression
drivers/staging/comedi/drivers/addi_apci_3120.c:343:15: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *addr @@ got void * @@
drivers/staging/comedi/drivers/addi_apci_3120.c:343:15: sparse: expected void const volatile [noderef] __iomem *addr
drivers/staging/comedi/drivers/addi_apci_3120.c:343:15: sparse: got void *
drivers/staging/comedi/drivers/addi_apci_3120.c:347:17: sparse: sparse: cast removes address space '__iomem' of expression
drivers/staging/comedi/drivers/addi_apci_3120.c:347:17: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got void * @@
drivers/staging/comedi/drivers/addi_apci_3120.c:347:17: sparse: expected void volatile [noderef] __iomem *addr
drivers/staging/comedi/drivers/addi_apci_3120.c:347:17: sparse: got void *
drivers/staging/comedi/drivers/addi_apci_3120.c:350:25: sparse: sparse: cast removes address space '__iomem' of expression
drivers/staging/comedi/drivers/addi_apci_3120.c:350:25: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *addr @@ got void * @@
drivers/staging/comedi/drivers/addi_apci_3120.c:350:25: sparse: expected void const volatile [noderef] __iomem *addr
drivers/staging/comedi/drivers/addi_apci_3120.c:350:25: sparse: got void *
drivers/staging/comedi/drivers/addi_apci_3120.c:363:9: sparse: sparse: cast removes address space '__iomem' of expression
drivers/staging/comedi/drivers/addi_apci_3120.c:363:9: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got void * @@
drivers/staging/comedi/drivers/addi_apci_3120.c:363:9: sparse: expected void volatile [noderef] __iomem *addr
drivers/staging/comedi/drivers/addi_apci_3120.c:363:9: sparse: got void *
drivers/staging/comedi/drivers/addi_apci_3120.c:375:9: sparse: sparse: cast removes address space '__iomem' of expression
drivers/staging/comedi/drivers/addi_apci_3120.c:375:9: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got void * @@
drivers/staging/comedi/drivers/addi_apci_3120.c:375:9: sparse: expected void volatile [noderef] __iomem *addr
drivers/staging/comedi/drivers/addi_apci_3120.c:375:9: sparse: got void *
drivers/staging/comedi/drivers/addi_apci_3120.c:386:9: sparse: sparse: cast removes address space '__iomem' of expression
drivers/staging/comedi/drivers/addi_apci_3120.c:386:9: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got void * @@
drivers/staging/comedi/drivers/addi_apci_3120.c:386:9: sparse: expected void volatile [noderef] __iomem *addr
drivers/staging/comedi/drivers/addi_apci_3120.c:386:9: sparse: got void *
drivers/staging/comedi/drivers/addi_apci_3120.c:409:17: sparse: sparse: cast removes address space '__iomem' of expression
drivers/staging/comedi/drivers/addi_apci_3120.c:409:17: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got void * @@
drivers/staging/comedi/drivers/addi_apci_3120.c:409:17: sparse: expected void volatile [noderef] __iomem *addr
drivers/staging/comedi/drivers/addi_apci_3120.c:409:17: sparse: got void *
drivers/staging/comedi/drivers/addi_apci_3120.c:413:9: sparse: sparse: cast removes address space '__iomem' of expression
drivers/staging/comedi/drivers/addi_apci_3120.c:413:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *addr @@ got void * @@
drivers/staging/comedi/drivers/addi_apci_3120.c:413:9: sparse: expected void const volatile [noderef] __iomem *addr
drivers/staging/comedi/drivers/addi_apci_3120.c:413:9: sparse: got void *
drivers/staging/comedi/drivers/addi_apci_3120.c:417:9: sparse: sparse: cast removes address space '__iomem' of expression
drivers/staging/comedi/drivers/addi_apci_3120.c:417:9: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got void * @@
drivers/staging/comedi/drivers/addi_apci_3120.c:417:9: sparse: expected void volatile [noderef] __iomem *addr
drivers/staging/comedi/drivers/addi_apci_3120.c:417:9: sparse: got void *
drivers/staging/comedi/drivers/addi_apci_3120.c:436:37: sparse: sparse: cast removes address space '__iomem' of expression
drivers/staging/comedi/drivers/addi_apci_3120.c:436:37: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *addr @@ got void * @@
drivers/staging/comedi/drivers/addi_apci_3120.c:436:37: sparse: expected void const volatile [noderef] __iomem *addr
drivers/staging/comedi/drivers/addi_apci_3120.c:436:37: sparse: got void *
drivers/staging/comedi/drivers/addi_apci_3120.c:479:18: sparse: sparse: cast removes address space '__iomem' of expression
drivers/staging/comedi/drivers/addi_apci_3120.c:479:18: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *addr @@ got void * @@
drivers/staging/comedi/drivers/addi_apci_3120.c:479:18: sparse: expected void const volatile [noderef] __iomem *addr
drivers/staging/comedi/drivers/addi_apci_3120.c:479:18: sparse: got void *
drivers/staging/comedi/drivers/addi_apci_3120.c:480:20: sparse: sparse: cast removes address space '__iomem' of expression
drivers/staging/comedi/drivers/addi_apci_3120.c:480:20: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *addr @@ got void * @@
drivers/staging/comedi/drivers/addi_apci_3120.c:480:20: sparse: expected void const volatile [noderef] __iomem *addr
drivers/staging/comedi/drivers/addi_apci_3120.c:480:20: sparse: got void *
drivers/staging/comedi/drivers/addi_apci_3120.c:488:9: sparse: sparse: cast removes address space '__iomem' of expression
drivers/staging/comedi/drivers/addi_apci_3120.c:488:9: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got void * @@
drivers/staging/comedi/drivers/addi_apci_3120.c:488:9: sparse: expected void volatile [noderef] __iomem *addr
drivers/staging/comedi/drivers/addi_apci_3120.c:488:9: sparse: got void *
drivers/staging/comedi/drivers/addi_apci_3120.c:504:31: sparse: sparse: cast removes address space '__iomem' of expression
drivers/staging/comedi/drivers/addi_apci_3120.c:504:31: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *addr @@ got void * @@
drivers/staging/comedi/drivers/addi_apci_3120.c:504:31: sparse: expected void const volatile [noderef] __iomem *addr
drivers/staging/comedi/drivers/addi_apci_3120.c:504:31: sparse: got void *
drivers/staging/comedi/drivers/addi_apci_3120.c:509:17: sparse: sparse: cast removes address space '__iomem' of expression
drivers/staging/comedi/drivers/addi_apci_3120.c:509:17: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got void * @@
drivers/staging/comedi/drivers/addi_apci_3120.c:509:17: sparse: expected void volatile [noderef] __iomem *addr
drivers/staging/comedi/drivers/addi_apci_3120.c:509:17: sparse: got void *
drivers/staging/comedi/drivers/addi_apci_3120.c:522:17: sparse: sparse: cast removes address space '__iomem' of expression
drivers/staging/comedi/drivers/addi_apci_3120.c:522:17: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got void * @@
drivers/staging/comedi/drivers/addi_apci_3120.c:522:17: sparse: expected void volatile [noderef] __iomem *addr
drivers/staging/comedi/drivers/addi_apci_3120.c:522:17: sparse: got void *
drivers/staging/comedi/drivers/addi_apci_3120.c:548:9: sparse: sparse: cast removes address space '__iomem' of expression
drivers/staging/comedi/drivers/addi_apci_3120.c:548:9: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got void * @@
drivers/staging/comedi/drivers/addi_apci_3120.c:548:9: sparse: expected void volatile [noderef] __iomem *addr
drivers/staging/comedi/drivers/addi_apci_3120.c:548:9: sparse: got void *
drivers/staging/comedi/drivers/addi_apci_3120.c:583:9: sparse: sparse: cast removes address space '__iomem' of expression
drivers/staging/comedi/drivers/addi_apci_3120.c:583:9: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got void * @@
drivers/staging/comedi/drivers/addi_apci_3120.c:583:9: sparse: expected void volatile [noderef] __iomem *addr
drivers/staging/comedi/drivers/addi_apci_3120.c:583:9: sparse: got void *
drivers/staging/comedi/drivers/addi_apci_3120.c:668:9: sparse: sparse: cast removes address space '__iomem' of expression
drivers/staging/comedi/drivers/addi_apci_3120.c:668:9: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got void * @@
drivers/staging/comedi/drivers/addi_apci_3120.c:668:9: sparse: expected void volatile [noderef] __iomem *addr
drivers/staging/comedi/drivers/addi_apci_3120.c:668:9: sparse: got void *
drivers/staging/comedi/drivers/addi_apci_3120.c:674:9: sparse: sparse: cast removes address space '__iomem' of expression
drivers/staging/comedi/drivers/addi_apci_3120.c:674:9: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got void * @@
drivers/staging/comedi/drivers/addi_apci_3120.c:674:9: sparse: expected void volatile [noderef] __iomem *addr
--
>> drivers/staging/comedi/drivers/ke_counter.c:54:17: sparse: sparse: cast removes address space '__iomem' of expression
>> drivers/staging/comedi/drivers/ke_counter.c:54:17: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got void * @@
>> drivers/staging/comedi/drivers/ke_counter.c:54:17: sparse: expected void volatile [noderef] __iomem *addr
drivers/staging/comedi/drivers/ke_counter.c:54:17: sparse: got void *
drivers/staging/comedi/drivers/ke_counter.c:55:17: sparse: sparse: cast removes address space '__iomem' of expression
drivers/staging/comedi/drivers/ke_counter.c:55:17: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got void * @@
drivers/staging/comedi/drivers/ke_counter.c:55:17: sparse: expected void volatile [noderef] __iomem *addr
drivers/staging/comedi/drivers/ke_counter.c:55:17: sparse: got void *
drivers/staging/comedi/drivers/ke_counter.c:56:17: sparse: sparse: cast removes address space '__iomem' of expression
drivers/staging/comedi/drivers/ke_counter.c:56:17: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got void * @@
drivers/staging/comedi/drivers/ke_counter.c:56:17: sparse: expected void volatile [noderef] __iomem *addr
drivers/staging/comedi/drivers/ke_counter.c:56:17: sparse: got void *
drivers/staging/comedi/drivers/ke_counter.c:57:17: sparse: sparse: cast removes address space '__iomem' of expression
drivers/staging/comedi/drivers/ke_counter.c:57:17: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got void * @@
drivers/staging/comedi/drivers/ke_counter.c:57:17: sparse: expected void volatile [noderef] __iomem *addr
drivers/staging/comedi/drivers/ke_counter.c:57:17: sparse: got void *
drivers/staging/comedi/drivers/ke_counter.c:74:17: sparse: sparse: cast removes address space '__iomem' of expression
>> drivers/staging/comedi/drivers/ke_counter.c:74:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *addr @@ got void * @@
>> drivers/staging/comedi/drivers/ke_counter.c:74:17: sparse: expected void const volatile [noderef] __iomem *addr
drivers/staging/comedi/drivers/ke_counter.c:74:17: sparse: got void *
drivers/staging/comedi/drivers/ke_counter.c:76:23: sparse: sparse: cast removes address space '__iomem' of expression
drivers/staging/comedi/drivers/ke_counter.c:76:23: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *addr @@ got void * @@
drivers/staging/comedi/drivers/ke_counter.c:76:23: sparse: expected void const volatile [noderef] __iomem *addr
drivers/staging/comedi/drivers/ke_counter.c:76:23: sparse: got void *
drivers/staging/comedi/drivers/ke_counter.c:77:25: sparse: sparse: cast removes address space '__iomem' of expression
drivers/staging/comedi/drivers/ke_counter.c:77:25: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *addr @@ got void * @@
drivers/staging/comedi/drivers/ke_counter.c:77:25: sparse: expected void const volatile [noderef] __iomem *addr
drivers/staging/comedi/drivers/ke_counter.c:77:25: sparse: got void *
drivers/staging/comedi/drivers/ke_counter.c:78:25: sparse: sparse: cast removes address space '__iomem' of expression
drivers/staging/comedi/drivers/ke_counter.c:78:25: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *addr @@ got void * @@
drivers/staging/comedi/drivers/ke_counter.c:78:25: sparse: expected void const volatile [noderef] __iomem *addr
drivers/staging/comedi/drivers/ke_counter.c:78:25: sparse: got void *
drivers/staging/comedi/drivers/ke_counter.c:79:25: sparse: sparse: cast removes address space '__iomem' of expression
drivers/staging/comedi/drivers/ke_counter.c:79:25: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *addr @@ got void * @@
drivers/staging/comedi/drivers/ke_counter.c:79:25: sparse: expected void const volatile [noderef] __iomem *addr
drivers/staging/comedi/drivers/ke_counter.c:79:25: sparse: got void *
drivers/staging/comedi/drivers/ke_counter.c:92:17: sparse: sparse: cast removes address space '__iomem' of expression
drivers/staging/comedi/drivers/ke_counter.c:92:17: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got void * @@
drivers/staging/comedi/drivers/ke_counter.c:92:17: sparse: expected void volatile [noderef] __iomem *addr
drivers/staging/comedi/drivers/ke_counter.c:92:17: sparse: got void *
drivers/staging/comedi/drivers/ke_counter.c:117:17: sparse: sparse: cast removes address space '__iomem' of expression
drivers/staging/comedi/drivers/ke_counter.c:117:17: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got void * @@
drivers/staging/comedi/drivers/ke_counter.c:117:17: sparse: expected void volatile [noderef] __iomem *addr
drivers/staging/comedi/drivers/ke_counter.c:117:17: sparse: got void *
drivers/staging/comedi/drivers/ke_counter.c:120:23: sparse: sparse: cast removes address space '__iomem' of expression
drivers/staging/comedi/drivers/ke_counter.c:120:23: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *addr @@ got void * @@
drivers/staging/comedi/drivers/ke_counter.c:120:23: sparse: expected void const volatile [noderef] __iomem *addr
drivers/staging/comedi/drivers/ke_counter.c:120:23: sparse: got void *
drivers/staging/comedi/drivers/ke_counter.c:154:17: sparse: sparse: cast removes address space '__iomem' of expression
drivers/staging/comedi/drivers/ke_counter.c:154:17: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got void * @@
drivers/staging/comedi/drivers/ke_counter.c:154:17: sparse: expected void volatile [noderef] __iomem *addr
drivers/staging/comedi/drivers/ke_counter.c:154:17: sparse: got void *
drivers/staging/comedi/drivers/ke_counter.c:195:9: sparse: sparse: cast removes address space '__iomem' of expression
drivers/staging/comedi/drivers/ke_counter.c:195:9: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got void * @@
drivers/staging/comedi/drivers/ke_counter.c:195:9: sparse: expected void volatile [noderef] __iomem *addr
drivers/staging/comedi/drivers/ke_counter.c:195:9: sparse: got void *

# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=670d0a4b10704667765f7d18f7592993d02783aa
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 670d0a4b10704667765f7d18f7592993d02783aa
vim +/__iomem +164 drivers/staging/comedi/drivers/addi_apci_3120.c

4e068bec48c6c2 H Hartley Sweeten 2014-10-14 156
0b7defa70227f7 H Hartley Sweeten 2014-11-04 157 static void apci3120_addon_write(struct comedi_device *dev,
0b7defa70227f7 H Hartley Sweeten 2014-11-04 158 unsigned int val, unsigned int reg)
0b7defa70227f7 H Hartley Sweeten 2014-11-04 159 {
0b7defa70227f7 H Hartley Sweeten 2014-11-04 160 struct apci3120_private *devpriv = dev->private;
0b7defa70227f7 H Hartley Sweeten 2014-11-04 161
0b7defa70227f7 H Hartley Sweeten 2014-11-04 162 /* 16-bit interface for AMCC add-on registers */
0b7defa70227f7 H Hartley Sweeten 2014-11-04 163
0b7defa70227f7 H Hartley Sweeten 2014-11-04 @164 outw(reg, devpriv->addon + APCI3120_ADDON_ADDR_REG);
0b7defa70227f7 H Hartley Sweeten 2014-11-04 165 outw(val & 0xffff, devpriv->addon + APCI3120_ADDON_DATA_REG);
0b7defa70227f7 H Hartley Sweeten 2014-11-04 166
0b7defa70227f7 H Hartley Sweeten 2014-11-04 167 outw(reg + 2, devpriv->addon + APCI3120_ADDON_ADDR_REG);
0b7defa70227f7 H Hartley Sweeten 2014-11-04 168 outw((val >> 16) & 0xffff, devpriv->addon + APCI3120_ADDON_DATA_REG);
0b7defa70227f7 H Hartley Sweeten 2014-11-04 169 }
0b7defa70227f7 H Hartley Sweeten 2014-11-04 170
ee844c51ef0451 H Hartley Sweeten 2014-11-04 171 static void apci3120_init_dma(struct comedi_device *dev,
ee844c51ef0451 H Hartley Sweeten 2014-11-04 172 struct apci3120_dmabuf *dmabuf)
ee844c51ef0451 H Hartley Sweeten 2014-11-04 173 {
ee844c51ef0451 H Hartley Sweeten 2014-11-04 174 struct apci3120_private *devpriv = dev->private;
ee844c51ef0451 H Hartley Sweeten 2014-11-04 175
ee844c51ef0451 H Hartley Sweeten 2014-11-04 176 /* AMCC - enable transfer count and reset A2P FIFO */
ee844c51ef0451 H Hartley Sweeten 2014-11-04 177 outl(AGCSTS_TC_ENABLE | AGCSTS_RESET_A2P_FIFO,
ee844c51ef0451 H Hartley Sweeten 2014-11-04 178 devpriv->amcc + AMCC_OP_REG_AGCSTS);
ee844c51ef0451 H Hartley Sweeten 2014-11-04 179
ee844c51ef0451 H Hartley Sweeten 2014-11-04 180 /* Add-On - enable transfer count and reset A2P FIFO */
ee844c51ef0451 H Hartley Sweeten 2014-11-04 181 apci3120_addon_write(dev, AGCSTS_TC_ENABLE | AGCSTS_RESET_A2P_FIFO,
ee844c51ef0451 H Hartley Sweeten 2014-11-04 182 AMCC_OP_REG_AGCSTS);
ee844c51ef0451 H Hartley Sweeten 2014-11-04 183
ee844c51ef0451 H Hartley Sweeten 2014-11-04 184 /* AMCC - enable transfers and reset A2P flags */
ee844c51ef0451 H Hartley Sweeten 2014-11-04 185 outl(RESET_A2P_FLAGS | EN_A2P_TRANSFERS,
ee844c51ef0451 H Hartley Sweeten 2014-11-04 186 devpriv->amcc + AMCC_OP_REG_MCSR);
ee844c51ef0451 H Hartley Sweeten 2014-11-04 187
ee844c51ef0451 H Hartley Sweeten 2014-11-04 188 /* Add-On - DMA start address */
ee844c51ef0451 H Hartley Sweeten 2014-11-04 189 apci3120_addon_write(dev, dmabuf->hw, AMCC_OP_REG_AMWAR);
ee844c51ef0451 H Hartley Sweeten 2014-11-04 190
ee844c51ef0451 H Hartley Sweeten 2014-11-04 191 /* Add-On - Number of acquisitions */
ee844c51ef0451 H Hartley Sweeten 2014-11-04 192 apci3120_addon_write(dev, dmabuf->use_size, AMCC_OP_REG_AMWTC);
ee844c51ef0451 H Hartley Sweeten 2014-11-04 193
ee844c51ef0451 H Hartley Sweeten 2014-11-04 194 /* AMCC - enable write complete (DMA) and set FIFO advance */
ee844c51ef0451 H Hartley Sweeten 2014-11-04 @195 outl(APCI3120_FIFO_ADVANCE_ON_BYTE_2 | AINT_WRITE_COMPL,
ee844c51ef0451 H Hartley Sweeten 2014-11-04 196 devpriv->amcc + AMCC_OP_REG_INTCSR);
ee844c51ef0451 H Hartley Sweeten 2014-11-04 197
ee844c51ef0451 H Hartley Sweeten 2014-11-04 198 /* Add-On - enable DMA */
ee844c51ef0451 H Hartley Sweeten 2014-11-04 199 outw(APCI3120_ADDON_CTRL_AMWEN_ENA | APCI3120_ADDON_CTRL_A2P_FIFO_ENA,
ee844c51ef0451 H Hartley Sweeten 2014-11-04 200 devpriv->addon + APCI3120_ADDON_CTRL_REG);
ee844c51ef0451 H Hartley Sweeten 2014-11-04 201 }
ee844c51ef0451 H Hartley Sweeten 2014-11-04 202
45062492281d2c H Hartley Sweeten 2014-11-04 203 static void apci3120_setup_dma(struct comedi_device *dev,
45062492281d2c H Hartley Sweeten 2014-11-04 204 struct comedi_subdevice *s)
45062492281d2c H Hartley Sweeten 2014-11-04 205 {
45062492281d2c H Hartley Sweeten 2014-11-04 206 struct apci3120_private *devpriv = dev->private;
45062492281d2c H Hartley Sweeten 2014-11-04 207 struct comedi_cmd *cmd = &s->async->cmd;
45062492281d2c H Hartley Sweeten 2014-11-04 208 struct apci3120_dmabuf *dmabuf0 = &devpriv->dmabuf[0];
45062492281d2c H Hartley Sweeten 2014-11-04 209 struct apci3120_dmabuf *dmabuf1 = &devpriv->dmabuf[1];
45062492281d2c H Hartley Sweeten 2014-11-04 210 unsigned int dmalen0 = dmabuf0->size;
45062492281d2c H Hartley Sweeten 2014-11-04 211 unsigned int dmalen1 = dmabuf1->size;
45062492281d2c H Hartley Sweeten 2014-11-04 212 unsigned int scan_bytes;
45062492281d2c H Hartley Sweeten 2014-11-04 213
45062492281d2c H Hartley Sweeten 2014-11-04 214 scan_bytes = comedi_samples_to_bytes(s, cmd->scan_end_arg);
45062492281d2c H Hartley Sweeten 2014-11-04 215
45062492281d2c H Hartley Sweeten 2014-11-04 216 if (cmd->stop_src == TRIG_COUNT) {
45062492281d2c H Hartley Sweeten 2014-11-04 217 /*
45062492281d2c H Hartley Sweeten 2014-11-04 218 * Must we fill full first buffer? And must we fill
45062492281d2c H Hartley Sweeten 2014-11-04 219 * full second buffer when first is once filled?
45062492281d2c H Hartley Sweeten 2014-11-04 220 */
45062492281d2c H Hartley Sweeten 2014-11-04 221 if (dmalen0 > (cmd->stop_arg * scan_bytes))
45062492281d2c H Hartley Sweeten 2014-11-04 222 dmalen0 = cmd->stop_arg * scan_bytes;
45062492281d2c H Hartley Sweeten 2014-11-04 223 else if (dmalen1 > (cmd->stop_arg * scan_bytes - dmalen0))
45062492281d2c H Hartley Sweeten 2014-11-04 224 dmalen1 = cmd->stop_arg * scan_bytes - dmalen0;
45062492281d2c H Hartley Sweeten 2014-11-04 225 }
45062492281d2c H Hartley Sweeten 2014-11-04 226
45062492281d2c H Hartley Sweeten 2014-11-04 227 if (cmd->flags & CMDF_WAKE_EOS) {
45062492281d2c H Hartley Sweeten 2014-11-04 228 /* don't we want wake up every scan? */
45062492281d2c H Hartley Sweeten 2014-11-04 229 if (dmalen0 > scan_bytes) {
45062492281d2c H Hartley Sweeten 2014-11-04 230 dmalen0 = scan_bytes;
45062492281d2c H Hartley Sweeten 2014-11-04 231 if (cmd->scan_end_arg & 1)
45062492281d2c H Hartley Sweeten 2014-11-04 232 dmalen0 += 2;
45062492281d2c H Hartley Sweeten 2014-11-04 233 }
45062492281d2c H Hartley Sweeten 2014-11-04 234 if (dmalen1 > scan_bytes) {
45062492281d2c H Hartley Sweeten 2014-11-04 235 dmalen1 = scan_bytes;
45062492281d2c H Hartley Sweeten 2014-11-04 236 if (cmd->scan_end_arg & 1)
45062492281d2c H Hartley Sweeten 2014-11-04 237 dmalen1 -= 2;
45062492281d2c H Hartley Sweeten 2014-11-04 238 if (dmalen1 < 4)
45062492281d2c H Hartley Sweeten 2014-11-04 239 dmalen1 = 4;
45062492281d2c H Hartley Sweeten 2014-11-04 240 }
45062492281d2c H Hartley Sweeten 2014-11-04 241 } else {
45062492281d2c H Hartley Sweeten 2014-11-04 242 /* isn't output buff smaller that our DMA buff? */
45062492281d2c H Hartley Sweeten 2014-11-04 243 if (dmalen0 > s->async->prealloc_bufsz)
45062492281d2c H Hartley Sweeten 2014-11-04 244 dmalen0 = s->async->prealloc_bufsz;
45062492281d2c H Hartley Sweeten 2014-11-04 245 if (dmalen1 > s->async->prealloc_bufsz)
45062492281d2c H Hartley Sweeten 2014-11-04 246 dmalen1 = s->async->prealloc_bufsz;
45062492281d2c H Hartley Sweeten 2014-11-04 247 }
45062492281d2c H Hartley Sweeten 2014-11-04 248 dmabuf0->use_size = dmalen0;
45062492281d2c H Hartley Sweeten 2014-11-04 249 dmabuf1->use_size = dmalen1;
45062492281d2c H Hartley Sweeten 2014-11-04 250
45062492281d2c H Hartley Sweeten 2014-11-04 251 apci3120_init_dma(dev, dmabuf0);
45062492281d2c H Hartley Sweeten 2014-11-04 252 }
45062492281d2c H Hartley Sweeten 2014-11-04 253
546bf3382e41b8 H Hartley Sweeten 2014-11-04 254 /*
546bf3382e41b8 H Hartley Sweeten 2014-11-04 255 * There are three timers on the board. They all use the same base
546bf3382e41b8 H Hartley Sweeten 2014-11-04 256 * clock with a fixed prescaler for each timer. The base clock used
546bf3382e41b8 H Hartley Sweeten 2014-11-04 257 * depends on the board version and type.
546bf3382e41b8 H Hartley Sweeten 2014-11-04 258 *
546bf3382e41b8 H Hartley Sweeten 2014-11-04 259 * APCI-3120 Rev A boards OSC = 14.29MHz base clock (~70ns)
546bf3382e41b8 H Hartley Sweeten 2014-11-04 260 * APCI-3120 Rev B boards OSC = 20MHz base clock (50ns)
546bf3382e41b8 H Hartley Sweeten 2014-11-04 261 * APCI-3001 boards OSC = 20MHz base clock (50ns)
546bf3382e41b8 H Hartley Sweeten 2014-11-04 262 *
546bf3382e41b8 H Hartley Sweeten 2014-11-04 263 * The prescalers for each timer are:
546bf3382e41b8 H Hartley Sweeten 2014-11-04 264 * Timer 0 CLK = OSC/10
546bf3382e41b8 H Hartley Sweeten 2014-11-04 265 * Timer 1 CLK = OSC/1000
546bf3382e41b8 H Hartley Sweeten 2014-11-04 266 * Timer 2 CLK = OSC/1000
546bf3382e41b8 H Hartley Sweeten 2014-11-04 267 */
546bf3382e41b8 H Hartley Sweeten 2014-11-04 268 static unsigned int apci3120_ns_to_timer(struct comedi_device *dev,
546bf3382e41b8 H Hartley Sweeten 2014-11-04 269 unsigned int timer,
546bf3382e41b8 H Hartley Sweeten 2014-11-04 270 unsigned int ns,
546bf3382e41b8 H Hartley Sweeten 2014-11-04 271 unsigned int flags)
546bf3382e41b8 H Hartley Sweeten 2014-11-04 272 {
546bf3382e41b8 H Hartley Sweeten 2014-11-04 273 struct apci3120_private *devpriv = dev->private;
546bf3382e41b8 H Hartley Sweeten 2014-11-04 274 unsigned int prescale = (timer == 0) ? 10 : 1000;
546bf3382e41b8 H Hartley Sweeten 2014-11-04 275 unsigned int timer_base = devpriv->osc_base * prescale;
546bf3382e41b8 H Hartley Sweeten 2014-11-04 276 unsigned int divisor;
546bf3382e41b8 H Hartley Sweeten 2014-11-04 277
546bf3382e41b8 H Hartley Sweeten 2014-11-04 278 switch (flags & CMDF_ROUND_MASK) {
546bf3382e41b8 H Hartley Sweeten 2014-11-04 279 case CMDF_ROUND_UP:
546bf3382e41b8 H Hartley Sweeten 2014-11-04 280 divisor = DIV_ROUND_UP(ns, timer_base);
546bf3382e41b8 H Hartley Sweeten 2014-11-04 281 break;
546bf3382e41b8 H Hartley Sweeten 2014-11-04 282 case CMDF_ROUND_DOWN:
546bf3382e41b8 H Hartley Sweeten 2014-11-04 283 divisor = ns / timer_base;
546bf3382e41b8 H Hartley Sweeten 2014-11-04 284 break;
546bf3382e41b8 H Hartley Sweeten 2014-11-04 285 case CMDF_ROUND_NEAREST:
546bf3382e41b8 H Hartley Sweeten 2014-11-04 286 default:
546bf3382e41b8 H Hartley Sweeten 2014-11-04 287 divisor = DIV_ROUND_CLOSEST(ns, timer_base);
546bf3382e41b8 H Hartley Sweeten 2014-11-04 288 break;
546bf3382e41b8 H Hartley Sweeten 2014-11-04 289 }
546bf3382e41b8 H Hartley Sweeten 2014-11-04 290
546bf3382e41b8 H Hartley Sweeten 2014-11-04 291 if (timer == 2) {
546bf3382e41b8 H Hartley Sweeten 2014-11-04 292 /* timer 2 is 24-bits */
546bf3382e41b8 H Hartley Sweeten 2014-11-04 293 if (divisor > 0x00ffffff)
546bf3382e41b8 H Hartley Sweeten 2014-11-04 294 divisor = 0x00ffffff;
546bf3382e41b8 H Hartley Sweeten 2014-11-04 295 } else {
546bf3382e41b8 H Hartley Sweeten 2014-11-04 296 /* timers 0 and 1 are 16-bits */
546bf3382e41b8 H Hartley Sweeten 2014-11-04 297 if (divisor > 0xffff)
546bf3382e41b8 H Hartley Sweeten 2014-11-04 298 divisor = 0xffff;
546bf3382e41b8 H Hartley Sweeten 2014-11-04 299 }
546bf3382e41b8 H Hartley Sweeten 2014-11-04 300 /* the timers require a minimum divisor of 2 */
546bf3382e41b8 H Hartley Sweeten 2014-11-04 301 if (divisor < 2)
546bf3382e41b8 H Hartley Sweeten 2014-11-04 302 divisor = 2;
546bf3382e41b8 H Hartley Sweeten 2014-11-04 303
546bf3382e41b8 H Hartley Sweeten 2014-11-04 304 return divisor;
546bf3382e41b8 H Hartley Sweeten 2014-11-04 305 }
546bf3382e41b8 H Hartley Sweeten 2014-11-04 306
24e18c85e57255 H Hartley Sweeten 2014-11-04 307 static void apci3120_clr_timer2_interrupt(struct comedi_device *dev)
24e18c85e57255 H Hartley Sweeten 2014-11-04 308 {
24e18c85e57255 H Hartley Sweeten 2014-11-04 309 /* a dummy read of APCI3120_CTR0_REG clears the timer 2 interrupt */
24e18c85e57255 H Hartley Sweeten 2014-11-04 @310 inb(dev->iobase + APCI3120_CTR0_REG);
24e18c85e57255 H Hartley Sweeten 2014-11-04 311 }
24e18c85e57255 H Hartley Sweeten 2014-11-04 312

:::::: The code at line 164 was first introduced by commit
:::::: 0b7defa70227f7c7f313e0ea4f0eeb88c5de79a3 staging: comedi: addi_apci_3120: move apci3120_addon_write() to driver

:::::: TO: H Hartley Sweeten <hsweeten@xxxxxxxxxxxxxxxxxxx>
:::::: CC: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip