[rafael-pm:thermal-core-testing 25/28] drivers/thermal/thermal_of.c:321:28: error: use of undeclared identifier 'map_np'

[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 thermal-core-testing
head:   41bf1a2a2fc20676ee073bbcb20fdd0bccc62245
commit: 0c361ef704f9e22f6f062b73542c845440c2c043 [25/28] thermal/of: Use the .should_bind() thermal zone callback
config: arm-defconfig (https://download.01.org/0day-ci/archive/20240731/202407311944.iOv9zv1c-lkp@xxxxxxxxx/config)
compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project f28c006a5895fc0e329fe15fead81e37457cb1d1)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240731/202407311944.iOv9zv1c-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/202407311944.iOv9zv1c-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

>> drivers/thermal/thermal_of.c:321:28: error: use of undeclared identifier 'map_np'
                   tr_np = of_parse_phandle(map_np, "trip", 0);
                                            ^
   1 error generated.


vim +/map_np +321 drivers/thermal/thermal_of.c

   297	
   298	static bool thermal_of_should_bind(struct thermal_zone_device *tz,
   299					   const struct thermal_trip *trip,
   300					   struct thermal_cooling_device *cdev,
   301					   struct cooling_spec *c)
   302	{
   303		struct device_node *tz_np, *cm_np, *child;
   304		bool result = false;
   305	
   306		tz_np = thermal_of_zone_get_by_name(tz);
   307		if (IS_ERR(tz_np)) {
   308			pr_err("Failed to get node tz by name\n");
   309			return false;
   310		}
   311	
   312		cm_np = of_get_child_by_name(tz_np, "cooling-maps");
   313		if (!cm_np)
   314			goto out;
   315	
   316		/* Look up the trip and the cdev in the cooling maps. */
   317		for_each_child_of_node(cm_np, child) {
   318			struct device_node *tr_np;
   319			int count, i;
   320	
 > 321			tr_np = of_parse_phandle(map_np, "trip", 0);
   322			if (tr_np != trip->priv) {
   323				of_node_put(child);
   324				continue;
   325			}
   326	
   327			/* The trip has been found, look up the cdev. */
   328			count = of_count_phandle_with_args(child, "cooling-device", "#cooling-cells");
   329			if (count <= 0)
   330				pr_err("Add a cooling_device property with at least one device\n");
   331	
   332			for (i = 0; i < count; i++) {
   333				result = thermal_of_get_cooling_spec(child, i, cdev, c);
   334				if (result)
   335					break;
   336			}
   337	
   338			of_node_put(child);
   339			break;
   340		}
   341	
   342		of_node_put(cm_np);
   343	out:
   344		of_node_put(tz_np);
   345	
   346		return result;
   347	}
   348	

-- 
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