Re: [PATCH v2 2/3] hwmon: ltc4283: Add support for the LTC4283 Swap Controller

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

 



Hi Nuno,

kernel test robot noticed the following build warnings:

[auto build test WARNING on 9703c672af8dd3573c76ce509dfff26bf6c4768d]

url:    https://github.com/intel-lab-lkp/linux/commits/Nuno-S-via-B4-Relay/dt-binbings-hwmon-Document-the-LTC4283-Swap-Controller/20250903-180813
base:   9703c672af8dd3573c76ce509dfff26bf6c4768d
patch link:    https://lore.kernel.org/r/20250903-ltc4283-support-v2-2-6bce091510bf%40analog.com
patch subject: [PATCH v2 2/3] hwmon: ltc4283: Add support for the LTC4283 Swap Controller
config: hexagon-allmodconfig (https://download.01.org/0day-ci/archive/20250905/202509050501.MXDrcrZA-lkp@xxxxxxxxx/config)
compiler: clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250905/202509050501.MXDrcrZA-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/202509050501.MXDrcrZA-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

>> drivers/hwmon/ltc4283.c:595:10: warning: result of comparison of constant 65536 with expression of type 'u16' (aka 'unsigned short') is always false [-Wtautological-constant-out-of-range-compare]
     595 |         if (tmp == BIT(16))
         |             ~~~ ^  ~~~~~~~
   1 warning generated.


vim +595 drivers/hwmon/ltc4283.c

   586	
   587	static int __ltc4283_write_in_history(struct ltc4283_hwmon *st,
   588					      u32 reg, long lowest, u32 fs)
   589	{
   590		__be16 __raw;
   591		u16 tmp;
   592		int ret;
   593	
   594		tmp = DIV_ROUND_CLOSEST(BIT(16) * lowest, fs);
 > 595		if (tmp == BIT(16))
   596			tmp = U16_MAX;
   597	
   598		__raw = cpu_to_be16(tmp);
   599	
   600		ret = regmap_bulk_write(st->map, reg, &__raw, sizeof(__raw));
   601		if (ret)
   602			return ret;
   603	
   604		tmp = 0;
   605		return regmap_bulk_write(st->map, reg + 1,  &tmp, sizeof(tmp));
   606	}
   607	

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




[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux