tree:
https://github.com/intel/linux-intel-lts.git 5.10/yocto
head: 1941d4b82f36cc6ecc513f3e496ad62726d00514
commit: c9103da26a3efbbd443b37671f2e19a5e1ac9c14 [18517/20368] OSE TGPIO driver
config: i386-allyesconfig
(
https://download.01.org/0day-ci/archive/20220117/202201170039.cqMfQeA6-lk...)
compiler: clang version 14.0.0 (
https://github.com/llvm/llvm-project
650fc40b6d8d9a5869b4fca525d5f237b0ee2803)
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/linux-intel-lts/commit/c9103da26a3efbbd443b37671...
git remote add intel-lts
https://github.com/intel/linux-intel-lts.git
git fetch --no-tags intel-lts 5.10/yocto
git checkout c9103da26a3efbbd443b37671f2e19a5e1ac9c14
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir
ARCH=i386 SHELL=/bin/bash drivers/gpio/ drivers/gpu/drm/i915/ drivers/ptp/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
> drivers/ptp/ptp-intel-tgpio.c:215:6: warning: variable
'isgn' is used uninitialized whenever 'if' condition is false
[-Wsometimes-uninitialized]
if (scaled_ppm < 0) {
^~~~~~~~~~~~~~
drivers/ptp/ptp-intel-tgpio.c:228:9: note: uninitialized use occurs here
reg |= isgn << 31;
^~~~
drivers/ptp/ptp-intel-tgpio.c:215:2: note: remove the 'if' if its condition is
always true
if (scaled_ppm < 0) {
^~~~~~~~~~~~~~~~~~~~
drivers/ptp/ptp-intel-tgpio.c:212:13: note: initialize the variable 'isgn' to
silence this warning
bool isgn;
^
= 0
1 warning generated.
vim +215 drivers/ptp/ptp-intel-tgpio.c
206
207 static int intel_tgpio_adjfine(struct ptp_clock_info *info, long scaled_ppm)
208 {
209 struct intel_tgpio *tgpio = to_intel_tgpio(info);
210 unsigned long flags;
211 u32 reg;
212 bool isgn;
213
214 spin_lock_irqsave(&tgpio->lock, flags);
215 if (scaled_ppm < 0) {
216 isgn = true;
217 scaled_ppm = -scaled_ppm;
218 }
219
220 /*
221 * HW uses a 200MHz clock, meaning it has a 5ns period. Just
222 * multiply scaled_ppm by 5 to get our increment.
223 */
224 reg = 5 * scaled_ppm;
225
226 /* bit 31 is sign bit */
227 reg &= ~BIT(31);
228 reg |= isgn << 31;
229
230 intel_tgpio_writel(tgpio->base, TIMINCA_GLOBAL, reg);
231 spin_unlock_irqrestore(&tgpio->lock, flags);
232
233 return 0;
234 }
235
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org