[kbuild] [linux-next:master 6364/6856] arch/arm64/kernel/elfcore.c:114:0: warning: Found a exit path from function with non-void return type that has missing return statement [missingReturn]
:: :: Manual check reason: "low confidence static check warning: arch/arm64/kernel/elfcore.c:114:0: warning: Found a exit path from function with non-void return type that has missing return statement [missingReturn]" :: BCC: l...@intel.com CC: kbuild-...@lists.01.org CC: Linux Memory Management List TO: "Liam R. Howlett" CC: Andrew Morton CC: Linux Memory Management List CC: Will Deacon CC: Davidlohr Bueso tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: 0caac1da994900d12a9be6106edb8e98696712a3 commit: 802dfefc28f7dba90fe5a284032016b89131c748 [6364/6856] arm64: Change elfcore for_each_mte_vma() to use VMA iterator :: branch date: 14 hours ago :: commit date: 26 hours ago compiler: aarch64-linux-gcc (GCC) 12.1.0 reproduce (cppcheck warning): # apt-get install cppcheck git checkout 802dfefc28f7dba90fe5a284032016b89131c748 cppcheck --quiet --enable=style,performance,portability --template=gcc FILE If you fix the issue, kindly add following tag where applicable Reported-by: kernel test robot cppcheck possible warnings: (new ones prefixed by >>, may not real problems) >> arch/arm64/kernel/elfcore.c:114:0: warning: Found a exit path from function >> with non-void return type that has missing return statement [missingReturn] return 1; ^ arch/arm64/kernel/elfcore.c:142:0: warning: Found a exit path from function with non-void return type that has missing return statement [missingReturn] return 1; ^ vim +114 arch/arm64/kernel/elfcore.c 6dd8b1a0b6cb3e Catalin Marinas 2022-01-31 91 6dd8b1a0b6cb3e Catalin Marinas 2022-01-31 92 int elf_core_write_extra_phdrs(struct coredump_params *cprm, loff_t offset) 6dd8b1a0b6cb3e Catalin Marinas 2022-01-31 93 { 6dd8b1a0b6cb3e Catalin Marinas 2022-01-31 94 struct vm_area_struct *vma; 802dfefc28f7db Liam R. Howlett 2022-09-06 95 VMA_ITERATOR(vmi, current->mm, 0); 6dd8b1a0b6cb3e Catalin Marinas 2022-01-31 96 802dfefc28f7db Liam R. Howlett 2022-09-06 97 for_each_mte_vma(vmi, vma) { 6dd8b1a0b6cb3e Catalin Marinas 2022-01-31 98 struct elf_phdr phdr; 6dd8b1a0b6cb3e Catalin Marinas 2022-01-31 99 c35fe2a68f29a0 Catalin Marinas 2022-04-25 100 phdr.p_type = PT_AARCH64_MEMTAG_MTE; 6dd8b1a0b6cb3e Catalin Marinas 2022-01-31 101 phdr.p_offset = offset; 6dd8b1a0b6cb3e Catalin Marinas 2022-01-31 102 phdr.p_vaddr = vma->vm_start; 6dd8b1a0b6cb3e Catalin Marinas 2022-01-31 103 phdr.p_paddr = 0; 6dd8b1a0b6cb3e Catalin Marinas 2022-01-31 104 phdr.p_filesz = mte_vma_tag_dump_size(vma); 6dd8b1a0b6cb3e Catalin Marinas 2022-01-31 105 phdr.p_memsz = vma->vm_end - vma->vm_start; 6dd8b1a0b6cb3e Catalin Marinas 2022-01-31 106 offset += phdr.p_filesz; 6dd8b1a0b6cb3e Catalin Marinas 2022-01-31 107 phdr.p_flags = 0; 6dd8b1a0b6cb3e Catalin Marinas 2022-01-31 108 phdr.p_align = 0; 6dd8b1a0b6cb3e Catalin Marinas 2022-01-31 109 6dd8b1a0b6cb3e Catalin Marinas 2022-01-31 110 if (!dump_emit(cprm, , sizeof(phdr))) 6dd8b1a0b6cb3e Catalin Marinas 2022-01-31 111 return 0; 6dd8b1a0b6cb3e Catalin Marinas 2022-01-31 112 } 6dd8b1a0b6cb3e Catalin Marinas 2022-01-31 113 6dd8b1a0b6cb3e Catalin Marinas 2022-01-31 @114 return 1; 6dd8b1a0b6cb3e Catalin Marinas 2022-01-31 115 } 6dd8b1a0b6cb3e Catalin Marinas 2022-01-31 116 :: The code at line 114 was first introduced by commit :: 6dd8b1a0b6cb3ed93d24110e02e67ff9d006610a arm64: mte: Dump the MTE tags in the core file :: TO: Catalin Marinas :: CC: Will Deacon -- 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
[kbuild] Re: [PATCH net-next v5 8/9] net: marvell: prestera: Add neighbour cache accounting
Hi Yevhen, url: https://github.com/intel-lab-lkp/linux/commits/Yevhen-Orlov/net-marvell-prestera-add-nexthop-routes-offloading/20220909-065815 base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 9f8f1933dce555d3c246f447f54fca8de8889da9 config: openrisc-randconfig-m041-20220907 compiler: or1k-linux-gcc (GCC) 12.1.0 If you fix the issue, kindly add following tag where applicable Reported-by: kernel test robot Reported-by: Dan Carpenter smatch warnings: drivers/net/ethernet/marvell/prestera/prestera_router.c:751 __prestera_k_arb_n_lpm_set() error: uninitialized symbol 'fib_node'. vim +/fib_node +751 drivers/net/ethernet/marvell/prestera/prestera_router.c 5a826d874f2b0e Yevhen Orlov 2022-09-09 715 static void 5a826d874f2b0e Yevhen Orlov 2022-09-09 716 __prestera_k_arb_n_lpm_set(struct prestera_switch *sw, 5a826d874f2b0e Yevhen Orlov 2022-09-09 717struct prestera_kern_neigh_cache *n_cache, 5a826d874f2b0e Yevhen Orlov 2022-09-09 718bool enabled) 5a826d874f2b0e Yevhen Orlov 2022-09-09 719 { 5a826d874f2b0e Yevhen Orlov 2022-09-09 720 struct prestera_nexthop_group_key nh_grp_key; 5a826d874f2b0e Yevhen Orlov 2022-09-09 721 struct prestera_kern_fib_cache_key fc_key; 5a826d874f2b0e Yevhen Orlov 2022-09-09 722 struct prestera_kern_fib_cache *fib_cache; 5a826d874f2b0e Yevhen Orlov 2022-09-09 723 struct prestera_fib_node *fib_node; 5a826d874f2b0e Yevhen Orlov 2022-09-09 724 struct prestera_fib_key fib_key; 5a826d874f2b0e Yevhen Orlov 2022-09-09 725 5a826d874f2b0e Yevhen Orlov 2022-09-09 726 /* Exception for fc with prefix 32: LPM entry is already used by fib */ 5a826d874f2b0e Yevhen Orlov 2022-09-09 727 memset(_key, 0, sizeof(fc_key)); 5a826d874f2b0e Yevhen Orlov 2022-09-09 728 fc_key.addr = n_cache->key.addr; 5a826d874f2b0e Yevhen Orlov 2022-09-09 729 fc_key.prefix_len = PRESTERA_IP_ADDR_PLEN(n_cache->key.addr.v); 5a826d874f2b0e Yevhen Orlov 2022-09-09 730 /* But better to use tb_id of route, which pointed to this neighbour. */ 5a826d874f2b0e Yevhen Orlov 2022-09-09 731 /* We take it from rif, because rif inconsistent. 5a826d874f2b0e Yevhen Orlov 2022-09-09 732 * Must be separated in_rif and out_rif. 5a826d874f2b0e Yevhen Orlov 2022-09-09 733 * Also note: for each fib pointed to this neigh should be separated 5a826d874f2b0e Yevhen Orlov 2022-09-09 734 *neigh lpm entry (for each ingress vr) 5a826d874f2b0e Yevhen Orlov 2022-09-09 735 */ 5a826d874f2b0e Yevhen Orlov 2022-09-09 736 fc_key.kern_tb_id = l3mdev_fib_table(n_cache->key.dev); 5a826d874f2b0e Yevhen Orlov 2022-09-09 737 fib_cache = prestera_kern_fib_cache_find(sw, _key); 5a826d874f2b0e Yevhen Orlov 2022-09-09 738 if (!fib_cache || !fib_cache->reachable) { 5a826d874f2b0e Yevhen Orlov 2022-09-09 739 memset(_key, 0, sizeof(fib_key)); 5a826d874f2b0e Yevhen Orlov 2022-09-09 740 fib_key.addr = n_cache->key.addr; 5a826d874f2b0e Yevhen Orlov 2022-09-09 741 fib_key.prefix_len = PRESTERA_IP_ADDR_PLEN(n_cache->key.addr.v); 5a826d874f2b0e Yevhen Orlov 2022-09-09 742 fib_key.tb_id = prestera_fix_tb_id(fc_key.kern_tb_id); 5a826d874f2b0e Yevhen Orlov 2022-09-09 743 fib_node = prestera_fib_node_find(sw, _key); 5a826d874f2b0e Yevhen Orlov 2022-09-09 744 if (!enabled && fib_node) { 5a826d874f2b0e Yevhen Orlov 2022-09-09 745 if (prestera_fib_node_util_is_neighbour(fib_node)) 5a826d874f2b0e Yevhen Orlov 2022-09-09 746 prestera_fib_node_destroy(sw, fib_node); 5a826d874f2b0e Yevhen Orlov 2022-09-09 747 return; 5a826d874f2b0e Yevhen Orlov 2022-09-09 748 } 5a826d874f2b0e Yevhen Orlov 2022-09-09 749 } fib_node not initialized on else path. 5a826d874f2b0e Yevhen Orlov 2022-09-09 750 5a826d874f2b0e Yevhen Orlov 2022-09-09 @751 if (enabled && !fib_node) { 5a826d874f2b0e Yevhen Orlov 2022-09-09 752 memset(_grp_key, 0, sizeof(nh_grp_key)); 5a826d874f2b0e Yevhen Orlov 2022-09-09 753 prestera_util_nc_key2nh_key(_cache->key, 5a826d874f2b0e Yevhen Orlov 2022-09-09 754 _grp_key.neigh[0]); 5a826d874f2b0e Yevhen Orlov 2022-09-09 755 fib_node = prestera_fib_node_create(sw, _key, 5a826d874f2b0e Yevhen Orlov 2022-09-09 756 PRESTERA_FIB_TYPE_UC_NH, 5a826d874f2b0e Yevhen Orlov 2022-09-09 757 _grp_key); 5a826d874f2b0e Yevhen Orlov 2022-09-09 758 if (!fib_node) 5a826d874f2b0e Yevhen Orlov 2022-09-09 759 pr_err("%s failed ip=%pI4n", "prestera_fib_node_create", 5a826d874f2b0e Yevhen Orlov 2022-09-09 760 _key.addr.u.ipv4); 5a826d874f2b0e Yevhen Orlov 2022-09-09 761
[kbuild] Re: [PATCH V3 2/3] phy/rockchip: inno-dsidphy: Add support for rk3568
:: :: Manual check reason: "low confidence static check warning: drivers/phy/rockchip/phy-rockchip-inno-dsidphy.c:279:10: sparse: sparse: decimal constant 22 is between LONG_MAX and ULONG_MAX. For C99 that means long long, C90 compilers are very likely to produce unsigned long (and a warning) here" :: BCC: l...@intel.com CC: kbuild-...@lists.01.org In-Reply-To: <20220912205607.5969-3-macroalph...@gmail.com> References: <20220912205607.5969-3-macroalph...@gmail.com> TO: Chris Morgan TO: linux-rockc...@lists.infradead.org CC: devicet...@vger.kernel.org CC: linux-...@lists.infradead.org CC: c...@rock-chips.com CC: s.ha...@pengutronix.de CC: frattaroli.nico...@gmail.com CC: michael.rie...@wolfvision.net CC: pgwipe...@gmail.com CC: he...@sntech.de CC: krzysztof.kozlowski...@linaro.org CC: robh...@kernel.org CC: vk...@kernel.org CC: kis...@ti.com CC: Chris Morgan Hi Chris, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on rockchip/for-next] [also build test WARNING on robh/for-next linus/master v6.0-rc5 next-20220912] [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/Chris-Morgan/rockchip-dsi-for-rk3568/20220913-045839 base: https://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip.git for-next :: branch date: 12 hours ago :: commit date: 12 hours ago config: sparc-randconfig-s051-20220911 compiler: sparc-linux-gcc (GCC) 12.1.0 reproduce: wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # apt-get install sparse # sparse version: v0.6.4-39-gce1a6720-dirty # https://github.com/intel-lab-lkp/linux/commit/c4f69ad569f041023eb1dd1873b28538ebac9ab4 git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review Chris-Morgan/rockchip-dsi-for-rk3568/20220913-045839 git checkout c4f69ad569f041023eb1dd1873b28538ebac9ab4 # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=sparc SHELL=/bin/bash If you fix the issue, kindly add following tag where applicable Reported-by: kernel test robot sparse warnings: (new ones prefixed by >>) >> drivers/phy/rockchip/phy-rockchip-inno-dsidphy.c:279:10: sparse: sparse: >> decimal constant 22 is between LONG_MAX and ULONG_MAX. For C99 that >> means long long, C90 compilers are very likely to produce unsigned long (and >> a warning) here drivers/phy/rockchip/phy-rockchip-inno-dsidphy.c:280:10: sparse: sparse: decimal constant 24 is between LONG_MAX and ULONG_MAX. For C99 that means long long, C90 compilers are very likely to produce unsigned long (and a warning) here drivers/phy/rockchip/phy-rockchip-inno-dsidphy.c:281:10: sparse: sparse: decimal constant 25 is between LONG_MAX and ULONG_MAX. For C99 that means long long, C90 compilers are very likely to produce unsigned long (and a warning) here vim +279 drivers/phy/rockchip/phy-rockchip-inno-dsidphy.c c4f69ad569f041 Chris Morgan 2022-09-12 260 c4f69ad569f041 Chris Morgan 2022-09-12 261 static const c4f69ad569f041 Chris Morgan 2022-09-12 262 struct inno_mipi_dphy_timing inno_mipi_dphy_timing_table_max_2_5ghz[] = { c4f69ad569f041 Chris Morgan 2022-09-12 263 { 11000, 0x02, 0x7f, 0x16, 0x02, 0x02}, c4f69ad569f041 Chris Morgan 2022-09-12 264 { 15000, 0x02, 0x7f, 0x16, 0x03, 0x02}, c4f69ad569f041 Chris Morgan 2022-09-12 265 { 2, 0x02, 0x7f, 0x17, 0x04, 0x02}, c4f69ad569f041 Chris Morgan 2022-09-12 266 { 25000, 0x02, 0x7f, 0x17, 0x05, 0x04}, c4f69ad569f041 Chris Morgan 2022-09-12 267 { 3, 0x02, 0x7f, 0x18, 0x06, 0x04}, c4f69ad569f041 Chris Morgan 2022-09-12 268 { 4, 0x03, 0x7e, 0x19, 0x07, 0x04}, c4f69ad569f041 Chris Morgan 2022-09-12 269 { 5, 0x03, 0x7c, 0x1b, 0x07, 0x08}, c4f69ad569f041 Chris Morgan 2022-09-12 270 { 6, 0x03, 0x70, 0x1d, 0x08, 0x10}, c4f69ad569f041 Chris Morgan 2022-09-12 271 { 7, 0x05, 0x40, 0x1e, 0x08, 0x30}, c4f69ad569f041 Chris Morgan 2022-09-12 272 { 8, 0x05, 0x02, 0x1f, 0x09, 0x30}, c4f69ad569f041 Chris Morgan 2022-09-12 273 {10, 0x05, 0x08, 0x20, 0x09, 0x30}, c4f69ad569f041 Chris Morgan 2022-09-12 274 {12, 0x06, 0x03, 0x32, 0x14, 0x0f}, c4f69ad569f041 Chris Morgan 2022-09-12 275 {14, 0x09, 0x03, 0x32, 0x14, 0x0f}, c4f69ad569f041 Chris Morgan 2022-09-12 276 {16, 0x0d, 0x42, 0x3