Re: [PATCH 3/4] PM: EM: Add em_dev_update_chip_binning()

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

 



Hi Lukasz,

kernel test robot noticed the following build warnings:

[auto build test WARNING on rafael-pm/linux-next]
[also build test WARNING on linus/master next-20240315]
[cannot apply to krzk/for-next clk/clk-next soc/for-next rafael-pm/acpi-bus rafael-pm/devprop v6.8]
[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/OPP-OF-Export-dev_opp_pm_calc_power-for-usage-from-EM/20240314-220719
base:   https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git linux-next
patch link:    https://lore.kernel.org/r/20240314140421.3563571-4-lukasz.luba%40arm.com
patch subject: [PATCH 3/4] PM: EM: Add em_dev_update_chip_binning()
config: x86_64-randconfig-123-20240315 (https://download.01.org/0day-ci/archive/20240315/202403152322.1OIlZSAj-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/20240315/202403152322.1OIlZSAj-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/202403152322.1OIlZSAj-lkp@xxxxxxxxx/

sparse warnings: (new ones prefixed by >>)
   kernel/power/energy_model.c:168: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:168:15: sparse:     expected struct em_perf_table [noderef] __rcu *table
   kernel/power/energy_model.c:168:15: sparse:     got struct em_perf_table *
   kernel/power/energy_model.c:169: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:169:15: sparse:     expected void const *objp
   kernel/power/energy_model.c:169:15: sparse:     got struct em_perf_table [noderef] __rcu *table
   kernel/power/energy_model.c:177: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:177:15: sparse:     expected struct em_perf_table [noderef] __rcu *table
   kernel/power/energy_model.c:177:15: sparse:     got struct em_perf_table *
   kernel/power/energy_model.c:179: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:179:19: sparse:     expected struct callback_head *head
   kernel/power/energy_model.c:179:19: sparse:     got struct callback_head [noderef] __rcu *
   kernel/power/energy_model.c:190:19: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected struct kref *kref @@     got struct kref [noderef] __rcu * @@
   kernel/power/energy_model.c:190:19: sparse:     expected struct kref *kref
   kernel/power/energy_model.c:190:19: sparse:     got struct kref [noderef] __rcu *
   kernel/power/energy_model.c:208: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:208:15: sparse:     expected struct em_perf_table [noderef] __rcu *table
   kernel/power/energy_model.c:208:15: sparse:     got void *
   kernel/power/energy_model.c:212:20: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected struct kref *kref @@     got struct kref [noderef] __rcu * @@
   kernel/power/energy_model.c:212:20: sparse:     expected struct kref *kref
   kernel/power/energy_model.c:212:20: sparse:     got struct kref [noderef] __rcu *
   kernel/power/energy_model.c:328:19: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected struct kref *kref @@     got struct kref [noderef] __rcu * @@
   kernel/power/energy_model.c:328:19: sparse:     expected struct kref *kref
   kernel/power/energy_model.c:328:19: sparse:     got struct kref [noderef] __rcu *
   kernel/power/energy_model.c:333:45: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected struct em_perf_state *table @@     got struct em_perf_state [noderef] __rcu * @@
   kernel/power/energy_model.c:333:45: sparse:     expected struct em_perf_state *table
   kernel/power/energy_model.c:333:45: sparse:     got struct em_perf_state [noderef] __rcu *
   kernel/power/energy_model.c:433:45: sparse: sparse: incorrect type in argument 3 (different address spaces) @@     expected struct em_perf_state *table @@     got struct em_perf_state [noderef] __rcu * @@
   kernel/power/energy_model.c:433:45: sparse:     expected struct em_perf_state *table
   kernel/power/energy_model.c:433:45: sparse:     got struct em_perf_state [noderef] __rcu *
   kernel/power/energy_model.c:450:15: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const *objp @@     got struct em_perf_table [noderef] __rcu *[assigned] em_table @@
   kernel/power/energy_model.c:450:15: sparse:     expected void const *objp
   kernel/power/energy_model.c:450:15: sparse:     got struct em_perf_table [noderef] __rcu *[assigned] em_table
   kernel/power/energy_model.c:621:55: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected struct em_perf_state *table @@     got struct em_perf_state [noderef] __rcu * @@
   kernel/power/energy_model.c:621:55: sparse:     expected struct em_perf_state *table
   kernel/power/energy_model.c:621:55: sparse:     got struct em_perf_state [noderef] __rcu *
   kernel/power/energy_model.c:676:16: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected struct em_perf_state *new_ps @@     got struct em_perf_state [noderef] __rcu * @@
   kernel/power/energy_model.c:676:16: sparse:     expected struct em_perf_state *new_ps
   kernel/power/energy_model.c:676:16: sparse:     got struct em_perf_state [noderef] __rcu *
   kernel/power/energy_model.c:694:37: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected struct em_perf_state *table @@     got struct em_perf_state [noderef] __rcu * @@
   kernel/power/energy_model.c:694:37: sparse:     expected struct em_perf_state *table
   kernel/power/energy_model.c:694:37: sparse:     got struct em_perf_state [noderef] __rcu *
   kernel/power/energy_model.c:729:38: sparse: sparse: incorrect type in argument 3 (different address spaces) @@     expected struct em_perf_state *table @@     got struct em_perf_state [noderef] __rcu * @@
   kernel/power/energy_model.c:729:38: sparse:     expected struct em_perf_state *table
   kernel/power/energy_model.c:729:38: sparse:     got struct em_perf_state [noderef] __rcu *
>> kernel/power/energy_model.c:836:53: sparse: sparse: dereference of noderef expression
   kernel/power/energy_model.c:845:32: sparse: sparse: dereference of noderef expression

vim +836 kernel/power/energy_model.c

   800	
   801	/**
   802	 * em_dev_update_chip_binning() - Update Energy Model with new values after
   803	 *			the new voltage information is present in the OPPs.
   804	 * @dev		: Device for which the Energy Model has to be updated.
   805	 *
   806	 * This function allows to update easily the EM with new values available in
   807	 * the OPP framework and DT. It can be used after the chip has been properly
   808	 * verified by device drivers and the voltages adjusted for the 'chip binning'.
   809	 * It uses the "dynamic-power-coefficient" DT property to calculate the power
   810	 * values for EM. For power calculation it uses the new adjusted voltage
   811	 * values known for OPPs, which might be changed after boot.
   812	 */
   813	int em_dev_update_chip_binning(struct device *dev)
   814	{
   815		struct em_perf_table __rcu *em_table;
   816		struct em_perf_domain *pd;
   817		int i, ret;
   818	
   819		if (IS_ERR_OR_NULL(dev))
   820			return -EINVAL;
   821	
   822		pd = em_pd_get(dev);
   823		if (!pd) {
   824			dev_warn(dev, "Couldn't find Energy Model %d\n", ret);
   825			return -EINVAL;
   826		}
   827	
   828		em_table = em_table_dup(pd);
   829		if (!em_table) {
   830			dev_warn(dev, "EM: allocation failed\n");
   831			return -ENOMEM;
   832		}
   833	
   834		/* Update power values which might change due to new voltage in OPPs */
   835		for (i = 0; i < pd->nr_perf_states; i++) {
 > 836			unsigned long freq = em_table->state[i].frequency;

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




[Index of Archives]     [Linux SoC Development]     [Linux Rockchip Development]     [Linux for Synopsys ARC Processors]    
  • [Linux on Unisoc (RDA Micro) SoCs]     [Linux Actions SoC]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Linux SCSI]     [Yosemite News]

  •   Powered by Linux