lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <202510161332.ntymBLFJ-lkp@intel.com>
Date: Thu, 16 Oct 2025 13:31:14 +0800
From: kernel test robot <lkp@...el.com>
To: Ariana Lazar <ariana.lazar@...rochip.com>,
	Jonathan Cameron <jic23@...nel.org>,
	David Lechner <dlechner@...libre.com>,
	Nuno Sá <nuno.sa@...log.com>,
	Andy Shevchenko <andy@...nel.org>, Rob Herring <robh@...nel.org>,
	Krzysztof Kozlowski <krzk@...nel.org>,
	Conor Dooley <conor+dt@...nel.org>
Cc: llvm@...ts.linux.dev, oe-kbuild-all@...ts.linux.dev,
	linux-iio@...r.kernel.org, devicetree@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	Ariana Lazar <ariana.lazar@...rochip.com>
Subject: Re: [PATCH 2/2] iio: adc: adding support for PAC1711

Hi Ariana,

kernel test robot noticed the following build warnings:

[auto build test WARNING on 19272b37aa4f83ca52bdf9c16d5d81bdd1354494]

url:    https://github.com/intel-lab-lkp/linux/commits/Ariana-Lazar/dt-bindings-iio-adc-adding-support-for-PAC1711/20251016-002337
base:   19272b37aa4f83ca52bdf9c16d5d81bdd1354494
patch link:    https://lore.kernel.org/r/20251015-pac1711-v1-2-976949e36367%40microchip.com
patch subject: [PATCH 2/2] iio: adc: adding support for PAC1711
config: s390-allmodconfig (https://download.01.org/0day-ci/archive/20251016/202510161332.ntymBLFJ-lkp@intel.com/config)
compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251016/202510161332.ntymBLFJ-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@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202510161332.ntymBLFJ-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> drivers/iio/adc/pac1711.c:459:6: warning: variable 'ret' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
     459 |         if (time_after(jiffies, info->chip_reg_data.jiffies_tstamp +
         |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     460 |                         msecs_to_jiffies(PAC1711_MIN_POLLING_TIME_MS))) {
         |                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/jiffies.h:128:2: note: expanded from macro 'time_after'
     128 |         (typecheck(unsigned long, a) && \
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     129 |          typecheck(unsigned long, b) && \
         |          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     130 |          ((long)((b) - (a)) < 0))
         |          ~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/iio/adc/pac1711.c:473:9: note: uninitialized use occurs here
     473 |         return ret;
         |                ^~~
   drivers/iio/adc/pac1711.c:459:2: note: remove the 'if' if its condition is always true
     459 |         if (time_after(jiffies, info->chip_reg_data.jiffies_tstamp +
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     460 |                         msecs_to_jiffies(PAC1711_MIN_POLLING_TIME_MS))) {
         |                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/iio/adc/pac1711.c:453:9: note: initialize the variable 'ret' to silence this warning
     453 |         int ret;
         |                ^
         |                 = 0
>> drivers/iio/adc/pac1711.c:1124:29: warning: variable 'ret' is uninitialized when used here [-Wuninitialized]
    1124 |                 return dev_err_probe(dev, ret, "shunt-resistor property does not exist\n");
         |                                           ^~~
   drivers/iio/adc/pac1711.c:1116:9: note: initialize the variable 'ret' to silence this warning
    1116 |         int ret, temp;
         |                ^
         |                 = 0
   2 warnings generated.


vim +459 drivers/iio/adc/pac1711.c

   449	
   450	static int pac1711_retrieve_data(struct pac1711_chip_info *info,
   451					 u32 wait_time)
   452	{
   453		int ret;
   454	
   455		/*
   456		 * check if the minimal elapsed time has passed and if so,
   457		 * re-read the chip, otherwise the cached info is just fine
   458		 */
 > 459		if (time_after(jiffies, info->chip_reg_data.jiffies_tstamp +
   460				msecs_to_jiffies(PAC1711_MIN_POLLING_TIME_MS))) {
   461			ret = pac1711_reg_snapshot(info, true, PAC1711_REFRESH_REG_ADDR,
   462						   wait_time);
   463	
   464			/*
   465			 * Re-schedule the work for the read registers timeout
   466			 * (to prevent chip regs saturation)
   467			 */
   468			cancel_delayed_work_sync(&info->work_chip_rfsh);
   469			schedule_delayed_work(&info->work_chip_rfsh,
   470					      msecs_to_jiffies(PAC1711_MAX_RFSH_LIMIT_MS));
   471		}
   472	
   473		return ret;
   474	}
   475	

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ