tree: https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git bleeding-edge head: afefac1395033609973da997224eceaece6dadf5 commit: 9b418d5c9b5a55f320ee2fef00825ec9a8cf582f [136/137] thermal: uniphier: Use thermal_zone_for_each_trip() for walking trip points config: i386-buildonly-randconfig-002-20240703 (https://download.01.org/0day-ci/archive/20240703/202407032000.Lvc01b58-lkp@xxxxxxxxx/config) compiler: gcc-13 (Ubuntu 13.2.0-4ubuntu3) 13.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240703/202407032000.Lvc01b58-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/202407032000.Lvc01b58-lkp@xxxxxxxxx/ All warnings (new ones prefixed by >>): drivers/thermal/uniphier_thermal.c: In function 'uniphier_tm_probe': >> drivers/thermal/uniphier_thermal.c:269:13: warning: unused variable 'i' [-Wunused-variable] 269 | int i, ret, irq; | ^ vim +/i +269 drivers/thermal/uniphier_thermal.c 261 262 static int uniphier_tm_probe(struct platform_device *pdev) 263 { 264 struct trip_walk_data twd = { .crit_temp = INT_MAX, .index = 0 }; 265 struct device *dev = &pdev->dev; 266 struct regmap *regmap; 267 struct device_node *parent; 268 struct uniphier_tm_dev *tdev; > 269 int i, ret, irq; 270 271 tdev = devm_kzalloc(dev, sizeof(*tdev), GFP_KERNEL); 272 if (!tdev) 273 return -ENOMEM; 274 tdev->dev = dev; 275 276 tdev->data = of_device_get_match_data(dev); 277 if (WARN_ON(!tdev->data)) 278 return -EINVAL; 279 280 irq = platform_get_irq(pdev, 0); 281 if (irq < 0) 282 return irq; 283 284 /* get regmap from syscon node */ 285 parent = of_get_parent(dev->of_node); /* parent should be syscon node */ 286 regmap = syscon_node_to_regmap(parent); 287 of_node_put(parent); 288 if (IS_ERR(regmap)) { 289 dev_err(dev, "failed to get regmap (error %ld)\n", 290 PTR_ERR(regmap)); 291 return PTR_ERR(regmap); 292 } 293 tdev->regmap = regmap; 294 295 ret = uniphier_tm_initialize_sensor(tdev); 296 if (ret) { 297 dev_err(dev, "failed to initialize sensor\n"); 298 return ret; 299 } 300 301 ret = devm_request_threaded_irq(dev, irq, uniphier_tm_alarm_irq, 302 uniphier_tm_alarm_irq_thread, 303 0, "thermal", tdev); 304 if (ret) 305 return ret; 306 307 platform_set_drvdata(pdev, tdev); 308 309 tdev->tz_dev = devm_thermal_of_zone_register(dev, 0, tdev, 310 &uniphier_of_thermal_ops); 311 if (IS_ERR(tdev->tz_dev)) { 312 dev_err(dev, "failed to register sensor device\n"); 313 return PTR_ERR(tdev->tz_dev); 314 } 315 316 /* set alert temperatures */ 317 twd.tdev = tdev; 318 thermal_zone_for_each_trip(tdev->tz_dev, uniphier_tm_trip_walk_cb, &twd); 319 320 if (twd.crit_temp > CRITICAL_TEMP_LIMIT) { 321 dev_err(dev, "critical trip is over limit(>%d), or not set\n", 322 CRITICAL_TEMP_LIMIT); 323 return -EINVAL; 324 } 325 326 uniphier_tm_enable_sensor(tdev); 327 328 return 0; 329 } 330 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki