All of lore.kernel.org
 help / color / mirror / Atom feed
* [hyperv-linux:hyperv-next 3/8] drivers/hv/hv_common.c:61:21: sparse: sparse: incorrect type in argument 1 (different address spaces)
@ 2021-07-23  5:11 ` kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2021-07-23  5:11 UTC (permalink / raw)
  To: Michael Kelley; +Cc: kbuild-all, linux-kernel, Wei Liu

[-- Attachment #1: Type: text/plain, Size: 6103 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux.git hyperv-next
head:   63fb60c2fcc94d595a184fa187bdfb25e5ecd4a2
commit: afca4d95dd7d7936d46a0ff02169cc40f534a6a3 [3/8] Drivers: hv: Make portions of Hyper-V init code be arch neutral
config: x86_64-randconfig-s022-20210723 (attached as .config)
compiler: gcc-10 (Ubuntu 10.3.0-1ubuntu1~20.04) 10.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.3-341-g8af24329-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux.git/commit/?id=afca4d95dd7d7936d46a0ff02169cc40f534a6a3
        git remote add hyperv-linux https://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux.git
        git fetch --no-tags hyperv-linux hyperv-next
        git checkout afca4d95dd7d7936d46a0ff02169cc40f534a6a3
        # save the attached .config to linux build tree
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64 

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 >>)
>> drivers/hv/hv_common.c:61:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void [noderef] __percpu *__pdata @@     got void [noderef] __percpu **[addressable] [toplevel] hyperv_pcpu_output_arg @@
   drivers/hv/hv_common.c:61:21: sparse:     expected void [noderef] __percpu *__pdata
   drivers/hv/hv_common.c:61:21: sparse:     got void [noderef] __percpu **[addressable] [toplevel] hyperv_pcpu_output_arg
   drivers/hv/hv_common.c:64:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void [noderef] __percpu *__pdata @@     got void [noderef] __percpu **[addressable] [toplevel] hyperv_pcpu_input_arg @@
   drivers/hv/hv_common.c:64:21: sparse:     expected void [noderef] __percpu *__pdata
   drivers/hv/hv_common.c:64:21: sparse:     got void [noderef] __percpu **[addressable] [toplevel] hyperv_pcpu_input_arg
   drivers/hv/hv_common.c:78:31: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected void [noderef] __percpu **[addressable] [assigned] [toplevel] hyperv_pcpu_input_arg @@     got void *[noderef] __percpu * @@
   drivers/hv/hv_common.c:78:31: sparse:     expected void [noderef] __percpu **[addressable] [assigned] [toplevel] hyperv_pcpu_input_arg
   drivers/hv/hv_common.c:78:31: sparse:     got void *[noderef] __percpu *
>> drivers/hv/hv_common.c:83:40: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected void [noderef] __percpu **[addressable] [assigned] [toplevel] hyperv_pcpu_output_arg @@     got void *[noderef] __percpu * @@
   drivers/hv/hv_common.c:83:40: sparse:     expected void [noderef] __percpu **[addressable] [assigned] [toplevel] hyperv_pcpu_output_arg
   drivers/hv/hv_common.c:83:40: sparse:     got void *[noderef] __percpu *
   drivers/hv/hv_common.c:116:29: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected void const [noderef] __percpu *__vpp_verify @@     got void [noderef] __percpu ** @@
   drivers/hv/hv_common.c:116:29: sparse:     expected void const [noderef] __percpu *__vpp_verify
   drivers/hv/hv_common.c:116:29: sparse:     got void [noderef] __percpu **
   drivers/hv/hv_common.c:122:38: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected void const [noderef] __percpu *__vpp_verify @@     got void [noderef] __percpu ** @@
   drivers/hv/hv_common.c:122:38: sparse:     expected void const [noderef] __percpu *__vpp_verify
   drivers/hv/hv_common.c:122:38: sparse:     got void [noderef] __percpu **
   drivers/hv/hv_common.c:144:29: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected void const [noderef] __percpu *__vpp_verify @@     got void [noderef] __percpu ** @@
   drivers/hv/hv_common.c:144:29: sparse:     expected void const [noderef] __percpu *__vpp_verify
   drivers/hv/hv_common.c:144:29: sparse:     got void [noderef] __percpu **
   drivers/hv/hv_common.c:149:38: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected void const [noderef] __percpu *__vpp_verify @@     got void [noderef] __percpu ** @@
   drivers/hv/hv_common.c:149:38: sparse:     expected void const [noderef] __percpu *__vpp_verify
   drivers/hv/hv_common.c:149:38: sparse:     got void [noderef] __percpu **

vim +61 drivers/hv/hv_common.c

    49	
    50	/*
    51	 * Hyper-V specific initialization and shutdown code that is
    52	 * common across all architectures.  Called from architecture
    53	 * specific initialization functions.
    54	 */
    55	
    56	void __init hv_common_free(void)
    57	{
    58		kfree(hv_vp_index);
    59		hv_vp_index = NULL;
    60	
  > 61		free_percpu(hyperv_pcpu_output_arg);
    62		hyperv_pcpu_output_arg = NULL;
    63	
    64		free_percpu(hyperv_pcpu_input_arg);
    65		hyperv_pcpu_input_arg = NULL;
    66	}
    67	
    68	int __init hv_common_init(void)
    69	{
    70		int i;
    71	
    72		/*
    73		 * Allocate the per-CPU state for the hypercall input arg.
    74		 * If this allocation fails, we will not be able to setup
    75		 * (per-CPU) hypercall input page and thus this failure is
    76		 * fatal on Hyper-V.
    77		 */
    78		hyperv_pcpu_input_arg = alloc_percpu(void  *);
    79		BUG_ON(!hyperv_pcpu_input_arg);
    80	
    81		/* Allocate the per-CPU state for output arg for root */
    82		if (hv_root_partition) {
  > 83			hyperv_pcpu_output_arg = alloc_percpu(void *);
    84			BUG_ON(!hyperv_pcpu_output_arg);
    85		}
    86	
    87		hv_vp_index = kmalloc_array(num_possible_cpus(), sizeof(*hv_vp_index),
    88					    GFP_KERNEL);
    89		if (!hv_vp_index) {
    90			hv_common_free();
    91			return -ENOMEM;
    92		}
    93	
    94		for (i = 0; i < num_possible_cpus(); i++)
    95			hv_vp_index[i] = VP_INVAL;
    96	
    97		return 0;
    98	}
    99	

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

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 33841 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [hyperv-linux:hyperv-next 3/8] drivers/hv/hv_common.c:61:21: sparse: sparse: incorrect type in argument 1 (different address spaces)
@ 2021-07-23  5:11 ` kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2021-07-23  5:11 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 6205 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux.git hyperv-next
head:   63fb60c2fcc94d595a184fa187bdfb25e5ecd4a2
commit: afca4d95dd7d7936d46a0ff02169cc40f534a6a3 [3/8] Drivers: hv: Make portions of Hyper-V init code be arch neutral
config: x86_64-randconfig-s022-20210723 (attached as .config)
compiler: gcc-10 (Ubuntu 10.3.0-1ubuntu1~20.04) 10.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.3-341-g8af24329-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux.git/commit/?id=afca4d95dd7d7936d46a0ff02169cc40f534a6a3
        git remote add hyperv-linux https://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux.git
        git fetch --no-tags hyperv-linux hyperv-next
        git checkout afca4d95dd7d7936d46a0ff02169cc40f534a6a3
        # save the attached .config to linux build tree
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64 

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 >>)
>> drivers/hv/hv_common.c:61:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void [noderef] __percpu *__pdata @@     got void [noderef] __percpu **[addressable] [toplevel] hyperv_pcpu_output_arg @@
   drivers/hv/hv_common.c:61:21: sparse:     expected void [noderef] __percpu *__pdata
   drivers/hv/hv_common.c:61:21: sparse:     got void [noderef] __percpu **[addressable] [toplevel] hyperv_pcpu_output_arg
   drivers/hv/hv_common.c:64:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void [noderef] __percpu *__pdata @@     got void [noderef] __percpu **[addressable] [toplevel] hyperv_pcpu_input_arg @@
   drivers/hv/hv_common.c:64:21: sparse:     expected void [noderef] __percpu *__pdata
   drivers/hv/hv_common.c:64:21: sparse:     got void [noderef] __percpu **[addressable] [toplevel] hyperv_pcpu_input_arg
   drivers/hv/hv_common.c:78:31: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected void [noderef] __percpu **[addressable] [assigned] [toplevel] hyperv_pcpu_input_arg @@     got void *[noderef] __percpu * @@
   drivers/hv/hv_common.c:78:31: sparse:     expected void [noderef] __percpu **[addressable] [assigned] [toplevel] hyperv_pcpu_input_arg
   drivers/hv/hv_common.c:78:31: sparse:     got void *[noderef] __percpu *
>> drivers/hv/hv_common.c:83:40: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected void [noderef] __percpu **[addressable] [assigned] [toplevel] hyperv_pcpu_output_arg @@     got void *[noderef] __percpu * @@
   drivers/hv/hv_common.c:83:40: sparse:     expected void [noderef] __percpu **[addressable] [assigned] [toplevel] hyperv_pcpu_output_arg
   drivers/hv/hv_common.c:83:40: sparse:     got void *[noderef] __percpu *
   drivers/hv/hv_common.c:116:29: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected void const [noderef] __percpu *__vpp_verify @@     got void [noderef] __percpu ** @@
   drivers/hv/hv_common.c:116:29: sparse:     expected void const [noderef] __percpu *__vpp_verify
   drivers/hv/hv_common.c:116:29: sparse:     got void [noderef] __percpu **
   drivers/hv/hv_common.c:122:38: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected void const [noderef] __percpu *__vpp_verify @@     got void [noderef] __percpu ** @@
   drivers/hv/hv_common.c:122:38: sparse:     expected void const [noderef] __percpu *__vpp_verify
   drivers/hv/hv_common.c:122:38: sparse:     got void [noderef] __percpu **
   drivers/hv/hv_common.c:144:29: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected void const [noderef] __percpu *__vpp_verify @@     got void [noderef] __percpu ** @@
   drivers/hv/hv_common.c:144:29: sparse:     expected void const [noderef] __percpu *__vpp_verify
   drivers/hv/hv_common.c:144:29: sparse:     got void [noderef] __percpu **
   drivers/hv/hv_common.c:149:38: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected void const [noderef] __percpu *__vpp_verify @@     got void [noderef] __percpu ** @@
   drivers/hv/hv_common.c:149:38: sparse:     expected void const [noderef] __percpu *__vpp_verify
   drivers/hv/hv_common.c:149:38: sparse:     got void [noderef] __percpu **

vim +61 drivers/hv/hv_common.c

    49	
    50	/*
    51	 * Hyper-V specific initialization and shutdown code that is
    52	 * common across all architectures.  Called from architecture
    53	 * specific initialization functions.
    54	 */
    55	
    56	void __init hv_common_free(void)
    57	{
    58		kfree(hv_vp_index);
    59		hv_vp_index = NULL;
    60	
  > 61		free_percpu(hyperv_pcpu_output_arg);
    62		hyperv_pcpu_output_arg = NULL;
    63	
    64		free_percpu(hyperv_pcpu_input_arg);
    65		hyperv_pcpu_input_arg = NULL;
    66	}
    67	
    68	int __init hv_common_init(void)
    69	{
    70		int i;
    71	
    72		/*
    73		 * Allocate the per-CPU state for the hypercall input arg.
    74		 * If this allocation fails, we will not be able to setup
    75		 * (per-CPU) hypercall input page and thus this failure is
    76		 * fatal on Hyper-V.
    77		 */
    78		hyperv_pcpu_input_arg = alloc_percpu(void  *);
    79		BUG_ON(!hyperv_pcpu_input_arg);
    80	
    81		/* Allocate the per-CPU state for output arg for root */
    82		if (hv_root_partition) {
  > 83			hyperv_pcpu_output_arg = alloc_percpu(void *);
    84			BUG_ON(!hyperv_pcpu_output_arg);
    85		}
    86	
    87		hv_vp_index = kmalloc_array(num_possible_cpus(), sizeof(*hv_vp_index),
    88					    GFP_KERNEL);
    89		if (!hv_vp_index) {
    90			hv_common_free();
    91			return -ENOMEM;
    92		}
    93	
    94		for (i = 0; i < num_possible_cpus(); i++)
    95			hv_vp_index[i] = VP_INVAL;
    96	
    97		return 0;
    98	}
    99	

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

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 33841 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-07-23  5:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-23  5:11 [hyperv-linux:hyperv-next 3/8] drivers/hv/hv_common.c:61:21: sparse: sparse: incorrect type in argument 1 (different address spaces) kernel test robot
2021-07-23  5:11 ` kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.