Re: [PATCH v4 10/18] PM: EM: Add RCU mechanism which safely cleans the old data

From: kernel test robot
Date: Tue Sep 26 2023 - 06:28:27 EST


Hi Lukasz,

kernel test robot noticed the following build warnings:

[auto build test WARNING on rafael-pm/linux-next]
[also build test WARNING on rafael-pm/thermal linus/master v6.6-rc3 next-20230926]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url: https://github.com/intel-lab-lkp/linux/commits/Lukasz-Luba/PM-EM-Add-missing-newline-for-the-message-log/20230925-181243
base: https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git linux-next
patch link: https://lore.kernel.org/r/20230925081139.1305766-11-lukasz.luba%40arm.com
patch subject: [PATCH v4 10/18] PM: EM: Add RCU mechanism which safely cleans the old data
config: i386-randconfig-063-20230926 (https://download.01.org/0day-ci/archive/20230926/202309261850.jrucSbN8-lkp@xxxxxxxxx/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20230926/202309261850.jrucSbN8-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/202309261850.jrucSbN8-lkp@xxxxxxxxx/

sparse warnings: (new ones prefixed by >>)
>> kernel/power/energy_model.c:125:13: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct em_perf_table *tmp @@ got struct em_perf_table [noderef] __rcu *runtime_table @@
kernel/power/energy_model.c:125:13: sparse: expected struct em_perf_table *tmp
kernel/power/energy_model.c:125:13: sparse: got struct em_perf_table [noderef] __rcu *runtime_table

vim +125 kernel/power/energy_model.c

118
119 static void em_perf_runtime_table_set(struct device *dev,
120 struct em_perf_table *runtime_table)
121 {
122 struct em_perf_domain *pd = dev->em_pd;
123 struct em_perf_table *tmp;
124
> 125 tmp = pd->runtime_table;
126
127 rcu_assign_pointer(pd->runtime_table, runtime_table);
128
129 em_cpufreq_update_efficiencies(dev, runtime_table->state);
130
131 /* Don't free default table since it's used by other frameworks. */
132 if (tmp != pd->default_table)
133 call_rcu(&tmp->rcu, em_destroy_rt_table_rcu);
134 }
135

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