[rafael-pm:testing 44/61] kernel/power/energy_model.c:113:15: sparse: sparse: incorrect type in assignment (different address spaces)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git testing
head:   c3c4923f2082353762e8f46dec6e3b0f165a1606
commit: ca0fc871f16f4bef746b5ba814b67afb59119700 [44/61] PM: EM: Introduce runtime modifiable table
config: x86_64-randconfig-122-20240211 (https://download.01.org/0day-ci/archive/20240212/202402121149.SmoySn7a-lkp@xxxxxxxxx/config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240212/202402121149.SmoySn7a-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/202402121149.SmoySn7a-lkp@xxxxxxxxx/

sparse warnings: (new ones prefixed by >>)
>> kernel/power/energy_model.c:113:15: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected struct em_perf_table [noderef] __rcu *table @@     got struct em_perf_table * @@
   kernel/power/energy_model.c:113:15: sparse:     expected struct em_perf_table [noderef] __rcu *table
   kernel/power/energy_model.c:113:15: sparse:     got struct em_perf_table *
>> kernel/power/energy_model.c:114:15: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const *objp @@     got struct em_perf_table [noderef] __rcu *table @@
   kernel/power/energy_model.c:114:15: sparse:     expected void const *objp
   kernel/power/energy_model.c:114:15: sparse:     got struct em_perf_table [noderef] __rcu *table
>> kernel/power/energy_model.c:119:19: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected struct callback_head *head @@     got struct callback_head [noderef] __rcu * @@
   kernel/power/energy_model.c:119:19: sparse:     expected struct callback_head *head
   kernel/power/energy_model.c:119:19: sparse:     got struct callback_head [noderef] __rcu *
>> kernel/power/energy_model.c:130:15: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected struct em_perf_table [noderef] __rcu *table @@     got void * @@
   kernel/power/energy_model.c:130:15: sparse:     expected struct em_perf_table [noderef] __rcu *table
   kernel/power/energy_model.c:130:15: sparse:     got void *
   kernel/power/energy_model.c:195:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const * @@     got struct em_perf_state [noderef] __rcu * @@
   kernel/power/energy_model.c:195:9: sparse:     expected void const *
   kernel/power/energy_model.c:195:9: sparse:     got struct em_perf_state [noderef] __rcu *
   kernel/power/energy_model.c:195:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const * @@     got struct em_perf_state [noderef] __rcu * @@
   kernel/power/energy_model.c:195:9: sparse:     expected void const *
   kernel/power/energy_model.c:195:9: sparse:     got struct em_perf_state [noderef] __rcu *
   kernel/power/energy_model.c:195:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *p @@     got struct em_perf_state [noderef] __rcu * @@
   kernel/power/energy_model.c:195:9: sparse:     expected void *p
   kernel/power/energy_model.c:195:9: sparse:     got struct em_perf_state [noderef] __rcu *

vim +113 kernel/power/energy_model.c

   108	
   109	static void em_destroy_table_rcu(struct rcu_head *rp)
   110	{
   111		struct em_perf_table __rcu *table;
   112	
 > 113		table = container_of(rp, struct em_perf_table, rcu);
 > 114		kfree(table);
   115	}
   116	
   117	static void em_free_table(struct em_perf_table __rcu *table)
   118	{
 > 119		call_rcu(&table->rcu, em_destroy_table_rcu);
   120	}
   121	
   122	static struct em_perf_table __rcu *
   123	em_allocate_table(struct em_perf_domain *pd)
   124	{
   125		struct em_perf_table __rcu *table;
   126		int table_size;
   127	
   128		table_size = sizeof(struct em_perf_state) * pd->nr_perf_states;
   129	
 > 130		table = kzalloc(sizeof(*table) + table_size, GFP_KERNEL);
   131		return table;
   132	}
   133	

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




[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]
  Powered by Linux