* [thomas-weissschuh:b4/cros_ec-hwmon-fan-curve 6/8] drivers/hwmon/cros_ec_hwmon.c:426:11: warning: result of comparison of constant 9223372036854775807 with expression of type 'u32' (aka 'unsigned int') is always false
@ 2026-06-15 22:08 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-06-15 22:08 UTC (permalink / raw)
To: Thomas Weißschuh ; +Cc: llvm, oe-kbuild-all
tree: https://git.kernel.org/pub/scm/linux/kernel/git/thomas.weissschuh/linux.git b4/cros_ec-hwmon-fan-curve
head: 582a1b36e53f5d5ee673ad6414dd5c643373093b
commit: 0bd9cb0132cfadeb570112043e378431fe8b6484 [6/8] hwmon: (cros_ec) Add support for displaying fan curves
config: s390-allmodconfig (https://download.01.org/0day-ci/archive/20260616/202606160631.PYJS1WF9-lkp@intel.com/config)
compiler: clang version 23.0.0git (https://github.com/llvm/llvm-project e19d1f51a2c80b63cd8ca95bcc757b7077112808)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260616/202606160631.PYJS1WF9-lkp@intel.com/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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202606160631.PYJS1WF9-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> drivers/hwmon/cros_ec_hwmon.c:426:11: warning: result of comparison of constant 9223372036854775807 with expression of type 'u32' (aka 'unsigned int') is always false [-Wtautological-constant-out-of-range-compare]
426 | if (temp > LONG_MAX || cros_ec_hwmon_kelvin_to_millicelsius(temp, &temp_millicelsius))
| ~~~~ ^ ~~~~~~~~
1 warning generated.
vim +426 drivers/hwmon/cros_ec_hwmon.c
401
402 static ssize_t temp_auto_point_temp_show(struct device *dev, struct device_attribute *attr,
403 char *buf)
404 {
405 struct sensor_device_attribute_2 *sattr = to_sensor_dev_attr_2(attr);
406 struct cros_ec_hwmon_priv *priv = dev_get_drvdata(dev);
407 struct ec_thermal_config config;
408 long temp_millicelsius;
409 u32 temp;
410 int ret;
411
412 scoped_guard(hwmon_lock, dev) {
413 ret = cros_ec_hwmon_get_thermal_config(priv->cros_ec, sattr->index, &config);
414 if (ret)
415 return ret;
416 }
417
418 if (cros_ec_hwmon_attr_is_temp_fan_off(sattr))
419 temp = config.temp_fan_off;
420 else /* temp_fan_max */
421 temp = config.temp_fan_max;
422
423 if (temp == 0)
424 return -ENODATA;
425
> 426 if (temp > LONG_MAX || cros_ec_hwmon_kelvin_to_millicelsius(temp, &temp_millicelsius))
427 return -ERANGE;
428
429 return sysfs_emit(buf, "%ld\n", temp_millicelsius);
430 }
431
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-06-15 22:08 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-15 22:08 [thomas-weissschuh:b4/cros_ec-hwmon-fan-curve 6/8] drivers/hwmon/cros_ec_hwmon.c:426:11: warning: result of comparison of constant 9223372036854775807 with expression of type 'u32' (aka 'unsigned int') is always false kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox