sound/sh/sh_dac_audio.c:166:51: sparse: sparse: incorrect type in argument 1 (different address spaces)
From: kernel test robot
Date: Sun Jul 28 2024 - 20:24:38 EST
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 8400291e289ee6b2bf9779ff1c83a291501f017b
commit: 2f432f4702134fac27677f13aba69ed830984f75 ALSA: sh: Convert to generic PCM copy ops
date: 12 months ago
config: sh-randconfig-r133-20240729 (https://download.01.org/0day-ci/archive/20240729/202407290821.VLAGtgbv-lkp@xxxxxxxxx/config)
compiler: sh4-linux-gcc (GCC) 14.1.0
reproduce: (https://download.01.org/0day-ci/archive/20240729/202407290821.VLAGtgbv-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
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202407290821.VLAGtgbv-lkp@xxxxxxxxx/
sparse warnings: (new ones prefixed by >>)
>> sound/sh/sh_dac_audio.c:166:51: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void [noderef] __iomem *dst @@ got char * @@
sound/sh/sh_dac_audio.c:166:51: sparse: expected void [noderef] __iomem *dst
sound/sh/sh_dac_audio.c:166:51: sparse: got char *
sound/sh/sh_dac_audio.c:185:37: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void volatile [noderef] __iomem * @@ got char * @@
sound/sh/sh_dac_audio.c:185:37: sparse: expected void volatile [noderef] __iomem *
sound/sh/sh_dac_audio.c:185:37: sparse: got char *
sound/sh/sh_dac_audio.c: note: in included file:
arch/sh/include/cpu-sh3/cpu/dac.h:38:21: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected void const volatile [noderef] __iomem *ptr @@ got unsigned int @@
arch/sh/include/cpu-sh3/cpu/dac.h:38:21: sparse: expected void const volatile [noderef] __iomem *ptr
arch/sh/include/cpu-sh3/cpu/dac.h:38:21: sparse: got unsigned int
arch/sh/include/cpu-sh3/cpu/dac.h:39:14: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected void const volatile [noderef] __iomem *ptr @@ got unsigned int @@
arch/sh/include/cpu-sh3/cpu/dac.h:39:14: sparse: expected void const volatile [noderef] __iomem *ptr
arch/sh/include/cpu-sh3/cpu/dac.h:39:14: sparse: got unsigned int
vim +166 sound/sh/sh_dac_audio.c
158
159 static int snd_sh_dac_pcm_copy(struct snd_pcm_substream *substream,
160 int channel, unsigned long pos,
161 struct iov_iter *src, unsigned long count)
162 {
163 /* channel is not used (interleaved data) */
164 struct snd_sh_dac *chip = snd_pcm_substream_chip(substream);
165
> 166 if (copy_from_iter_toio(chip->data_buffer + pos, src, count))
167 return -EFAULT;
168 chip->buffer_end = chip->data_buffer + pos + count;
169
170 if (chip->empty) {
171 chip->empty = 0;
172 dac_audio_start_timer(chip);
173 }
174
175 return 0;
176 }
177
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki