:::::: :::::: Manual check reason: "low confidence bisect report" :::::: Manual check reason: "low confidence static check warning: drivers/rtc/rtc-isl12022.c:119:22: warning: use of uninitialized value '<unknown>' [CWE-457] [-Wanalyzer-use-of-uninitialized-value]" ::::::
BCC: l...@intel.com CC: kbuild-...@lists.01.org In-Reply-To: <20220830100152.698506-6-li...@rasmusvillemoes.dk> References: <20220830100152.698506-6-li...@rasmusvillemoes.dk> TO: Rasmus Villemoes <li...@rasmusvillemoes.dk> TO: Alessandro Zummo <a.zu...@towertech.it> TO: Alexandre Belloni <alexandre.bell...@bootlin.com> CC: Rasmus Villemoes <li...@rasmusvillemoes.dk> CC: linux-...@vger.kernel.org CC: linux-ker...@vger.kernel.org Hi Rasmus, 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-rc3 next-20220831] [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/Rasmus-Villemoes/rtc-isl12022-cleanups-and-hwmon-support/20220830-180614 base: https://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux.git rtc-next :::::: branch date: 30 hours ago :::::: commit date: 30 hours ago config: arm-randconfig-c002-20220830 (https://download.01.org/0day-ci/archive/20220901/202209010045.ydx5wkus-...@intel.com/config) compiler: arm-linux-gnueabi-gcc (GCC) 12.1.0 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 # https://github.com/intel-lab-lkp/linux/commit/7e7902b5b5d2b1508602203d0632a4f5390fcc35 git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review Rasmus-Villemoes/rtc-isl12022-cleanups-and-hwmon-support/20220830-180614 git checkout 7e7902b5b5d2b1508602203d0632a4f5390fcc35 # save the config file COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross ARCH=arm KBUILD_USERCFLAGS='-fanalyzer -Wno-error' If you fix the issue, kindly add following tag where applicable Reported-by: kernel test robot <l...@intel.com> gcc_analyzer warnings: (new ones prefixed by >>) drivers/rtc/rtc-isl12022.c: In function 'isl12022_rtc_set_time': >> drivers/rtc/rtc-isl12022.c:119:22: warning: use of uninitialized value >> '<unknown>' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 119 | bool change; | ^~~~~~ 'isl12022_rtc_set_time': events 1-3 | | 118 | if (!isl12022->write_enabled) { | | ^ | | | | | (1) following 'false' branch... | 119 | bool change; | | ~~~~~~ | | | | | (2) ...to here | | (3) use of uninitialized value '<unknown>' here | vim +119 drivers/rtc/rtc-isl12022.c d6c7428f9c2b1d Roman Fietze 2010-08-10 104 143d92bea3dcda Alexandre Belloni 2018-02-20 105 static int isl12022_rtc_set_time(struct device *dev, struct rtc_time *tm) d6c7428f9c2b1d Roman Fietze 2010-08-10 106 { e66895fce1795b Rasmus Villemoes 2022-08-30 107 struct isl12022 *isl12022 = dev_get_drvdata(dev); 7e7902b5b5d2b1 Rasmus Villemoes 2022-08-30 108 struct regmap *regmap = isl12022->regmap; d6c7428f9c2b1d Roman Fietze 2010-08-10 109 int ret; d6c7428f9c2b1d Roman Fietze 2010-08-10 110 uint8_t buf[ISL12022_REG_DW + 1]; d6c7428f9c2b1d Roman Fietze 2010-08-10 111 e1ee69e8c1cc7f Rasmus Villemoes 2022-08-30 112 dev_dbg(dev, "%s: secs=%d, mins=%d, hours=%d, " d6c7428f9c2b1d Roman Fietze 2010-08-10 113 "mday=%d, mon=%d, year=%d, wday=%d\n", d6c7428f9c2b1d Roman Fietze 2010-08-10 114 __func__, d6c7428f9c2b1d Roman Fietze 2010-08-10 115 tm->tm_sec, tm->tm_min, tm->tm_hour, d6c7428f9c2b1d Roman Fietze 2010-08-10 116 tm->tm_mday, tm->tm_mon, tm->tm_year, tm->tm_wday); d6c7428f9c2b1d Roman Fietze 2010-08-10 117 d6c7428f9c2b1d Roman Fietze 2010-08-10 118 if (!isl12022->write_enabled) { 7e7902b5b5d2b1 Rasmus Villemoes 2022-08-30 @119 bool change; d6c7428f9c2b1d Roman Fietze 2010-08-10 120 7e7902b5b5d2b1 Rasmus Villemoes 2022-08-30 121 ret = regmap_update_bits_check(regmap, ISL12022_REG_INT, 7e7902b5b5d2b1 Rasmus Villemoes 2022-08-30 122 ISL12022_INT_WRTC, ISL12022_INT_WRTC, 7e7902b5b5d2b1 Rasmus Villemoes 2022-08-30 123 &change); d6c7428f9c2b1d Roman Fietze 2010-08-10 124 if (ret) d6c7428f9c2b1d Roman Fietze 2010-08-10 125 return ret; d6c7428f9c2b1d Roman Fietze 2010-08-10 126 7e7902b5b5d2b1 Rasmus Villemoes 2022-08-30 127 if (change) 037a6cc3a5e084 Rasmus Villemoes 2022-08-30 128 dev_info(dev, "init write enable\n"); d6c7428f9c2b1d Roman Fietze 2010-08-10 129 c1f5f0549d62c5 Gustavo A. R. Silva 2018-03-22 130 isl12022->write_enabled = true; d6c7428f9c2b1d Roman Fietze 2010-08-10 131 } d6c7428f9c2b1d Roman Fietze 2010-08-10 132 d6c7428f9c2b1d Roman Fietze 2010-08-10 133 /* hours, minutes and seconds */ d6c7428f9c2b1d Roman Fietze 2010-08-10 134 buf[ISL12022_REG_SC] = bin2bcd(tm->tm_sec); d6c7428f9c2b1d Roman Fietze 2010-08-10 135 buf[ISL12022_REG_MN] = bin2bcd(tm->tm_min); 6d23b2582fd0bc Roman Fietze 2010-08-10 136 buf[ISL12022_REG_HR] = bin2bcd(tm->tm_hour) | ISL12022_HR_MIL; d6c7428f9c2b1d Roman Fietze 2010-08-10 137 d6c7428f9c2b1d Roman Fietze 2010-08-10 138 buf[ISL12022_REG_DT] = bin2bcd(tm->tm_mday); d6c7428f9c2b1d Roman Fietze 2010-08-10 139 d6c7428f9c2b1d Roman Fietze 2010-08-10 140 /* month, 1 - 12 */ d6c7428f9c2b1d Roman Fietze 2010-08-10 141 buf[ISL12022_REG_MO] = bin2bcd(tm->tm_mon + 1); d6c7428f9c2b1d Roman Fietze 2010-08-10 142 d6c7428f9c2b1d Roman Fietze 2010-08-10 143 /* year and century */ d6c7428f9c2b1d Roman Fietze 2010-08-10 144 buf[ISL12022_REG_YR] = bin2bcd(tm->tm_year % 100); d6c7428f9c2b1d Roman Fietze 2010-08-10 145 d6c7428f9c2b1d Roman Fietze 2010-08-10 146 buf[ISL12022_REG_DW] = tm->tm_wday & 0x07; d6c7428f9c2b1d Roman Fietze 2010-08-10 147 7e7902b5b5d2b1 Rasmus Villemoes 2022-08-30 148 return regmap_bulk_write(isl12022->regmap, ISL12022_REG_SC, 7e7902b5b5d2b1 Rasmus Villemoes 2022-08-30 149 buf, sizeof(buf)); d6c7428f9c2b1d Roman Fietze 2010-08-10 150 } d6c7428f9c2b1d Roman Fietze 2010-08-10 151 -- 0-DAY CI Kernel Test Service https://01.org/lkp _______________________________________________ kbuild mailing list -- kbuild@lists.01.org To unsubscribe send an email to kbuild-le...@lists.01.org