CC: [email protected] CC: [email protected] CC: [email protected] TO: Sergio Paracuellos <[email protected]> CC: Stephen Boyd <[email protected]>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: 038101e6b2cd5c55f888f85db42ea2ad3aecb4b6 commit: 48df7a26f4700aac8b7e5ab68796daf25c27e062 clk: ralink: add clock driver for mt7621 SoC date: 11 months ago :::::: branch date: 11 hours ago :::::: commit date: 11 months ago config: riscv-randconfig-c006-20220217 (https://download.01.org/0day-ci/archive/20220222/[email protected]/config) compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 0bad7cb56526f2572c74449fcf97c1fcda42b41d) 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 # install riscv cross compiling tool for clang build # apt-get install binutils-riscv64-linux-gnu # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=48df7a26f4700aac8b7e5ab68796daf25c27e062 git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git git fetch --no-tags linus master git checkout 48df7a26f4700aac8b7e5ab68796daf25c27e062 # save the config file to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=riscv clang-analyzer If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <[email protected]> clang-analyzer warnings: (new ones prefixed by >>) Suppressed 6 warnings (6 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 6 warnings generated. Suppressed 6 warnings (6 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 1 warning generated. lib/math/rational.c:82:35: warning: Division by zero [clang-analyzer-core.DivideZero] (max_denominator - d0) / d1); ^ include/linux/minmax.h:51:36: note: expanded from macro 'min' #define min(x, y) __careful_cmp(x, y, <) ^ include/linux/minmax.h:44:17: note: expanded from macro '__careful_cmp' __cmp_once(x, y, __UNIQUE_ID(__x), __UNIQUE_ID(__y), op)) ^ include/linux/minmax.h:38:25: note: expanded from macro '__cmp_once' typeof(y) unique_y = (y); \ ^ lib/math/rational.c:52:7: note: The value 0 is assigned to 'd1' n0 = d1 = 0; ^~~~~~ lib/math/rational.c:55:2: note: Loop condition is true. Entering loop body for (;;) { ^ lib/math/rational.c:58:7: note: Assuming 'd' is not equal to 0 if (d == 0) ^~~~~~ lib/math/rational.c:58:3: note: Taking false branch if (d == 0) ^ lib/math/rational.c:80:8: note: Assuming 'n2' is > 'max_numerator' if ((n2 > max_numerator) || (d2 > max_denominator)) { ^~~~~~~~~~~~~~~~~~ lib/math/rational.c:80:28: note: Left side of '||' is true if ((n2 > max_numerator) || (d2 > max_denominator)) { ^ lib/math/rational.c:82:35: note: Division by zero (max_denominator - d0) / d1); ^ include/linux/minmax.h:51:36: note: expanded from macro 'min' #define min(x, y) __careful_cmp(x, y, <) ^ include/linux/minmax.h:44:17: note: expanded from macro '__careful_cmp' __cmp_once(x, y, __UNIQUE_ID(__x), __UNIQUE_ID(__y), op)) ^ include/linux/minmax.h:38:25: note: expanded from macro '__cmp_once' typeof(y) unique_y = (y); \ ^ 2 warnings generated. Suppressed 2 warnings (2 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 6 warnings generated. Suppressed 6 warnings (6 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 6 warnings generated. Suppressed 6 warnings (6 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 5 warnings generated. Suppressed 5 warnings (5 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 5 warnings generated. Suppressed 5 warnings (5 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 5 warnings generated. Suppressed 5 warnings (5 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 6 warnings generated. Suppressed 6 warnings (6 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 5 warnings generated. Suppressed 5 warnings (5 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 8 warnings generated. Suppressed 8 warnings (8 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 6 warnings generated. Suppressed 6 warnings (6 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 6 warnings generated. Suppressed 6 warnings (6 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 6 warnings generated. Suppressed 6 warnings (6 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 5 warnings generated. Suppressed 5 warnings (5 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 7 warnings generated. Suppressed 7 warnings (7 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 6 warnings generated. Suppressed 6 warnings (6 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 6 warnings generated. Suppressed 6 warnings (6 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 7 warnings generated. Suppressed 7 warnings (7 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 6 warnings generated. >> drivers/clk/ralink/clk-mt7621.c:50:8: warning: Excessive padding in 'struct >> mt7621_gate' (11 padding bytes, where 3 is optimal). Optimal fields order: name, parent_name, priv, hw, bit_idx, idx, consider reordering the fields or adding explicit padding members [clang-analyzer-optin.performance.Padding] struct mt7621_gate { ~~~~~~~^~~~~~~~~~~~~ drivers/clk/ralink/clk-mt7621.c:50:8: note: Excessive padding in 'struct mt7621_gate' (11 padding bytes, where 3 is optimal). Optimal fields order: name, parent_name, priv, hw, bit_idx, idx, consider reordering the fields or adding explicit padding members struct mt7621_gate { ~~~~~~~^~~~~~~~~~~~~ Suppressed 5 warnings (5 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 5 warnings generated. Suppressed 5 warnings (5 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 5 warnings generated. Suppressed 5 warnings (5 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 5 warnings generated. Suppressed 5 warnings (5 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 5 warnings generated. Suppressed 5 warnings (5 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 5 warnings generated. Suppressed 5 warnings (5 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 5 warnings generated. Suppressed 5 warnings (5 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 6 warnings generated. Suppressed 6 warnings (6 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 8 warnings generated. Suppressed 8 warnings (8 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 6 warnings generated. Suppressed 6 warnings (6 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 5 warnings generated. Suppressed 5 warnings (5 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 5 warnings generated. Suppressed 5 warnings (5 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 7 warnings generated. Suppressed 7 warnings (7 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 8 warnings generated. drivers/pinctrl/samsung/pinctrl-samsung.c:1065:19: warning: Assigned value is garbage or undefined [clang-analyzer-core.uninitialized.Assign] bank->eint_base = virt_base[0]; ^ drivers/pinctrl/samsung/pinctrl-samsung.c:1102:6: note: Assuming 'drvdata' is non-null if (!drvdata) ^~~~~~~~ drivers/pinctrl/samsung/pinctrl-samsung.c:1102:2: note: Taking false branch if (!drvdata) ^ drivers/pinctrl/samsung/pinctrl-samsung.c:1105:9: note: Calling 'samsung_pinctrl_get_soc_data' ctrl = samsung_pinctrl_get_soc_data(drvdata, pdev); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/pinctrl/samsung/pinctrl-samsung.c:1019:9: note: Calling 'samsung_pinctrl_get_soc_data_for_of_alias' ctrl = samsung_pinctrl_get_soc_data_for_of_alias(pdev); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/pinctrl/samsung/pinctrl-samsung.c:991:6: note: Assuming 'id' is >= 0 if (id < 0) { ^~~~~~ drivers/pinctrl/samsung/pinctrl-samsung.c:991:2: note: Taking false branch if (id < 0) { ^ drivers/pinctrl/samsung/pinctrl-samsung.c:997:6: note: Assuming 'id' is < field 'num_ctrl' if (id >= of_data->num_ctrl) { ^~~~~~~~~~~~~~~~~~~~~~~ drivers/pinctrl/samsung/pinctrl-samsung.c:997:2: note: Taking false branch if (id >= of_data->num_ctrl) { ^ drivers/pinctrl/samsung/pinctrl-samsung.c:1002:2: note: Returning pointer, which participates in a condition later return &(of_data->ctrl[id]); ^~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/pinctrl/samsung/pinctrl-samsung.c:1019:9: note: Returning from 'samsung_pinctrl_get_soc_data_for_of_alias' ctrl = samsung_pinctrl_get_soc_data_for_of_alias(pdev); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/pinctrl/samsung/pinctrl-samsung.c:1020:6: note: Assuming 'ctrl' is non-null if (!ctrl) ^~~~~ drivers/pinctrl/samsung/pinctrl-samsung.c:1020:2: note: Taking false branch if (!ctrl) ^ drivers/pinctrl/samsung/pinctrl-samsung.c:1026:17: note: Calling 'devm_kcalloc' d->pin_banks = devm_kcalloc(&pdev->dev, d->nr_banks, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/device.h:232:9: note: Calling 'devm_kmalloc_array' return devm_kmalloc_array(dev, n, size, flags | __GFP_ZERO); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/device.h:224:2: note: Taking false branch if (unlikely(check_mul_overflow(n, size, &bytes))) ^ vim +50 drivers/clk/ralink/clk-mt7621.c 48df7a26f4700a Sergio Paracuellos 2021-04-10 49 48df7a26f4700a Sergio Paracuellos 2021-04-10 @50 struct mt7621_gate { 48df7a26f4700a Sergio Paracuellos 2021-04-10 51 u8 idx; 48df7a26f4700a Sergio Paracuellos 2021-04-10 52 const char *name; 48df7a26f4700a Sergio Paracuellos 2021-04-10 53 const char *parent_name; 48df7a26f4700a Sergio Paracuellos 2021-04-10 54 struct mt7621_clk_priv *priv; 48df7a26f4700a Sergio Paracuellos 2021-04-10 55 u32 bit_idx; 48df7a26f4700a Sergio Paracuellos 2021-04-10 56 struct clk_hw hw; 48df7a26f4700a Sergio Paracuellos 2021-04-10 57 }; 48df7a26f4700a Sergio Paracuellos 2021-04-10 58 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/[email protected] _______________________________________________ kbuild mailing list -- [email protected] To unsubscribe send an email to [email protected]
