sound/soc/renesas/sh7760-ac97.c:43:17: sparse: sparse: incorrect type in argument 1 (different base types)

From: kernel test robot
Date: Wed Feb 26 2025 - 18:41:59 EST


Hi Lad,

First bad commit (maybe != root cause):

tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: f4ce1f3318ad4bc12463698696ebc36b145a6aa3
commit: c087a94bea49acf34d651f7308506fe462a937b3 ASoC: Rename "sh" to "renesas"
date: 4 months ago
config: sh-randconfig-r132-20250226 (https://download.01.org/0day-ci/archive/20250227/202502270743.XHyhWKWp-lkp@xxxxxxxxx/config)
compiler: sh4-linux-gcc (GCC) 14.2.0
reproduce: (https://download.01.org/0day-ci/archive/20250227/202502270743.XHyhWKWp-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/202502270743.XHyhWKWp-lkp@xxxxxxxxx/

sparse warnings: (new ones prefixed by >>)
>> sound/soc/renesas/sh7760-ac97.c:43:17: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected void const volatile [noderef] __iomem *ptr @@ got unsigned int @@
sound/soc/renesas/sh7760-ac97.c:43:17: sparse: expected void const volatile [noderef] __iomem *ptr
sound/soc/renesas/sh7760-ac97.c:43:17: sparse: got unsigned int
sound/soc/renesas/sh7760-ac97.c:44:9: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected void const volatile [noderef] __iomem *ptr @@ got unsigned int @@
sound/soc/renesas/sh7760-ac97.c:44:9: sparse: expected void const volatile [noderef] __iomem *ptr
sound/soc/renesas/sh7760-ac97.c:44:9: sparse: got unsigned int
--
>> sound/soc/renesas/hac.c:77:3: sparse: sparse: symbol 'hac_cpu_data' was not declared. Should it be static?

vim +43 sound/soc/renesas/sh7760-ac97.c

aef3b06ac69783d sound/soc/sh/sh7760-ac97.c Manuel Lauss 2007-05-14 36
aef3b06ac69783d sound/soc/sh/sh7760-ac97.c Manuel Lauss 2007-05-14 37 static int __init sh7760_ac97_init(void)
aef3b06ac69783d sound/soc/sh/sh7760-ac97.c Manuel Lauss 2007-05-14 38 {
aef3b06ac69783d sound/soc/sh/sh7760-ac97.c Manuel Lauss 2007-05-14 39 int ret;
aef3b06ac69783d sound/soc/sh/sh7760-ac97.c Manuel Lauss 2007-05-14 40 unsigned short ipsel;
aef3b06ac69783d sound/soc/sh/sh7760-ac97.c Manuel Lauss 2007-05-14 41
aef3b06ac69783d sound/soc/sh/sh7760-ac97.c Manuel Lauss 2007-05-14 42 /* enable both AC97 controllers in pinmux reg */
48ccb2ceec6fb1d sound/soc/sh/sh7760-ac97.c Paul Mundt 2010-10-27 @43 ipsel = __raw_readw(IPSEL);
48ccb2ceec6fb1d sound/soc/sh/sh7760-ac97.c Paul Mundt 2010-10-27 44 __raw_writew(ipsel | (3 << 10), IPSEL);
aef3b06ac69783d sound/soc/sh/sh7760-ac97.c Manuel Lauss 2007-05-14 45
aef3b06ac69783d sound/soc/sh/sh7760-ac97.c Manuel Lauss 2007-05-14 46 ret = -ENOMEM;
aef3b06ac69783d sound/soc/sh/sh7760-ac97.c Manuel Lauss 2007-05-14 47 sh7760_ac97_snd_device = platform_device_alloc("soc-audio", -1);
aef3b06ac69783d sound/soc/sh/sh7760-ac97.c Manuel Lauss 2007-05-14 48 if (!sh7760_ac97_snd_device)
aef3b06ac69783d sound/soc/sh/sh7760-ac97.c Manuel Lauss 2007-05-14 49 goto out;
aef3b06ac69783d sound/soc/sh/sh7760-ac97.c Manuel Lauss 2007-05-14 50
aef3b06ac69783d sound/soc/sh/sh7760-ac97.c Manuel Lauss 2007-05-14 51 platform_set_drvdata(sh7760_ac97_snd_device,
f0fba2ad1b6b53d sound/soc/sh/sh7760-ac97.c Liam Girdwood 2010-03-17 52 &sh7760_ac97_soc_machine);
aef3b06ac69783d sound/soc/sh/sh7760-ac97.c Manuel Lauss 2007-05-14 53 ret = platform_device_add(sh7760_ac97_snd_device);
aef3b06ac69783d sound/soc/sh/sh7760-ac97.c Manuel Lauss 2007-05-14 54
aef3b06ac69783d sound/soc/sh/sh7760-ac97.c Manuel Lauss 2007-05-14 55 if (ret)
aef3b06ac69783d sound/soc/sh/sh7760-ac97.c Manuel Lauss 2007-05-14 56 platform_device_put(sh7760_ac97_snd_device);
aef3b06ac69783d sound/soc/sh/sh7760-ac97.c Manuel Lauss 2007-05-14 57
aef3b06ac69783d sound/soc/sh/sh7760-ac97.c Manuel Lauss 2007-05-14 58 out:
aef3b06ac69783d sound/soc/sh/sh7760-ac97.c Manuel Lauss 2007-05-14 59 return ret;
aef3b06ac69783d sound/soc/sh/sh7760-ac97.c Manuel Lauss 2007-05-14 60 }
aef3b06ac69783d sound/soc/sh/sh7760-ac97.c Manuel Lauss 2007-05-14 61

:::::: The code at line 43 was first introduced by commit
:::::: 48ccb2ceec6fb1d46d1bc92dadc602d4341a0149 sound: sh: ctrl_in/outX to __raw_read/writeX conversion.

:::::: TO: Paul Mundt <lethal@xxxxxxxxxxxx>
:::::: CC: Paul Mundt <lethal@xxxxxxxxxxxx>

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