CC: [email protected] CC: [email protected] In-Reply-To: <[email protected]> References: <[email protected]> TO: Vandita Kulkarni <[email protected]>
Hi Vandita, [FYI, it's a private test report for your RFC patch.] [auto build test WARNING on drm/drm-next] [also build test WARNING on drm-tip/drm-tip next-20220204] [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] url: https://github.com/0day-ci/linux/commits/Vandita-Kulkarni/Add-data-flow-metering-support-for-HDMI2-1/20220203-214922 base: git://anongit.freedesktop.org/drm/drm drm-next :::::: branch date: 2 days ago :::::: commit date: 2 days ago config: i386-randconfig-c001 (https://download.01.org/0day-ci/archive/20220205/[email protected]/config) compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project a73e4ce6a59b01f0e37037761c1e6889d539d233) 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://github.com/0day-ci/linux/commit/d6f76f7f3bc7b26c1dd6ebc11ef0cff7deb82058 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Vandita-Kulkarni/Add-data-flow-metering-support-for-HDMI2-1/20220203-214922 git checkout d6f76f7f3bc7b26c1dd6ebc11ef0cff7deb82058 # save the config file to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=i386 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 >>) sound/isa/sb/sb16_csp.c:365:9: note: Returning from 'copy_from_user' if (copy_from_user(&code_h, data_ptr, sizeof(code_h))) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ sound/isa/sb/sb16_csp.c:365:9: note: Assuming the condition is false if (copy_from_user(&code_h, data_ptr, sizeof(code_h))) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ sound/isa/sb/sb16_csp.c:365:5: note: Taking false branch if (copy_from_user(&code_h, data_ptr, sizeof(code_h))) ^ sound/isa/sb/sb16_csp.c:369:9: note: Assuming the condition is true if (le32_to_cpu(code_h.name) != INIT_HEADER) ^ include/linux/byteorder/generic.h:89:21: note: expanded from macro 'le32_to_cpu' #define le32_to_cpu __le32_to_cpu ^ include/uapi/linux/byteorder/little_endian.h:35:26: note: expanded from macro '__le32_to_cpu' #define __le32_to_cpu(x) ((__force __u32)(__le32)(x)) ^ sound/isa/sb/sb16_csp.c:369:5: note: Taking true branch if (le32_to_cpu(code_h.name) != INIT_HEADER) ^ sound/isa/sb/sb16_csp.c:370:6: note: Execution continues on line 379 break; ^ sound/isa/sb/sb16_csp.c:379:8: note: Calling 'copy_from_user' if (copy_from_user(&code_h, data_ptr, sizeof(code_h))) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/uaccess.h:191:6: note: Assuming the condition is false if (likely(check_copy_size(to, n, false))) ^ include/linux/compiler.h:77:38: note: expanded from macro 'likely' # define likely(x) __builtin_expect(!!(x), 1) ^~~~ include/linux/uaccess.h:191:2: note: Taking true branch if (likely(check_copy_size(to, n, false))) ^ include/linux/uaccess.h:193:2: note: Returning value (loaded from 'n'), which participates in a condition later return n; ^~~~~~~~ sound/isa/sb/sb16_csp.c:379:8: note: Returning from 'copy_from_user' if (copy_from_user(&code_h, data_ptr, sizeof(code_h))) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ sound/isa/sb/sb16_csp.c:379:8: note: Assuming the condition is false if (copy_from_user(&code_h, data_ptr, sizeof(code_h))) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ sound/isa/sb/sb16_csp.c:379:4: note: Taking false branch if (copy_from_user(&code_h, data_ptr, sizeof(code_h))) ^ sound/isa/sb/sb16_csp.c:382:8: note: Assuming the condition is false if (le32_to_cpu(code_h.name) != MAIN_HEADER) { ^ include/linux/byteorder/generic.h:89:21: note: expanded from macro 'le32_to_cpu' #define le32_to_cpu __le32_to_cpu ^ include/uapi/linux/byteorder/little_endian.h:35:26: note: expanded from macro '__le32_to_cpu' #define __le32_to_cpu(x) ((__force __u32)(__le32)(x)) ^ sound/isa/sb/sb16_csp.c:382:4: note: Taking false branch if (le32_to_cpu(code_h.name) != MAIN_HEADER) { ^ sound/isa/sb/sb16_csp.c:387:10: note: Calling 'snd_sb_csp_load_user' err = snd_sb_csp_load_user(p, data_ptr, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ sound/isa/sb/sb16_csp.c:681:6: note: Calling 'IS_ERR' if (IS_ERR(kbuf)) ^~~~~~~~~~~~ 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); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ sound/isa/sb/sb16_csp.c:681:6: note: Returning from 'IS_ERR' if (IS_ERR(kbuf)) ^~~~~~~~~~~~ sound/isa/sb/sb16_csp.c:681:2: note: Taking false branch if (IS_ERR(kbuf)) ^ sound/isa/sb/sb16_csp.c:687:2: note: Returning value (loaded from 'err'), which participates in a condition later return err; ^~~~~~~~~~ sound/isa/sb/sb16_csp.c:387:10: note: Returning from 'snd_sb_csp_load_user' err = snd_sb_csp_load_user(p, data_ptr, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ sound/isa/sb/sb16_csp.c:389:8: note: Assuming 'err' is 0 if (err) ^~~ sound/isa/sb/sb16_csp.c:389:4: note: Taking false branch if (err) ^ sound/isa/sb/sb16_csp.c:395:12: note: Assigned value is garbage or undefined p->mode = le16_to_cpu(funcdesc_h.flags_play_rec); ^ 5 warnings generated. >> drivers/gpu/drm/drm_frl_dfm_helper.c:496:3: warning: Value stored to >> 'tborrowed_ns' is never read [clang-analyzer-deadcode.DeadStores] tborrowed_ns = 0; ^ ~ drivers/gpu/drm/drm_frl_dfm_helper.c:496:3: note: Value stored to 'tborrowed_ns' is never read tborrowed_ns = 0; ^ ~ >> drivers/gpu/drm/drm_frl_dfm_helper.c:760:2: warning: Value stored to >> 'tblank_ref_ns' is never read [clang-analyzer-deadcode.DeadStores] tblank_ref_ns = drm_frl_dsc_get_tblank_ref_ns(frl_dfm->params.line_time_ns, ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/drm_frl_dfm_helper.c:760:2: note: Value stored to 'tblank_ref_ns' is never read tblank_ref_ns = drm_frl_dsc_get_tblank_ref_ns(frl_dfm->params.line_time_ns, ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >> drivers/gpu/drm/drm_frl_dfm_helper.c:770:2: warning: Value stored to >> 'tblank_target_ns' is never read [clang-analyzer-deadcode.DeadStores] tblank_target_ns = frl_dfm->params.line_time_ns - tactive_target_ns; ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/drm_frl_dfm_helper.c:770:2: note: Value stored to 'tblank_target_ns' is never read tblank_target_ns = frl_dfm->params.line_time_ns - tactive_target_ns; ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Suppressed 2 warnings (2 with check filters). 1 warning generated. sound/firewire/amdtp-stream.c:1683:41: warning: Division by zero [clang-analyzer-core.DivideZero] sched_irq = !((s->packet_index + 1) % ^ sound/firewire/amdtp-stream.c:1949:6: note: Assuming 'replay_seq' is false if (replay_seq) { ^~~~~~~~~~ sound/firewire/amdtp-stream.c:1949:2: note: Taking false branch if (replay_seq) { ^ sound/firewire/amdtp-stream.c:1958:2: note: Loop condition is true. Entering loop body list_for_each_entry(s, &d->streams, list) { ^ include/linux/list.h:638:2: note: expanded from macro 'list_for_each_entry' for (pos = list_first_entry(head, typeof(*pos), member); \ ^ sound/firewire/amdtp-stream.c:1959:7: note: Assuming field 'direction' is equal to AMDTP_OUT_STREAM if (s->direction == AMDTP_OUT_STREAM) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ sound/firewire/amdtp-stream.c:1959:3: note: Taking true branch if (s->direction == AMDTP_OUT_STREAM) { ^ sound/firewire/amdtp-stream.c:1961:4: note: Execution continues on line 1964 break; ^ sound/firewire/amdtp-stream.c:1964:7: note: 'found' is true if (!found) ^~~~~ sound/firewire/amdtp-stream.c:1964:2: note: Taking false branch if (!found) ^ sound/firewire/amdtp-stream.c:1973:6: note: Assuming 'events_per_period' is not equal to 0 if (events_per_period == 0) ^~~~~~~~~~~~~~~~~~~~~~ sound/firewire/amdtp-stream.c:1973:2: note: Taking false branch if (events_per_period == 0) ^ sound/firewire/amdtp-stream.c:1975:6: note: Assuming 'events_per_buffer' is not equal to 0 if (events_per_buffer == 0) ^~~~~~~~~~~~~~~~~~~~~~ sound/firewire/amdtp-stream.c:1975:2: note: Taking false branch if (events_per_buffer == 0) ^ sound/firewire/amdtp-stream.c:1981:2: note: Loop condition is true. Entering loop body list_for_each_entry(s, &d->streams, list) { ^ include/linux/list.h:638:2: note: expanded from macro 'list_for_each_entry' for (pos = list_first_entry(head, typeof(*pos), member); \ ^ sound/firewire/amdtp-stream.c:1984:10: note: Field 'direction' is equal to AMDTP_OUT_STREAM if (s->direction == AMDTP_OUT_STREAM && s == d->irq_target) { ^ sound/firewire/amdtp-stream.c:1984:7: note: Left side of '&&' is true if (s->direction == AMDTP_OUT_STREAM && s == d->irq_target) { ^ sound/firewire/amdtp-stream.c:1984:43: note: 's' is equal to field 'irq_target' if (s->direction == AMDTP_OUT_STREAM && s == d->irq_target) { ^ sound/firewire/amdtp-stream.c:1984:3: note: Taking true branch if (s->direction == AMDTP_OUT_STREAM && s == d->irq_target) { ^ sound/firewire/amdtp-stream.c:1991:7: note: 'err' is >= 0 if (err < 0) ^~~ sound/firewire/amdtp-stream.c:1991:3: note: Taking false branch if (err < 0) ^ sound/firewire/amdtp-stream.c:1981:2: note: Loop condition is true. Entering loop body list_for_each_entry(s, &d->streams, list) { ^ include/linux/list.h:638:2: note: expanded from macro 'list_for_each_entry' for (pos = list_first_entry(head, typeof(*pos), member); \ ^ sound/firewire/amdtp-stream.c:1982:3: note: 'idle_irq_interval' initialized to 0 unsigned int idle_irq_interval = 0; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ sound/firewire/amdtp-stream.c:1984:7: note: Assuming field 'direction' is not equal to AMDTP_OUT_STREAM if (s->direction == AMDTP_OUT_STREAM && s == d->irq_target) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ sound/firewire/amdtp-stream.c:1984:40: note: Left side of '&&' is false if (s->direction == AMDTP_OUT_STREAM && s == d->irq_target) { ^ sound/firewire/amdtp-stream.c:1990:65: note: Passing the value 0 via 5th parameter 'idle_irq_interval' err = amdtp_stream_start(s, s->channel, s->speed, queue_size, idle_irq_interval); ^~~~~~~~~~~~~~~~~ sound/firewire/amdtp-stream.c:1990:9: note: Calling 'amdtp_stream_start' err = amdtp_stream_start(s, s->channel, s->speed, queue_size, idle_irq_interval); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ sound/firewire/amdtp-stream.c:1558:14: note: Calling 'amdtp_stream_running' if (WARN_ON(amdtp_stream_running(s) || ^ include/asm-generic/bug.h:121:25: note: expanded from macro 'WARN_ON' int __ret_warn_on = !!(condition); \ ^~~~~~~~~ vim +/tborrowed_ns +496 drivers/gpu/drm/drm_frl_dfm_helper.c 77ec1f8e778dfe Vandita Kulkarni 2022-02-03 467 77ec1f8e778dfe Vandita Kulkarni 2022-02-03 468 /* Verify the configuration meets the capacity requirements for the FRL configuration*/ 77ec1f8e778dfe Vandita Kulkarni 2022-02-03 469 static bool 77ec1f8e778dfe Vandita Kulkarni 2022-02-03 470 drm_frl_dfm_verify_frl_capacity_requirement(struct drm_hdmi_frl_dfm *frl_dfm) 77ec1f8e778dfe Vandita Kulkarni 2022-02-03 471 { 77ec1f8e778dfe Vandita Kulkarni 2022-02-03 472 u32 tactive_ref_ns, tblank_ref_ns, tactive_min_ns, tblank_min_ns; 77ec1f8e778dfe Vandita Kulkarni 2022-02-03 473 u32 tborrowed_ns; 77ec1f8e778dfe Vandita Kulkarni 2022-02-03 474 77ec1f8e778dfe Vandita Kulkarni 2022-02-03 475 frl_dfm->params.ftb_avg_k = 77ec1f8e778dfe Vandita Kulkarni 2022-02-03 476 drm_get_avg_tribyte_rate(frl_dfm->params.pixel_clock_max_khz, 77ec1f8e778dfe Vandita Kulkarni 2022-02-03 477 frl_dfm->params.tb_active, frl_dfm->params.tb_blank, 77ec1f8e778dfe Vandita Kulkarni 2022-02-03 478 frl_dfm->config.hactive, frl_dfm->config.hblank); 77ec1f8e778dfe Vandita Kulkarni 2022-02-03 479 tactive_ref_ns = drm_get_tactive_ref(frl_dfm->params.line_time_ns, 77ec1f8e778dfe Vandita Kulkarni 2022-02-03 480 frl_dfm->config.hblank, 77ec1f8e778dfe Vandita Kulkarni 2022-02-03 481 frl_dfm->config.hactive); 77ec1f8e778dfe Vandita Kulkarni 2022-02-03 482 tblank_ref_ns = drm_get_tblank_ref(frl_dfm->params.line_time_ns, 77ec1f8e778dfe Vandita Kulkarni 2022-02-03 483 frl_dfm->config.hblank, 77ec1f8e778dfe Vandita Kulkarni 2022-02-03 484 frl_dfm->config.hactive); 77ec1f8e778dfe Vandita Kulkarni 2022-02-03 485 tactive_min_ns = drm_get_tactive_min(frl_dfm->config.lanes, 77ec1f8e778dfe Vandita Kulkarni 2022-02-03 486 frl_dfm->params.tb_active, 77ec1f8e778dfe Vandita Kulkarni 2022-02-03 487 frl_dfm->params.overhead_max, 77ec1f8e778dfe Vandita Kulkarni 2022-02-03 488 frl_dfm->params.char_rate_min_kbps); 77ec1f8e778dfe Vandita Kulkarni 2022-02-03 489 tblank_min_ns = drm_get_tblank_min(frl_dfm->config.lanes, 77ec1f8e778dfe Vandita Kulkarni 2022-02-03 490 frl_dfm->params.tb_blank, 77ec1f8e778dfe Vandita Kulkarni 2022-02-03 491 frl_dfm->params.overhead_max, 77ec1f8e778dfe Vandita Kulkarni 2022-02-03 492 frl_dfm->params.char_rate_min_kbps); 77ec1f8e778dfe Vandita Kulkarni 2022-02-03 493 77ec1f8e778dfe Vandita Kulkarni 2022-02-03 494 if ((tactive_ref_ns >= tactive_min_ns) && 77ec1f8e778dfe Vandita Kulkarni 2022-02-03 495 (tblank_ref_ns >= tblank_min_ns)) { 77ec1f8e778dfe Vandita Kulkarni 2022-02-03 @496 tborrowed_ns = 0; 77ec1f8e778dfe Vandita Kulkarni 2022-02-03 497 frl_dfm->params.tb_borrowed = 0; 77ec1f8e778dfe Vandita Kulkarni 2022-02-03 498 return true; 77ec1f8e778dfe Vandita Kulkarni 2022-02-03 499 } 77ec1f8e778dfe Vandita Kulkarni 2022-02-03 500 77ec1f8e778dfe Vandita Kulkarni 2022-02-03 501 if ((tactive_ref_ns < tactive_min_ns) && 77ec1f8e778dfe Vandita Kulkarni 2022-02-03 502 (tblank_ref_ns >= tblank_min_ns)) { 77ec1f8e778dfe Vandita Kulkarni 2022-02-03 503 tborrowed_ns = tactive_min_ns - tactive_ref_ns; 77ec1f8e778dfe Vandita Kulkarni 2022-02-03 504 frl_dfm->params.tb_borrowed = drm_get_tribytes_borrowed(tborrowed_ns, 77ec1f8e778dfe Vandita Kulkarni 2022-02-03 505 frl_dfm->params.ftb_avg_k); 77ec1f8e778dfe Vandita Kulkarni 2022-02-03 506 if (frl_dfm->params.tb_borrowed <= TB_BORROWED_MAX) 77ec1f8e778dfe Vandita Kulkarni 2022-02-03 507 return true; 77ec1f8e778dfe Vandita Kulkarni 2022-02-03 508 } 77ec1f8e778dfe Vandita Kulkarni 2022-02-03 509 77ec1f8e778dfe Vandita Kulkarni 2022-02-03 510 return false; 77ec1f8e778dfe Vandita Kulkarni 2022-02-03 511 } 77ec1f8e778dfe Vandita Kulkarni 2022-02-03 512 --- 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]
