Hi, kernel test robot noticed the following build warnings: [auto build test WARNING on 577a66e2e634f712384c57a98f504c44ea4b47da] url: https://github.com/intel-lab-lkp/linux/commits/marius-cristea-microchip-com/dt-bindings-iio-adc-adding-support-for-PAC194X/20250317-171150 base: 577a66e2e634f712384c57a98f504c44ea4b47da patch link: https://lore.kernel.org/r/20250317090803.30003-3-marius.cristea%40microchip.com patch subject: [PATCH v2 2/2] iio: adc: adding support for PAC194X config: riscv-randconfig-r072-20250318 (https://download.01.org/0day-ci/archive/20250318/202503181545.znULdV4G-lkp@xxxxxxxxx/config) compiler: clang version 21.0.0git (https://github.com/llvm/llvm-project 87916f8c32ebd8e284091db9b70339df57fd1e90) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250318/202503181545.znULdV4G-lkp@xxxxxxxxx/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@xxxxxxxxx> | Closes: https://lore.kernel.org/oe-kbuild-all/202503181545.znULdV4G-lkp@xxxxxxxxx/ All warnings (new ones prefixed by >>): In file included from drivers/iio/adc/pac1944.c:20: In file included from include/linux/i2c.h:19: In file included from include/linux/regulator/consumer.h:35: In file included from include/linux/suspend.h:5: In file included from include/linux/swap.h:9: In file included from include/linux/memcontrol.h:13: In file included from include/linux/cgroup.h:26: In file included from include/linux/kernel_stat.h:8: In file included from include/linux/interrupt.h:22: In file included from arch/riscv/include/asm/sections.h:9: In file included from include/linux/mm.h:2223: include/linux/vmstat.h:504:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion] 504 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~ ^ 505 | item]; | ~~~~ include/linux/vmstat.h:511:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion] 511 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~ ^ 512 | NR_VM_NUMA_EVENT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~~ include/linux/vmstat.h:518:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion] 518 | return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_" | ~~~~~~~~~~~ ^ ~~~ include/linux/vmstat.h:524:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion] 524 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~ ^ 525 | NR_VM_NUMA_EVENT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~~ >> drivers/iio/adc/pac1944.c:1689:6: warning: variable 'ret' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized] 1689 | if (time_after(jiffies, info->chip_reg_data.jiffies_tstamp + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1690 | msecs_to_jiffies(PAC1944_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/pac1944.c:1707:9: note: uninitialized use occurs here 1707 | return ret; | ^~~ drivers/iio/adc/pac1944.c:1689:2: note: remove the 'if' if its condition is always true 1689 | if (time_after(jiffies, info->chip_reg_data.jiffies_tstamp + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1690 | msecs_to_jiffies(PAC1944_MIN_POLLING_TIME_MS))) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/iio/adc/pac1944.c:1683:9: note: initialize the variable 'ret' to silence this warning 1683 | int ret; | ^ | = 0 5 warnings generated. vim +1689 drivers/iio/adc/pac1944.c 1680 1681 static int pac1944_retrieve_data(struct pac1944_chip_info *info, u32 wait_time) 1682 { 1683 int ret; 1684 1685 /* 1686 * Check if the minimal elapsed time has passed and if so, 1687 * re-read the chip, otherwise the cached info is just fine 1688 */ > 1689 if (time_after(jiffies, info->chip_reg_data.jiffies_tstamp + 1690 msecs_to_jiffies(PAC1944_MIN_POLLING_TIME_MS))) { 1691 /* 1692 * We need to re-read the chip values 1693 * call the pac1944_reg_snapshot 1694 */ 1695 ret = pac1944_reg_snapshot(info, true, 1696 PAC1944_REFRESH_REG_ADDR, 1697 wait_time); 1698 /* 1699 * Re-schedule the work for the read registers timeout 1700 * (to prevent chip regs saturation) 1701 */ 1702 cancel_delayed_work_sync(&info->work_chip_rfsh); 1703 schedule_delayed_work(&info->work_chip_rfsh, 1704 msecs_to_jiffies(PAC1944_MAX_RFSH_LIMIT_MS)); 1705 } 1706 1707 return ret; 1708 } 1709 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki