lkml.org 
[lkml]   [2021]   [Nov]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectarch/x86/hyperv/hv_init.c:366:21: sparse: sparse: incorrect type in assignment (different address spaces)
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 5833291ab6de9c3e2374336b51c814e515e8f3a5
commit: 99a0f46af6a7715147e81c558d558021aad4e207 x86/hyperv: extract partition ID from Microsoft Hypervisor if necessary
date: 9 months ago
config: i386-randconfig-s002-20211109 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.4-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=99a0f46af6a7715147e81c558d558021aad4e207
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 99a0f46af6a7715147e81c558d558021aad4e207
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=i386

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


sparse warnings: (new ones prefixed by >>)
arch/x86/hyperv/hv_init.c:90:30: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@ got void [noderef] __percpu ** @@
arch/x86/hyperv/hv_init.c:90:30: sparse: expected void const [noderef] __percpu *__vpp_verify
arch/x86/hyperv/hv_init.c:90:30: sparse: got void [noderef] __percpu **
arch/x86/hyperv/hv_init.c:95:39: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@ got void [noderef] __percpu ** @@
arch/x86/hyperv/hv_init.c:95:39: sparse: expected void const [noderef] __percpu *__vpp_verify
arch/x86/hyperv/hv_init.c:95:39: sparse: got void [noderef] __percpu **
arch/x86/hyperv/hv_init.c:227:30: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@ got void [noderef] __percpu ** @@
arch/x86/hyperv/hv_init.c:227:30: sparse: expected void const [noderef] __percpu *__vpp_verify
arch/x86/hyperv/hv_init.c:227:30: sparse: got void [noderef] __percpu **
arch/x86/hyperv/hv_init.c:234:39: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@ got void [noderef] __percpu ** @@
arch/x86/hyperv/hv_init.c:234:39: sparse: expected void const [noderef] __percpu *__vpp_verify
arch/x86/hyperv/hv_init.c:234:39: sparse: got void [noderef] __percpu **
arch/x86/hyperv/hv_init.c:366:24: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@ got void [noderef] __percpu ** @@
arch/x86/hyperv/hv_init.c:366:24: sparse: expected void const [noderef] __percpu *__vpp_verify
arch/x86/hyperv/hv_init.c:366:24: sparse: got void [noderef] __percpu **
>> arch/x86/hyperv/hv_init.c:366:21: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct hv_get_partition_id *output_page @@ got void [noderef] __percpu * @@
arch/x86/hyperv/hv_init.c:366:21: sparse: expected struct hv_get_partition_id *output_page
arch/x86/hyperv/hv_init.c:366:21: sparse: got void [noderef] __percpu *
arch/x86/hyperv/hv_init.c:407:31: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void [noderef] __percpu **extern [addressable] [toplevel] hyperv_pcpu_input_arg @@ got void *[noderef] __percpu * @@
arch/x86/hyperv/hv_init.c:407:31: sparse: expected void [noderef] __percpu **extern [addressable] [toplevel] hyperv_pcpu_input_arg
arch/x86/hyperv/hv_init.c:407:31: sparse: got void *[noderef] __percpu *
arch/x86/hyperv/hv_init.c:413:40: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void [noderef] __percpu **extern [addressable] [toplevel] hyperv_pcpu_output_arg @@ got void *[noderef] __percpu * @@
arch/x86/hyperv/hv_init.c:413:40: sparse: expected void [noderef] __percpu **extern [addressable] [toplevel] hyperv_pcpu_output_arg
arch/x86/hyperv/hv_init.c:413:40: sparse: got void *[noderef] __percpu *

vim +366 arch/x86/hyperv/hv_init.c

358
359 static void __init hv_get_partition_id(void)
360 {
361 struct hv_get_partition_id *output_page;
362 u64 status;
363 unsigned long flags;
364
365 local_irq_save(flags);
> 366 output_page = *this_cpu_ptr(hyperv_pcpu_output_arg);
367 status = hv_do_hypercall(HVCALL_GET_PARTITION_ID, NULL, output_page);
368 if ((status & HV_HYPERCALL_RESULT_MASK) != HV_STATUS_SUCCESS) {
369 /* No point in proceeding if this failed */
370 pr_err("Failed to get partition ID: %lld\n", status);
371 BUG();
372 }
373 hv_current_partition_id = output_page->partition_id;
374 local_irq_restore(flags);
375 }
376

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[unhandled content-type:application/gzip]
\
 
 \ /
  Last update: 2021-11-12 11:34    [W:0.035 / U:0.188 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site