CC: [email protected] CC: [email protected] BCC: [email protected] CC: [email protected] TO: Dmitry Osipenko <[email protected]> CC: Thierry Reding <[email protected]> CC: Krzysztof Kozlowski <[email protected]>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: 34e047aa16c0123bbae8e2f6df33e5ecc1f56601 commit: 56ebc9b0d77e0406aba2d900c82e79204cc7dc32 memory: tegra: Enable compile testing for all drivers date: 10 months ago :::::: branch date: 2 days ago :::::: commit date: 10 months ago config: arm-randconfig-c002-20220317 (https://download.01.org/0day-ci/archive/20220320/[email protected]/config) compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project a6ec1e3d798f8eab43fb3a91028c6ab04e115fcb) 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 arm cross compiling tool for clang build # apt-get install binutils-arm-linux-gnueabi # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=56ebc9b0d77e0406aba2d900c82e79204cc7dc32 git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git git fetch --no-tags linus master git checkout 56ebc9b0d77e0406aba2d900c82e79204cc7dc32 # save the config file to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm 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 >>) drivers/of/fdt.c:221:3: note: Storing null pointer value *pnp = NULL; ^~~~~~~~~~~ drivers/of/fdt.c:326:9: note: Returning from 'populate_node' ret = populate_node(blob, offset, &mem, nps[depth], ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/of/fdt.c:328:7: note: Assuming 'ret' is >= 0 if (ret < 0) ^~~~~~~ drivers/of/fdt.c:328:3: note: Taking false branch if (ret < 0) ^ drivers/of/fdt.c:331:8: note: 'dryrun' is false if (!dryrun && nodepp && !*nodepp) ^~~~~~ drivers/of/fdt.c:331:7: note: Left side of '&&' is true if (!dryrun && nodepp && !*nodepp) ^ drivers/of/fdt.c:331:18: note: 'nodepp' is null if (!dryrun && nodepp && !*nodepp) ^~~~~~ drivers/of/fdt.c:331:25: note: Left side of '&&' is false if (!dryrun && nodepp && !*nodepp) ^ drivers/of/fdt.c:333:8: note: 'dryrun' is false if (!dryrun && !root) ^~~~~~ drivers/of/fdt.c:333:7: note: Left side of '&&' is true if (!dryrun && !root) ^ drivers/of/fdt.c:333:19: note: 'root' is null if (!dryrun && !root) ^~~~ drivers/of/fdt.c:333:3: note: Taking true branch if (!dryrun && !root) ^ drivers/of/fdt.c:334:4: note: Null pointer value stored to 'root' root = nps[depth+1]; ^~~~~~~~~~~~~~~~~~~ drivers/of/fdt.c:317:7: note: Assuming 'offset' is < 0 offset >= 0 && depth >= initial_depth; ^~~~~~~~~~~ drivers/of/fdt.c:317:19: note: Left side of '&&' is false offset >= 0 && depth >= initial_depth; ^ drivers/of/fdt.c:337:6: note: 'offset' is < 0 if (offset < 0 && offset != -FDT_ERR_NOTFOUND) { ^~~~~~ drivers/of/fdt.c:337:6: note: Left side of '&&' is true drivers/of/fdt.c:337:20: note: Assuming the condition is false if (offset < 0 && offset != -FDT_ERR_NOTFOUND) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/of/fdt.c:337:2: note: Taking false branch if (offset < 0 && offset != -FDT_ERR_NOTFOUND) { ^ drivers/of/fdt.c:346:7: note: 'dryrun' is false if (!dryrun) ^~~~~~ drivers/of/fdt.c:346:2: note: Taking true branch if (!dryrun) ^ drivers/of/fdt.c:347:17: note: Passing null pointer value via 1st parameter 'parent' reverse_nodes(root); ^~~~ drivers/of/fdt.c:347:3: note: Calling 'reverse_nodes' reverse_nodes(root); ^~~~~~~~~~~~~~~~~~~ drivers/of/fdt.c:259:10: note: Access to field 'child' results in a dereference of a null pointer (loaded from variable 'parent') child = parent->child; ^~~~~~ Suppressed 15 warnings (15 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. 15 warnings generated. Suppressed 15 warnings (15 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. 15 warnings generated. Suppressed 15 warnings (15 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. 16 warnings generated. Suppressed 16 warnings (16 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. 17 warnings generated. drivers/memory/tegra/mc.c:872:19: warning: Value stored to 'mc' during its initialization is never read [clang-analyzer-deadcode.DeadStores] struct tegra_mc *mc = dev_get_drvdata(dev); ^~ ~~~~~~~~~~~~~~~~~~~~ drivers/memory/tegra/mc.c:872:19: note: Value stored to 'mc' during its initialization is never read struct tegra_mc *mc = dev_get_drvdata(dev); ^~ ~~~~~~~~~~~~~~~~~~~~ drivers/memory/tegra/mc.c:886:19: warning: Value stored to 'mc' during its initialization is never read [clang-analyzer-deadcode.DeadStores] struct tegra_mc *mc = dev_get_drvdata(dev); ^~ ~~~~~~~~~~~~~~~~~~~~ drivers/memory/tegra/mc.c:886:19: note: Value stored to 'mc' during its initialization is never read struct tegra_mc *mc = dev_get_drvdata(dev); ^~ ~~~~~~~~~~~~~~~~~~~~ Suppressed 15 warnings (15 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. 15 warnings generated. Suppressed 15 warnings (15 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. 17 warnings generated. >> drivers/memory/tegra/tegra210-emc-core.c:936:2: warning: Value stored to >> 'mpc_req' is never read [clang-analyzer-deadcode.DeadStores] mpc_req = emc_readl(emc, EMC_MPC); ^ ~~~~~~~~~~~~~~~~~~~~~~~ drivers/memory/tegra/tegra210-emc-core.c:936:2: note: Value stored to 'mpc_req' is never read mpc_req = emc_readl(emc, EMC_MPC); ^ ~~~~~~~~~~~~~~~~~~~~~~~ >> drivers/memory/tegra/tegra210-emc-core.c:1901:7: warning: Dereference of >> null pointer [clang-analyzer-core.NullDereference] if (emc->timings[i].rate == current_rate) { ^~~~~~~~~~~~~~~~~~~~ drivers/memory/tegra/tegra210-emc-core.c:1837:6: note: Assuming 'emc' is non-null if (!emc) ^~~~ drivers/memory/tegra/tegra210-emc-core.c:1837:2: note: Taking false branch if (!emc) ^ drivers/memory/tegra/tegra210-emc-core.c:1841:6: note: Calling 'IS_ERR' if (IS_ERR(emc->clk)) ^~~~~~~~~~~~~~~~ include/linux/err.h:36:9: note: Assuming the condition is false return IS_ERR_VALUE((unsigned long)ptr); ^ include/linux/err.h:22:34: note: expanded from macro 'IS_ERR_VALUE' #define IS_ERR_VALUE(x) unlikely((unsigned long)(void *)(x) >= (unsigned long)-MAX_ERRNO) ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/compiler.h:78:42: note: expanded from macro 'unlikely' # define unlikely(x) __builtin_expect(!!(x), 0) ^ include/linux/err.h:36:2: note: Returning zero, which participates in a condition later return IS_ERR_VALUE((unsigned long)ptr); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/memory/tegra/tegra210-emc-core.c:1841:6: note: Returning from 'IS_ERR' if (IS_ERR(emc->clk)) ^~~~~~~~~~~~~~~~ drivers/memory/tegra/tegra210-emc-core.c:1841:2: note: Taking false branch if (IS_ERR(emc->clk)) ^ drivers/memory/tegra/tegra210-emc-core.c:1844:2: note: Calling 'platform_set_drvdata' platform_set_drvdata(pdev, emc); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/platform_device.h:248:2: note: Calling 'dev_set_drvdata' dev_set_drvdata(&pdev->dev, data); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/device.h:676:1: note: Returning without writing to 'data->nominal', which participates in a condition later } ^ include/linux/device.h:676:1: note: Returning without writing to 'data->derated', which participates in a condition later include/linux/device.h:676:1: note: Returning without writing to 'data->nominal' include/linux/device.h:676:1: note: Returning without writing to 'data->timings' include/linux/platform_device.h:248:2: note: Returning from 'dev_set_drvdata' dev_set_drvdata(&pdev->dev, data); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/platform_device.h:249:1: note: Returning without writing to 'data->nominal', which participates in a condition later } ^ include/linux/platform_device.h:249:1: note: Returning without writing to 'data->derated', which participates in a condition later include/linux/platform_device.h:249:1: note: Returning without writing to 'data->nominal' include/linux/platform_device.h:249:1: note: Returning without writing to 'data->timings' drivers/memory/tegra/tegra210-emc-core.c:1844:2: note: Returning from 'platform_set_drvdata' platform_set_drvdata(pdev, emc); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/memory/tegra/tegra210-emc-core.c:1845:2: note: Loop condition is false. Exiting loop spin_lock_init(&emc->lock); ^ include/linux/spinlock.h:334:35: note: expanded from macro 'spin_lock_init' # define spin_lock_init(lock) \ ^ drivers/memory/tegra/tegra210-emc-core.c:1848:12: note: Value assigned to field 'nominal' emc->mc = devm_tegra_memory_controller_get(&pdev->dev); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/memory/tegra/tegra210-emc-core.c:1849:6: note: Calling 'IS_ERR' if (IS_ERR(emc->mc)) ^~~~~~~~~~~~~~~ include/linux/err.h:36:9: note: Assuming the condition is false return IS_ERR_VALUE((unsigned long)ptr); ^ include/linux/err.h:22:34: note: expanded from macro 'IS_ERR_VALUE' #define IS_ERR_VALUE(x) unlikely((unsigned long)(void *)(x) >= (unsigned long)-MAX_ERRNO) ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/compiler.h:78:42: note: expanded from macro 'unlikely' # define unlikely(x) __builtin_expect(!!(x), 0) ^ include/linux/err.h:36:2: note: Returning zero, which participates in a condition later return IS_ERR_VALUE((unsigned long)ptr); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/memory/tegra/tegra210-emc-core.c:1849:6: note: Returning from 'IS_ERR' if (IS_ERR(emc->mc)) ^~~~~~~~~~~~~~~ drivers/memory/tegra/tegra210-emc-core.c:1849:2: note: Taking false branch if (IS_ERR(emc->mc)) ^ drivers/memory/tegra/tegra210-emc-core.c:1853:6: note: Calling 'IS_ERR' if (IS_ERR(emc->regs)) ^~~~~~~~~~~~~~~~~ include/linux/err.h:36:9: note: Assuming the condition is false return IS_ERR_VALUE((unsigned long)ptr); ^ include/linux/err.h:22:34: note: expanded from macro 'IS_ERR_VALUE' #define IS_ERR_VALUE(x) unlikely((unsigned long)(void *)(x) >= (unsigned long)-MAX_ERRNO) ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/compiler.h:78:42: note: expanded from macro 'unlikely' # define unlikely(x) __builtin_expect(!!(x), 0) ^ include/linux/err.h:36:2: note: Returning zero, which participates in a condition later return IS_ERR_VALUE((unsigned long)ptr); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/memory/tegra/tegra210-emc-core.c:1853:6: note: Returning from 'IS_ERR' if (IS_ERR(emc->regs)) -- ~~~~~~ ^ Suppressed 15 warnings (15 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. 15 warnings generated. Suppressed 15 warnings (15 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. 15 warnings generated. Suppressed 15 warnings (15 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. 15 warnings generated. Suppressed 15 warnings (15 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. 15 warnings generated. Suppressed 15 warnings (15 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. 15 warnings generated. Suppressed 15 warnings (15 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. 15 warnings generated. Suppressed 15 warnings (15 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. 16 warnings generated. include/linux/hid.h:1004:9: warning: Access to field 'name' results in a dereference of a null pointer (loaded from variable 'input') [clang-analyzer-core.NullDereference] input->name, c, type); ^ drivers/hid/hid-apple.c:392:6: note: Assuming the condition is true if (asc->quirks & APPLE_MIGHTYMOUSE) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/hid/hid-apple.c:392:2: note: Taking true branch if (asc->quirks & APPLE_MIGHTYMOUSE) { ^ drivers/hid/hid-apple.c:393:7: note: Assuming field 'hid' is equal to HID_GD_Z if (usage->hid == HID_GD_Z) ^~~~~~~~~~~~~~~~~~~~~~ drivers/hid/hid-apple.c:393:3: note: Taking true branch if (usage->hid == HID_GD_Z) ^ drivers/hid/hid-apple.c:394:4: note: Calling 'hid_map_usage' hid_map_usage(hi, usage, bit, max, EV_REL, REL_HWHEEL); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/hid.h:979:2: note: 'input' initialized here struct input_dev *input = hidinput->input; ^~~~~~~~~~~~~~~~~~~~~~~ include/linux/hid.h:983:2: note: Control jumps to 'case 2:' at line 988 switch (type) { ^ include/linux/hid.h:991:3: note: Execution continues on line 1002 break; ^ include/linux/hid.h:1002:15: note: 'c' is <= 'limit' if (unlikely(c > limit || !bmap)) { ^ include/linux/compiler.h:78:42: note: expanded from macro 'unlikely' # define unlikely(x) __builtin_expect(!!(x), 0) ^ include/linux/hid.h:1002:15: note: Left side of '||' is false if (unlikely(c > limit || !bmap)) { ^ include/linux/hid.h:1002:28: note: Assuming 'bmap' is null if (unlikely(c > limit || !bmap)) { ^ include/linux/compiler.h:78:42: note: expanded from macro 'unlikely' # define unlikely(x) __builtin_expect(!!(x), 0) ^ include/linux/hid.h:1002:2: note: Taking true branch if (unlikely(c > limit || !bmap)) { ^ include/linux/hid.h:1003:3: note: Assuming the condition is true pr_warn_ratelimited("%s: Invalid code %d type %d\n", ^ include/linux/printk.h:528:2: note: expanded from macro 'pr_warn_ratelimited' printk_ratelimited(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/printk.h:511:6: note: expanded from macro 'printk_ratelimited' if (__ratelimit(&_rs)) \ ^~~~~~~~~~~~~~~~~ include/linux/ratelimit_types.h:41:28: note: expanded from macro '__ratelimit' #define __ratelimit(state) ___ratelimit(state, __func__) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/hid.h:1003:3: note: Taking true branch pr_warn_ratelimited("%s: Invalid code %d type %d\n", ^ include/linux/printk.h:528:2: note: expanded from macro 'pr_warn_ratelimited' printk_ratelimited(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__) ^ include/linux/printk.h:511:2: note: expanded from macro 'printk_ratelimited' if (__ratelimit(&_rs)) \ ^ include/linux/hid.h:1004:9: note: Access to field 'name' results in a dereference of a null pointer (loaded from variable 'input') input->name, c, type); ^ include/linux/printk.h:528:49: note: expanded from macro 'pr_warn_ratelimited' printk_ratelimited(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__) ^~~~~~~~~~~ include/linux/printk.h:512:17: note: expanded from macro 'printk_ratelimited' printk(fmt, ##__VA_ARGS__); \ ^~~~~~~~~~~ Suppressed 15 warnings (15 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. 9 warnings generated. >> drivers/memory/tegra/tegra210-emc-cc-r21021.c:148:15: warning: The left >> expression of the compound assignment is an uninitialized value. The >> computed value will also be garbage >> [clang-analyzer-core.uninitialized.Assign] temp[i][0] |= (value & 0x00ff) >> 0; ~~~~~~~~~~ ^ drivers/memory/tegra/tegra210-emc-cc-r21021.c:118:34: note: Assuming 'type' is not equal to PERIODIC_TRAINING_UPDATE bool periodic_training_update = type == PERIODIC_TRAINING_UPDATE; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/memory/tegra/tegra210-emc-cc-r21021.c:123:21: note: Assuming 'type' is not equal to DVFS_UPDATE bool dvfs_update = type == DVFS_UPDATE; ^~~~~~~~~~~~~~~~~~~ drivers/memory/tegra/tegra210-emc-cc-r21021.c:125:18: note: Assuming 'type' is equal to DVFS_PT1 bool dvfs_pt1 = type == DVFS_PT1; ^~~~~~~~~~~~~~~~ drivers/memory/tegra/tegra210-emc-cc-r21021.c:133:6: note: 'dvfs_pt1' is true if (dvfs_pt1 || periodic_training_update) { ^~~~~~~~ drivers/memory/tegra/tegra210-emc-cc-r21021.c:133:15: note: Left side of '||' is true if (dvfs_pt1 || periodic_training_update) { ^ drivers/memory/tegra/tegra210-emc-cc-r21021.c:136:15: note: Assuming 'i' is >= field 'num_channels' for (i = 0; i < emc->num_channels; i++) { ^~~~~~~~~~~~~~~~~~~~~ drivers/memory/tegra/tegra210-emc-cc-r21021.c:136:3: note: Loop condition is false. Execution continues on line 145 for (i = 0; i < emc->num_channels; i++) { ^ drivers/memory/tegra/tegra210-emc-cc-r21021.c:147:15: note: Assuming 'i' is < field 'num_channels' for (i = 0; i < emc->num_channels; i++) { ^~~~~~~~~~~~~~~~~~~~~ drivers/memory/tegra/tegra210-emc-cc-r21021.c:147:3: note: Loop condition is true. Entering loop body for (i = 0; i < emc->num_channels; i++) { ^ drivers/memory/tegra/tegra210-emc-cc-r21021.c:148:15: note: The left expression of the compound assignment is an uninitialized value. The computed value will also be garbage temp[i][0] |= (value & 0x00ff) >> 0; ~~~~~~~~~~ ^ drivers/memory/tegra/tegra210-emc-cc-r21021.c:157:36: warning: The right operand of '*' is a garbage value [clang-analyzer-core.UndefinedBinaryOperatorResult] cval /= last_timing_rate_mhz * 2 * temp[0][0]; ^ ~~~~~~~~~~ drivers/memory/tegra/tegra210-emc-cc-r21021.c:118:34: note: Assuming 'type' is not equal to PERIODIC_TRAINING_UPDATE bool periodic_training_update = type == PERIODIC_TRAINING_UPDATE; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/memory/tegra/tegra210-emc-cc-r21021.c:123:21: note: Assuming 'type' is not equal to DVFS_UPDATE bool dvfs_update = type == DVFS_UPDATE; ^~~~~~~~~~~~~~~~~~~ drivers/memory/tegra/tegra210-emc-cc-r21021.c:125:18: note: Assuming 'type' is equal to DVFS_PT1 bool dvfs_pt1 = type == DVFS_PT1; ^~~~~~~~~~~~~~~~ drivers/memory/tegra/tegra210-emc-cc-r21021.c:133:6: note: 'dvfs_pt1' is true if (dvfs_pt1 || periodic_training_update) { ^~~~~~~~ drivers/memory/tegra/tegra210-emc-cc-r21021.c:133:15: note: Left side of '||' is true if (dvfs_pt1 || periodic_training_update) { ^ drivers/memory/tegra/tegra210-emc-cc-r21021.c:136:15: note: Assuming 'i' is >= field 'num_channels' for (i = 0; i < emc->num_channels; i++) { ^~~~~~~~~~~~~~~~~~~~~ drivers/memory/tegra/tegra210-emc-cc-r21021.c:136:3: note: Loop condition is false. Execution continues on line 145 for (i = 0; i < emc->num_channels; i++) { ^ drivers/memory/tegra/tegra210-emc-cc-r21021.c:147:15: note: Assuming 'i' is >= field 'num_channels' for (i = 0; i < emc->num_channels; i++) { ^~~~~~~~~~~~~~~~~~~~~ drivers/memory/tegra/tegra210-emc-cc-r21021.c:147:3: note: Loop condition is false. Execution continues on line 154 for (i = 0; i < emc->num_channels; i++) { ^ drivers/memory/tegra/tegra210-emc-cc-r21021.c:154:6: note: 'dvfs_pt1' is true if (dvfs_pt1 || periodic_training_update) { ^~~~~~~~ drivers/memory/tegra/tegra210-emc-cc-r21021.c:154:15: note: Left side of '||' is true if (dvfs_pt1 || periodic_training_update) { ^ drivers/memory/tegra/tegra210-emc-cc-r21021.c:157:36: note: The right operand of '*' is a garbage value cval /= last_timing_rate_mhz * 2 * temp[0][0]; ^ ~~~~~~~~~~ drivers/memory/tegra/tegra210-emc-cc-r21021.c:283:15: warning: The left expression of the compound assignment is an uninitialized value. The computed value will also be garbage [clang-analyzer-core.uninitialized.Assign] temp[i][0] |= (value & 0x00ff) >> 0; ~~~~~~~~~~ ^ drivers/memory/tegra/tegra210-emc-cc-r21021.c:118:34: note: Assuming 'type' is not equal to PERIODIC_TRAINING_UPDATE bool periodic_training_update = type == PERIODIC_TRAINING_UPDATE; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/memory/tegra/tegra210-emc-cc-r21021.c:123:21: note: Assuming 'type' is not equal to DVFS_UPDATE bool dvfs_update = type == DVFS_UPDATE; ^~~~~~~~~~~~~~~~~~~ drivers/memory/tegra/tegra210-emc-cc-r21021.c:125:18: note: Assuming 'type' is equal to DVFS_PT1 bool dvfs_pt1 = type == DVFS_PT1; ^~~~~~~~~~~~~~~~ drivers/memory/tegra/tegra210-emc-cc-r21021.c:133:6: note: 'dvfs_pt1' is true if (dvfs_pt1 || periodic_training_update) { ^~~~~~~~ drivers/memory/tegra/tegra210-emc-cc-r21021.c:133:15: note: Left side of '||' is true if (dvfs_pt1 || periodic_training_update) { ^ drivers/memory/tegra/tegra210-emc-cc-r21021.c:136:15: note: Assuming 'i' is < field 'num_channels' for (i = 0; i < emc->num_channels; i++) { ^~~~~~~~~~~~~~~~~~~~~ drivers/memory/tegra/tegra210-emc-cc-r21021.c:136:3: note: Loop condition is true. Entering loop body for (i = 0; i < emc->num_channels; i++) { ^ drivers/memory/tegra/tegra210-emc-cc-r21021.c:136:15: note: Assuming 'i' is >= field 'num_channels' for (i = 0; i < emc->num_channels; i++) { ^~~~~~~~~~~~~~~~~~~~~ drivers/memory/tegra/tegra210-emc-cc-r21021.c:136:3: note: Loop condition is false. Execution continues on line 145 for (i = 0; i < emc->num_channels; i++) { ^ drivers/memory/tegra/tegra210-emc-cc-r21021.c:147:15: note: Assuming 'i' is >= field 'num_channels' for (i = 0; i < emc->num_channels; i++) { ^~~~~~~~~~~~~~~~~~~~~ drivers/memory/tegra/tegra210-emc-cc-r21021.c:147:3: note: Loop condition is false. Execution continues on line 154 for (i = 0; i < emc->num_channels; i++) { ^ drivers/memory/tegra/tegra210-emc-cc-r21021.c:154:6: note: 'dvfs_pt1' is true if (dvfs_pt1 || periodic_training_update) { ^~~~~~~~ drivers/memory/tegra/tegra210-emc-cc-r21021.c:154:15: note: Left side of '||' is true if (dvfs_pt1 || periodic_training_update) { ^ drivers/memory/tegra/tegra210-emc-cc-r21021.c:160:6: note: 'dvfs_pt1' is true if (dvfs_pt1) ^~~~~~~~ drivers/memory/tegra/tegra210-emc-cc-r21021.c:160:2: note: Taking true branch if (dvfs_pt1) ^ drivers/memory/tegra/tegra210-emc-cc-r21021.c:167:6: note: 'dvfs_update' is false if (dvfs_update || periodic_training_update) { ^~~~~~~~~~~ drivers/memory/tegra/tegra210-emc-cc-r21021.c:167:6: note: Left side of '||' is false drivers/memory/tegra/tegra210-emc-cc-r21021.c:167:21: note: 'periodic_training_update' is false if (dvfs_update || periodic_training_update) { ^~~~~~~~~~~~~~~~~~~~~~~~ drivers/memory/tegra/tegra210-emc-cc-r21021.c:167:2: note: Taking false branch if (dvfs_update || periodic_training_update) { ^ drivers/memory/tegra/tegra210-emc-cc-r21021.c:179:6: note: 'dvfs_pt1' is true if (dvfs_pt1 || periodic_training_update) { ^~~~~~~~ drivers/memory/tegra/tegra210-emc-cc-r21021.c:179:15: note: Left side of '||' is true if (dvfs_pt1 || periodic_training_update) { ^ drivers/memory/tegra/tegra210-emc-cc-r21021.c:185:6: note: 'dvfs_pt1' is true if (dvfs_pt1) ^~~~~~~~ drivers/memory/tegra/tegra210-emc-cc-r21021.c:185:2: note: Taking true branch if (dvfs_pt1) ^ drivers/memory/tegra/tegra210-emc-cc-r21021.c:192:6: note: 'dvfs_update' is false if (dvfs_update || periodic_training_update) { ^~~~~~~~~~~ drivers/memory/tegra/tegra210-emc-cc-r21021.c:192:6: note: Left side of '||' is false drivers/memory/tegra/tegra210-emc-cc-r21021.c:192:21: note: 'periodic_training_update' is false if (dvfs_update || periodic_training_update) { ^~~~~~~~~~~~~~~~~~~~~~~~ drivers/memory/tegra/tegra210-emc-cc-r21021.c:192:2: note: Taking false branch if (dvfs_update || periodic_training_update) { ^ drivers/memory/tegra/tegra210-emc-cc-r21021.c:206:11: note: Field 'num_channels' is <= 1 if (emc->num_channels > 1) { ^ drivers/memory/tegra/tegra210-emc-cc-r21021.c:206:2: note: Taking false branch if (emc->num_channels > 1) { ^ drivers/memory/tegra/tegra210-emc-cc-r21021.c:262:6: note: Assuming field 'num_devices' is >= 2 if (emc->num_devices < 2) ^~~~~~~~~~~~~~~~~~~~ drivers/memory/tegra/tegra210-emc-cc-r21021.c:262:2: note: Taking false branch if (emc->num_devices < 2) ^ drivers/memory/tegra/tegra210-emc-cc-r21021.c:268:6: note: 'dvfs_pt1' is true if (dvfs_pt1 || periodic_training_update) { ^~~~~~~~ drivers/memory/tegra/tegra210-emc-cc-r21021.c:268:15: note: Left side of '||' is true if (dvfs_pt1 || periodic_training_update) { ^ drivers/memory/tegra/tegra210-emc-cc-r21021.c:271:15: note: Assuming 'i' is >= field 'num_channels' for (i = 0; i < emc->num_channels; i++) { ^~~~~~~~~~~~~~~~~~~~~ drivers/memory/tegra/tegra210-emc-cc-r21021.c:271:3: note: Loop condition is false. Execution continues on line 280 for (i = 0; i < emc->num_channels; i++) { ^ drivers/memory/tegra/tegra210-emc-cc-r21021.c:282:15: note: Assuming 'i' is < field 'num_channels' for (i = 0; i < emc->num_channels; i++) { ^~~~~~~~~~~~~~~~~~~~~ drivers/memory/tegra/tegra210-emc-cc-r21021.c:282:3: note: Loop condition is true. Entering loop body for (i = 0; i < emc->num_channels; i++) { ^ drivers/memory/tegra/tegra210-emc-cc-r21021.c:282:15: note: Assuming 'i' is < field 'num_channels' for (i = 0; i < emc->num_channels; i++) { ^~~~~~~~~~~~~~~~~~~~~ drivers/memory/tegra/tegra210-emc-cc-r21021.c:282:3: note: Loop condition is true. Entering loop body for (i = 0; i < emc->num_channels; i++) { ^ drivers/memory/tegra/tegra210-emc-cc-r21021.c:283:15: note: The left expression of the compound assignment is an uninitialized value. The computed value will also be garbage temp[i][0] |= (value & 0x00ff) >> 0; ~~~~~~~~~~ ^ >> drivers/memory/tegra/tegra210-emc-cc-r21021.c:456:5: warning: Value stored >> to 'adel' is never read [clang-analyzer-deadcode.DeadStores] adel = update_clock_tree_delay(emc, DVFS_PT1); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/memory/tegra/tegra210-emc-cc-r21021.c:456:5: note: Value stored to 'adel' is never read adel = update_clock_tree_delay(emc, DVFS_PT1); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >> drivers/memory/tegra/tegra210-emc-cc-r21021.c:500:3: warning: Value stored >> to 'value' is never read [clang-analyzer-deadcode.DeadStores] value = emc_readl(emc, EMC_DBG); ^ ~~~~~~~~~~~~~~~~~~~~~~~ drivers/memory/tegra/tegra210-emc-cc-r21021.c:500:3: note: Value stored to 'value' is never read value = emc_readl(emc, EMC_DBG); ^ ~~~~~~~~~~~~~~~~~~~~~~~ >> drivers/memory/tegra/tegra210-emc-cc-r21021.c:875:3: warning: Value stored >> to 'zq_wait_long' is never read [clang-analyzer-deadcode.DeadStores] zq_wait_long = max((u32)1, div_o3(1000000, dst_clk_period)); ^ drivers/memory/tegra/tegra210-emc-cc-r21021.c:875:3: note: Value stored to 'zq_wait_long' is never read drivers/memory/tegra/tegra210-emc-cc-r21021.c:877:3: warning: Value stored to 'zq_wait_long' is never read [clang-analyzer-deadcode.DeadStores] zq_wait_long = max(next->min_mrs_wait, ^ drivers/memory/tegra/tegra210-emc-cc-r21021.c:877:3: note: Value stored to 'zq_wait_long' is never read drivers/memory/tegra/tegra210-emc-cc-r21021.c:880:3: warning: Value stored to 'zq_wait_long' is never read [clang-analyzer-deadcode.DeadStores] zq_wait_long = max((u32)256, ^ drivers/memory/tegra/tegra210-emc-cc-r21021.c:880:3: note: Value stored to 'zq_wait_long' is never read drivers/memory/tegra/tegra210-emc-cc-r21021.c:883:3: warning: Value stored to 'zq_wait_long' is never read [clang-analyzer-deadcode.DeadStores] zq_wait_long = 0; ^ ~ drivers/memory/tegra/tegra210-emc-cc-r21021.c:883:3: note: Value stored to 'zq_wait_long' is never read zq_wait_long = 0; ^ ~ 15 warnings generated. Suppressed 15 warnings (15 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. 15 warnings generated. Suppressed 15 warnings (15 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. 23 warnings generated. lib/vsprintf.c:331:22: warning: The left operand of '==' is a garbage value [clang-analyzer-core.UndefinedBinaryOperatorResult] else while (buf[-1] == '0') ^ lib/vsprintf.c:352:6: note: Assuming 'num' is > 9 if (num <= 9) { ^~~~~~~~ lib/vsprintf.c:352:2: note: Taking false branch if (num <= 9) { ^ lib/vsprintf.c:356:9: note: Calling 'put_dec' len = put_dec(tmp, num) - tmp; ^~~~~~~~~~~~~~~~~ lib/vsprintf.c:308:6: note: Assuming the condition is false if (n < 100*1000*1000) ^~~~~~~~~~~~~~~~~ lib/vsprintf.c:308:2: note: Taking false branch if (n < 100*1000*1000) ^ lib/vsprintf.c:319:6: note: Calling 'put_dec_helper4' q = put_dec_helper4(buf, q); ^~~~~~~~~~~~~~~~~~~~~~~ lib/vsprintf.c:294:9: note: Calling 'put_dec_full4' put_dec_full4(buf, x - q * 10000); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ lib/vsprintf.c:294:9: note: Returning from 'put_dec_full4' put_dec_full4(buf, x - q * 10000); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ lib/vsprintf.c:319:6: note: Returning from 'put_dec_helper4' q = put_dec_helper4(buf, q); ^~~~~~~~~~~~~~~~~~~~~~~ lib/vsprintf.c:329:6: note: Assuming 'q' is 0 if (q) ^ lib/vsprintf.c:329:2: note: Taking false branch if (q) ^ lib/vsprintf.c:331:22: note: The left operand of '==' is a garbage value else while (buf[-1] == '0') ~~~~~~~ ^ lib/vsprintf.c:529:9: warning: Assigned value is garbage or undefined [clang-analyzer-core.uninitialized.Assign] *buf = tmp[i]; ^ lib/vsprintf.c:3150:19: note: Assuming the condition is false if (WARN_ON_ONCE(size > INT_MAX)) ^ include/asm-generic/bug.h:145:27: note: expanded from macro 'WARN_ON_ONCE' int __ret_warn_once = !!(condition); \ ^~~~~~~~~ lib/vsprintf.c:3150:6: note: '__ret_warn_once' is 0 if (WARN_ON_ONCE(size > INT_MAX)) ^ include/asm-generic/bug.h:147:15: note: expanded from macro 'WARN_ON_ONCE' if (unlikely(__ret_warn_once && !__warned)) { \ ^~~~~~~~~~~~~~~ include/linux/compiler.h:78:42: note: expanded from macro 'unlikely' # define unlikely(x) __builtin_expect(!!(x), 0) ^ lib/vsprintf.c:3150:6: note: Left side of '&&' is false if (WARN_ON_ONCE(size > INT_MAX)) ^ include/asm-generic/bug.h:147:31: note: expanded from macro 'WARN_ON_ONCE' if (unlikely(__ret_warn_once && !__warned)) { \ ^ lib/vsprintf.c:3150:6: note: Taking false branch if (WARN_ON_ONCE(size > INT_MAX)) ^ include/asm-generic/bug.h:147:2: note: expanded from macro 'WARN_ON_ONCE' if (unlikely(__ret_warn_once && !__warned)) { \ ^ lib/vsprintf.c:3150:2: note: Taking false branch if (WARN_ON_ONCE(size > INT_MAX)) ^ lib/vsprintf.c:3172:6: note: Assuming 'end' is >= 'buf' if (end < buf) { ^~~~~~~~~ lib/vsprintf.c:3172:2: note: Taking false branch vim +/mpc_req +936 drivers/memory/tegra/tegra210-emc-core.c 10de21148f7d28 Joseph Lo 2019-05-29 930 10de21148f7d28 Joseph Lo 2019-05-29 931 void tegra210_emc_start_periodic_compensation(struct tegra210_emc *emc) 10de21148f7d28 Joseph Lo 2019-05-29 932 { 10de21148f7d28 Joseph Lo 2019-05-29 933 u32 mpc_req = 0x4b; 10de21148f7d28 Joseph Lo 2019-05-29 934 10de21148f7d28 Joseph Lo 2019-05-29 935 emc_writel(emc, mpc_req, EMC_MPC); 10de21148f7d28 Joseph Lo 2019-05-29 @936 mpc_req = emc_readl(emc, EMC_MPC); 10de21148f7d28 Joseph Lo 2019-05-29 937 } 10de21148f7d28 Joseph Lo 2019-05-29 938 :::::: The code at line 936 was first introduced by commit :::::: 10de21148f7d28c9e918aaee7cede74a7d506e24 memory: tegra: Add EMC scaling support code for Tegra210 :::::: TO: Joseph Lo <[email protected]> :::::: CC: Thierry Reding <[email protected]> -- 0-DAY CI Kernel Test Service https://01.org/lkp _______________________________________________ kbuild mailing list -- [email protected] To unsubscribe send an email to [email protected]
