:::::: :::::: Manual check reason: "low confidence bisect report" :::::: Manual check reason: "low confidence static check warning: drivers/spi/spi-cadence-xspi.c:488:22: warning: use of uninitialized value '<unknown>' [CWE-457] [-Wanalyzer-use-of-uninitialized-value]" ::::::
BCC: l...@intel.com CC: kbuild-...@lists.01.org CC: linux-ker...@vger.kernel.org TO: Parshuram Thombare <pthom...@cadence.com> CC: Mark Brown <broo...@kernel.org> CC: Konrad Kociolek <kon...@cadence.com> CC: Jayshri Pawar <jpa...@cadence.com> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: a335366bad1364a07f49df9da1fdfa6d411a5f39 commit: a16cc807762730a6291762d4bedd7b00624a6426 spi: cadence: add support for Cadence XSPI controller date: 12 months ago :::::: branch date: 30 hours ago :::::: commit date: 12 months ago config: arm-randconfig-c002-20220915 (https://download.01.org/0day-ci/archive/20220918/202209181027.g7tkkcyl-...@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://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=a16cc807762730a6291762d4bedd7b00624a6426 git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git git fetch --no-tags linus master git checkout a16cc807762730a6291762d4bedd7b00624a6426 # 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 >>) | | (5) entry to 'cdns_xspi_send_stig_command' |...... | 349 | u32 cmd_regs[5]; | | ~~~~~~~~ | | | | | (6) region created on stack here |...... | 354 | if (ret < 0) | | ~ | | | | | (7) following 'false' branch (when 'ret >= 0')... | 'cdns_xspi_send_stig_command': event 8 | |arch/arm/include/asm/barrier.h:20:21: | 20 | #define dsb(option) __asm__ __volatile__ ("dsb " #option : : : "memory") | | ^~~~~~~ | | | | | (8) ...to here arch/arm/include/asm/barrier.h:60:30: note: in expansion of macro 'dsb' | 60 | #define __arm_heavy_mb(x...) dsb(x) | | ^~~ arch/arm/include/asm/barrier.h:66:25: note: in expansion of macro '__arm_heavy_mb' | 66 | #define wmb() __arm_heavy_mb(st) | | ^~~~~~~~~~~~~~ arch/arm/include/asm/io.h:166:33: note: in expansion of macro 'wmb' | 166 | #define __iowmb() wmb() | | ^~~ arch/arm/include/asm/io.h:307:36: note: in expansion of macro '__iowmb' | 307 | #define writel(v,c) ({ __iowmb(); writel_relaxed(v,c); }) | | ^~~~~~~ drivers/spi/spi-cadence-xspi.c:357:9: note: in expansion of macro 'writel' | 357 | writel(FIELD_PREP(CDNS_XSPI_CTRL_WORK_MODE, CDNS_XSPI_WORK_MODE_STIG), | | ^~~~~~ | 'cdns_xspi_send_stig_command': event 9 | | 360 | cdns_xspi_set_interrupts(cdns_xspi, true); | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (9) calling 'cdns_xspi_set_interrupts' from 'cdns_xspi_send_stig_command' | +--> 'cdns_xspi_set_interrupts': events 10-11 | | 288 | static void cdns_xspi_set_interrupts(struct cdns_xspi_dev *cdns_xspi, | | ^~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (10) entry to 'cdns_xspi_set_interrupts' |...... | 294 | if (enabled) | | ~ | | | | | (11) following 'true' branch (when 'enabled != 0')... | 'cdns_xspi_set_interrupts': event 12 | | 295 | intr_enable |= CDNS_XSPI_INTR_MASK; | | ^ | | | | | (12) ...to here | <------+ | 'cdns_xspi_send_stig_command': events 13-14 | | 360 | cdns_xspi_set_interrupts(cdns_xspi, true); | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (13) returning to 'cdns_xspi_send_stig_command' from 'cdns_xspi_set_interrupts' |...... | 370 | cdns_xspi_trigger_command(cdns_xspi, cmd_regs); | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (14) calling 'cdns_xspi_trigger_command' from 'cdns_xspi_send_stig_command' | +--> 'cdns_xspi_trigger_command': event 15 | | 241 | static void cdns_xspi_trigger_command(struct cdns_xspi_dev *cdns_xspi, | | ^~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (15) entry to 'cdns_xspi_trigger_command' | 'cdns_xspi_trigger_command': event 16 | |arch/arm/include/asm/io.h:92:22: | 92 | #define __raw_writel __raw_writel | | ^ | | | | | (16) use of uninitialized value 'cmd_regs[5]' here arch/arm/include/asm/io.h:299:33: note: in expansion of macro '__raw_writel' | 299 | #define writel_relaxed(v,c) __raw_writel((__force u32) cpu_to_le32(v),c) | | ^~~~~~~~~~~~ arch/arm/include/asm/io.h:307:47: note: in expansion of macro 'writel_relaxed' | 307 | #define writel(v,c) ({ __iowmb(); writel_relaxed(v,c); }) | | ^~~~~~~~~~~~~~ drivers/spi/spi-cadence-xspi.c:244:9: note: in expansion of macro 'writel' | 244 | writel(cmd_regs[5], cdns_xspi->iobase + CDNS_XSPI_CMD_REG_5); | | ^~~~~~ | drivers/spi/spi-cadence-xspi.c: In function 'cdns_xspi_of_get_plat_data': >> drivers/spi/spi-cadence-xspi.c:488:22: warning: use of uninitialized value >> '<unknown>' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 488 | unsigned int cs; | ^~ 'cdns_xspi_of_get_plat_data': event 1 | | 488 | unsigned int cs; | | ^~ | | | | | (1) use of uninitialized value '<unknown>' here | vim +488 drivers/spi/spi-cadence-xspi.c a16cc807762730 Parshuram Thombare 2021-09-19 483 a16cc807762730 Parshuram Thombare 2021-09-19 484 static int cdns_xspi_of_get_plat_data(struct platform_device *pdev) a16cc807762730 Parshuram Thombare 2021-09-19 485 { a16cc807762730 Parshuram Thombare 2021-09-19 486 struct device_node *node_prop = pdev->dev.of_node; a16cc807762730 Parshuram Thombare 2021-09-19 487 struct device_node *node_child; a16cc807762730 Parshuram Thombare 2021-09-19 @488 unsigned int cs; a16cc807762730 Parshuram Thombare 2021-09-19 489 a16cc807762730 Parshuram Thombare 2021-09-19 490 for_each_child_of_node(node_prop, node_child) { a16cc807762730 Parshuram Thombare 2021-09-19 491 if (!of_device_is_available(node_child)) a16cc807762730 Parshuram Thombare 2021-09-19 492 continue; a16cc807762730 Parshuram Thombare 2021-09-19 493 a16cc807762730 Parshuram Thombare 2021-09-19 494 if (of_property_read_u32(node_child, "reg", &cs)) { a16cc807762730 Parshuram Thombare 2021-09-19 495 dev_err(&pdev->dev, "Couldn't get memory chip select\n"); a16cc807762730 Parshuram Thombare 2021-09-19 496 return -ENXIO; a16cc807762730 Parshuram Thombare 2021-09-19 497 } else if (cs >= CDNS_XSPI_MAX_BANKS) { a16cc807762730 Parshuram Thombare 2021-09-19 498 dev_err(&pdev->dev, "reg (cs) parameter value too large\n"); a16cc807762730 Parshuram Thombare 2021-09-19 499 return -ENXIO; a16cc807762730 Parshuram Thombare 2021-09-19 500 } a16cc807762730 Parshuram Thombare 2021-09-19 501 } a16cc807762730 Parshuram Thombare 2021-09-19 502 a16cc807762730 Parshuram Thombare 2021-09-19 503 return 0; a16cc807762730 Parshuram Thombare 2021-09-19 504 } a16cc807762730 Parshuram Thombare 2021-09-19 505 -- 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