arch/x86/platform/uv/bios_uv.c:175:12: sparse: sparse: function 'uv_bios_get_master_nasid' with external linkage has definition

From: kernel test robot
Date: Fri Aug 11 2023 - 20:15:55 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 190bf7b14b0cf3df19c059061be032bd8994a597
commit: 9a3c425cfdfee169622f1cb1a974b2f287e5560c x86/platform/uv: Add and export uv_bios_* functions
date: 2 years, 9 months ago
config: x86_64-allmodconfig (https://download.01.org/0day-ci/archive/20230812/202308120843.j7FXmsnM-lkp@xxxxxxxxx/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce: (https://download.01.org/0day-ci/archive/20230812/202308120843.j7FXmsnM-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/202308120843.j7FXmsnM-lkp@xxxxxxxxx/

sparse warnings: (new ones prefixed by >>)
>> arch/x86/platform/uv/bios_uv.c:175:12: sparse: sparse: function 'uv_bios_get_master_nasid' with external linkage has definition
>> arch/x86/platform/uv/bios_uv.c:182:12: sparse: sparse: function 'uv_bios_get_heapsize' with external linkage has definition
>> arch/x86/platform/uv/bios_uv.c:189:12: sparse: sparse: function 'uv_bios_install_heap' with external linkage has definition
>> arch/x86/platform/uv/bios_uv.c:196:12: sparse: sparse: function 'uv_bios_obj_count' with external linkage has definition
>> arch/x86/platform/uv/bios_uv.c:203:12: sparse: sparse: function 'uv_bios_enum_objs' with external linkage has definition
>> arch/x86/platform/uv/bios_uv.c:210:12: sparse: sparse: function 'uv_bios_enum_ports' with external linkage has definition
>> arch/x86/platform/uv/bios_uv.c:217:12: sparse: sparse: function 'uv_bios_get_geoinfo' with external linkage has definition
>> arch/x86/platform/uv/bios_uv.c:223:12: sparse: sparse: function 'uv_bios_get_pci_topology' with external linkage has definition
arch/x86/platform/uv/bios_uv.c:249:19: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct uv_systab *[addressable] [assigned] [toplevel] uv_systab @@ got void [noderef] __iomem * @@
arch/x86/platform/uv/bios_uv.c:249:19: sparse: expected struct uv_systab *[addressable] [assigned] [toplevel] uv_systab
arch/x86/platform/uv/bios_uv.c:249:19: sparse: got void [noderef] __iomem *
arch/x86/platform/uv/bios_uv.c:252:25: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got struct uv_systab *[addressable] [assigned] [toplevel] uv_systab @@
arch/x86/platform/uv/bios_uv.c:252:25: sparse: expected void volatile [noderef] __iomem *addr
arch/x86/platform/uv/bios_uv.c:252:25: sparse: got struct uv_systab *[addressable] [assigned] [toplevel] uv_systab
arch/x86/platform/uv/bios_uv.c:260:25: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got struct uv_systab *[addressable] [assigned] [toplevel] uv_systab @@
arch/x86/platform/uv/bios_uv.c:260:25: sparse: expected void volatile [noderef] __iomem *addr
arch/x86/platform/uv/bios_uv.c:260:25: sparse: got struct uv_systab *[addressable] [assigned] [toplevel] uv_systab
arch/x86/platform/uv/bios_uv.c:261:27: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct uv_systab *[addressable] [assigned] [toplevel] uv_systab @@ got void [noderef] __iomem * @@
arch/x86/platform/uv/bios_uv.c:261:27: sparse: expected struct uv_systab *[addressable] [assigned] [toplevel] uv_systab
arch/x86/platform/uv/bios_uv.c:261:27: sparse: got void [noderef] __iomem *

vim +/uv_bios_get_master_nasid +175 arch/x86/platform/uv/bios_uv.c

174
> 175 extern s64 uv_bios_get_master_nasid(u64 size, u64 *master_nasid)
176 {
177 return uv_bios_call(UV_BIOS_EXTRA, 0, UV_BIOS_EXTRA_MASTER_NASID, 0,
178 size, (u64)master_nasid);
179 }
180 EXPORT_SYMBOL_GPL(uv_bios_get_master_nasid);
181
> 182 extern s64 uv_bios_get_heapsize(u64 nasid, u64 size, u64 *heap_size)
183 {
184 return uv_bios_call(UV_BIOS_EXTRA, nasid, UV_BIOS_EXTRA_GET_HEAPSIZE,
185 0, size, (u64)heap_size);
186 }
187 EXPORT_SYMBOL_GPL(uv_bios_get_heapsize);
188
> 189 extern s64 uv_bios_install_heap(u64 nasid, u64 heap_size, u64 *bios_heap)
190 {
191 return uv_bios_call(UV_BIOS_EXTRA, nasid, UV_BIOS_EXTRA_INSTALL_HEAP,
192 0, heap_size, (u64)bios_heap);
193 }
194 EXPORT_SYMBOL_GPL(uv_bios_install_heap);
195
> 196 extern s64 uv_bios_obj_count(u64 nasid, u64 size, u64 *objcnt)
197 {
198 return uv_bios_call(UV_BIOS_EXTRA, nasid, UV_BIOS_EXTRA_OBJECT_COUNT,
199 0, size, (u64)objcnt);
200 }
201 EXPORT_SYMBOL_GPL(uv_bios_obj_count);
202
> 203 extern s64 uv_bios_enum_objs(u64 nasid, u64 size, u64 *objbuf)
204 {
205 return uv_bios_call(UV_BIOS_EXTRA, nasid, UV_BIOS_EXTRA_ENUM_OBJECTS,
206 0, size, (u64)objbuf);
207 }
208 EXPORT_SYMBOL_GPL(uv_bios_enum_objs);
209
> 210 extern s64 uv_bios_enum_ports(u64 nasid, u64 obj_id, u64 size, u64 *portbuf)
211 {
212 return uv_bios_call(UV_BIOS_EXTRA, nasid, UV_BIOS_EXTRA_ENUM_PORTS,
213 obj_id, size, (u64)portbuf);
214 }
215 EXPORT_SYMBOL_GPL(uv_bios_enum_ports);
216
> 217 extern s64 uv_bios_get_geoinfo(u64 nasid, u64 size, u64 *buf)
218 {
219 return uv_bios_call(UV_BIOS_GET_GEOINFO, nasid, (u64)buf, size, 0, 0);
220 }
221 EXPORT_SYMBOL_GPL(uv_bios_get_geoinfo);
222
> 223 extern s64 uv_bios_get_pci_topology(u64 size, u64 *buf)
224 {
225 return uv_bios_call(UV_BIOS_GET_PCI_TOPOLOGY, (u64)buf, size, 0, 0, 0);
226 }
227 EXPORT_SYMBOL_GPL(uv_bios_get_pci_topology);
228

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