The kbuild bot generates a ton of these "not incremeneted" false
positives because of something to do with xa_find().  But I can't
reproduce it.  I have:

1) deleted my cross function DB
2) git checkout 187d0801404f415f22c0b31531982c7ea97fa341
3) 
https://download.01.org/0day-ci/archive/20251213/[email protected]/config
   I still had to do a make oldconfig which is surprising.
4) Used the released version of Smatch with no special arguments
5) Tested on x86_64 and i386 (I haven't seen these warnings on Arm out of the
   seven that I checked).

But I can't reproduce these warnings.

Do other people have a way to reproduce these warnings?

regards,
dan carpenter

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
master
head:   187d0801404f415f22c0b31531982c7ea97fa341
commit: 2df8e64e01c10a4b75ea7797629f9e764a840eb0 dpll: Add basic Microchip 
ZL3073x support
config: x86_64-randconfig-161-20251212 
(https://download.01.org/0day-ci/archive/20251213/[email protected]/config)
compiler: gcc-12 (Debian 12.4.0-5) 12.4.0

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 <[email protected]>
| Reported-by: Dan Carpenter <[email protected]>
| Closes: https://lore.kernel.org/r/[email protected]/

New smatch warnings:
drivers/dpll/dpll_core.c:235 dpll_xa_ref_dpll_first() warn: iterator 'i' not 
incremented
drivers/dpll/dpll_netlink.c:1267 dpll_pin_phase_adj_set() warn: iterator 'i' 
not incremented
drivers/dpll/dpll_netlink.c:1414 dpll_pin_find() warn: iterator 'i' not 
incremented
drivers/dpll/dpll_netlink.c:1617 dpll_device_find() warn: iterator 'i' not 
incremented

Old smatch warnings:
drivers/dpll/dpll_core.c:82 dpll_xa_ref_pin_add() warn: iterator 'i' not 
incremented
drivers/dpll/dpll_core.c:134 dpll_xa_ref_pin_del() warn: iterator 'i' not 
incremented
drivers/dpll/dpll_core.c:163 dpll_xa_ref_dpll_add() warn: iterator 'i' not 
incremented
drivers/dpll/dpll_core.c:215 dpll_xa_ref_dpll_del() warn: iterator 'i' not 
incremented
drivers/dpll/dpll_core.c:568 dpll_pin_get() warn: iterator 'i' not incremented
drivers/dpll/dpll_core.c:670 dpll_pin_ref_sync_pair_del() warn: iterator 'i' 
not incremented
drivers/dpll/dpll_core.c:764 dpll_pin_on_pin_register() warn: iterator 'i' not 
incremented
drivers/dpll/dpll_core.c:798 dpll_pin_on_pin_unregister() warn: iterator 'i' 
not incremented
drivers/dpll/dpll_netlink.c:62 dpll_pin_available() warn: iterator 'i' not 
incremented
drivers/dpll/dpll_netlink.c:894 dpll_pin_freq_set() warn: iterator 'i' not 
incremented
drivers/dpll/dpll_netlink.c:1046 dpll_pin_ref_sync_state_set() warn: iterator 
'i' not incremented
drivers/dpll/dpll_netlink.c:1109 dpll_pin_on_pin_state_set() warn: iterator 'i' 
not incremented

vim +/i +235 drivers/dpll/dpll_core.c

9431063ad323ac Vadim Fedorenko 2023-09-13  232  struct dpll_pin_ref 
*dpll_xa_ref_dpll_first(struct xarray *xa_refs)
9431063ad323ac Vadim Fedorenko 2023-09-13  233  {
9431063ad323ac Vadim Fedorenko 2023-09-13  234          struct dpll_pin_ref 
*ref;
9431063ad323ac Vadim Fedorenko 2023-09-13 @235          unsigned long i = 0;
9431063ad323ac Vadim Fedorenko 2023-09-13  236  
9431063ad323ac Vadim Fedorenko 2023-09-13  237          ref = xa_find(xa_refs, 
&i, ULONG_MAX, XA_PRESENT);
9431063ad323ac Vadim Fedorenko 2023-09-13  238          WARN_ON(!ref);
9431063ad323ac Vadim Fedorenko 2023-09-13  239          return ref;
9431063ad323ac Vadim Fedorenko 2023-09-13  240  }

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


Reply via email to