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] [thread-next>] [day] [month] [year] [list]
Message-ID: <202209062220.LszZ5ZOr-lkp@intel.com>
Date:   Tue, 6 Sep 2022 22:54:57 +0800
From:   kernel test robot <lkp@...el.com>
To:     Jagath Jog J <jagathjog1996@...il.com>,
        alexandre.belloni@...tlin.com, a.zummo@...ertech.it,
        robh+dt@...nel.org, krzysztof.kozlowski+dt@...aro.org
Cc:     llvm@...ts.linux.dev, kbuild-all@...ts.01.org,
        linux-rtc@...r.kernel.org, linux-kernel@...r.kernel.org,
        devicetree@...r.kernel.org, jagathjog1996@...il.com
Subject: Re: [PATCH v1 2/2] rtc: maxim: Add Maxim max31329 real time clock.

Hi Jagath,

I love your patch! Perhaps something to improve:

[auto build test WARNING on abelloni/rtc-next]
[also build test WARNING on linus/master v6.0-rc4 next-20220906]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Jagath-Jog-J/rtc-add-Maxim-max31329-real-time-clock/20220904-124909
base:   https://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux.git rtc-next
config: arm64-randconfig-r031-20220906
compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project c55b41d5199d2394dd6cdb8f52180d8b81d809d4)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install arm64 cross compiling tool for clang build
        # apt-get install binutils-aarch64-linux-gnu
        # https://github.com/intel-lab-lkp/linux/commit/f26f983311b0118951e7420008ed4138784f8a77
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Jagath-Jog-J/rtc-add-Maxim-max31329-real-time-clock/20220904-124909
        git checkout f26f983311b0118951e7420008ed4138784f8a77
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm64 SHELL=/bin/bash arch/arm64/kernel/ drivers/rtc/

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@...el.com>

All warnings (new ones prefixed by >>):

>> drivers/rtc/rtc-max31329.c:270:6: warning: variable 'events' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
           if (flags & MAX31329_STATUS_A1F) {
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/rtc/rtc-max31329.c:276:6: note: uninitialized use occurs here
           if (events) {
               ^~~~~~
   drivers/rtc/rtc-max31329.c:270:2: note: remove the 'if' if its condition is always true
           if (flags & MAX31329_STATUS_A1F) {
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/rtc/rtc-max31329.c:255:22: note: initialize the variable 'events' to silence this warning
           unsigned long events;
                               ^
                                = 0
   1 warning generated.


vim +270 drivers/rtc/rtc-max31329.c

   249	
   250	static irqreturn_t max31329_irq_handler(int irq, void *dev_id)
   251	{
   252		struct device *dev = dev_id;
   253		struct max31329_data *max31329 = dev_get_drvdata(dev);
   254		unsigned int flags, controls;
   255		unsigned long events;
   256		int ret;
   257	
   258		ret = regmap_read(max31329->regmap, MAX31329_INT_EN_REG, &controls);
   259		if (ret) {
   260			dev_warn(dev, "Read IRQ control register error %d\n", ret);
   261			return IRQ_NONE;
   262		}
   263	
   264		ret = regmap_read(max31329->regmap, MAX31329_STATUS_REG, &flags);
   265		if (ret) {
   266			dev_warn(dev, "Read IRQ flags register error %d\n", ret);
   267			return IRQ_NONE;
   268		}
   269	
 > 270		if (flags & MAX31329_STATUS_A1F) {
   271			flags &= ~MAX31329_STATUS_A1F;
   272			controls &= ~MAX31329_INT_EN_A1IE;
   273			events = RTC_AF | RTC_IRQF;
   274		}
   275	
   276		if (events) {
   277			rtc_update_irq(max31329->rtc, 1, events);
   278			regmap_write(max31329->regmap, MAX31329_STATUS_REG, flags);
   279			regmap_write(max31329->regmap, MAX31329_INT_EN_REG, controls);
   280			return IRQ_HANDLED;
   281		}
   282	
   283		return IRQ_NONE;
   284	}
   285	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

View attachment "config" of type "text/plain" (214288 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ