Hi Matthew,

kernel test robot noticed the following build warnings:

https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    
https://github.com/intel-lab-lkp/linux/commits/Matthew-Brost/drm-sched-Add-several-job-helpers-to-avoid-drivers-touching-scheduler-state/20251127-054955
base:   https://gitlab.freedesktop.org/drm/xe/kernel.git drm-xe-next
patch link:    
https://lore.kernel.org/r/20251126214748.650107-9-matthew.brost%40intel.com
patch subject: [PATCH v6 8/8] drm/xe: Avoid toggling schedule state to check 
LRC timestamp in TDR
config: x86_64-randconfig-161-20251128 
(https://download.01.org/0day-ci/archive/20251129/[email protected]/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Reported-by: Dan Carpenter <[email protected]>
| Closes: https://lore.kernel.org/r/[email protected]/

smatch warnings:
drivers/gpu/drm/xe/xe_lrc.c:2392 xe_lrc_timestamp() error: uninitialized symbol 
'new_ts'.

vim +/new_ts +2392 drivers/gpu/drm/xe/xe_lrc.c

94c0c481e1bd20 Matthew Brost         2025-11-26  2363  u64 
xe_lrc_timestamp(struct xe_lrc *lrc)
9b090d57746d96 Umesh Nerlige Ramappa 2024-05-17  2364  {
94c0c481e1bd20 Matthew Brost         2025-11-26  2365   u64 lrc_ts, reg_ts, 
new_ts;
82b98cadb01f63 Umesh Nerlige Ramappa 2025-05-09  2366   u32 engine_id;
82b98cadb01f63 Umesh Nerlige Ramappa 2025-05-09  2367  
82b98cadb01f63 Umesh Nerlige Ramappa 2025-05-09  2368   lrc_ts = 
xe_lrc_ctx_timestamp(lrc);
82b98cadb01f63 Umesh Nerlige Ramappa 2025-05-09  2369   /* CTX_TIMESTAMP mmio 
read is invalid on VF, so return the LRC value */
82b98cadb01f63 Umesh Nerlige Ramappa 2025-05-09  2370   if 
(IS_SRIOV_VF(lrc_to_xe(lrc))) {
94c0c481e1bd20 Matthew Brost         2025-11-26  2371           new_ts = lrc_ts;
82b98cadb01f63 Umesh Nerlige Ramappa 2025-05-09  2372           goto done;
82b98cadb01f63 Umesh Nerlige Ramappa 2025-05-09  2373   }
82b98cadb01f63 Umesh Nerlige Ramappa 2025-05-09  2374  
82b98cadb01f63 Umesh Nerlige Ramappa 2025-05-09  2375   if (lrc_ts == 
CONTEXT_ACTIVE) {
82b98cadb01f63 Umesh Nerlige Ramappa 2025-05-09  2376           engine_id = 
xe_lrc_engine_id(lrc);
82b98cadb01f63 Umesh Nerlige Ramappa 2025-05-09  2377           if 
(!get_ctx_timestamp(lrc, engine_id, &reg_ts))
94c0c481e1bd20 Matthew Brost         2025-11-26  2378                   new_ts 
= reg_ts;

uninitialized on else path.

82b98cadb01f63 Umesh Nerlige Ramappa 2025-05-09  2379  
82b98cadb01f63 Umesh Nerlige Ramappa 2025-05-09  2380           /* read lrc 
again to ensure context is still active */
82b98cadb01f63 Umesh Nerlige Ramappa 2025-05-09  2381           lrc_ts = 
xe_lrc_ctx_timestamp(lrc);

lrc_ts is re-assigned here.

82b98cadb01f63 Umesh Nerlige Ramappa 2025-05-09  2382   }
82b98cadb01f63 Umesh Nerlige Ramappa 2025-05-09  2383  
82b98cadb01f63 Umesh Nerlige Ramappa 2025-05-09  2384   /*
82b98cadb01f63 Umesh Nerlige Ramappa 2025-05-09  2385    * If context switched 
out, just use the lrc_ts. Note that this needs to
82b98cadb01f63 Umesh Nerlige Ramappa 2025-05-09  2386    * be a separate if 
condition.
82b98cadb01f63 Umesh Nerlige Ramappa 2025-05-09  2387    */
82b98cadb01f63 Umesh Nerlige Ramappa 2025-05-09  2388   if (lrc_ts != 
CONTEXT_ACTIVE)
94c0c481e1bd20 Matthew Brost         2025-11-26  2389           new_ts = lrc_ts;

uninitialized on else path.

9b090d57746d96 Umesh Nerlige Ramappa 2024-05-17  2390  
82b98cadb01f63 Umesh Nerlige Ramappa 2025-05-09  2391  done:
94c0c481e1bd20 Matthew Brost         2025-11-26 @2392   return new_ts;
94c0c481e1bd20 Matthew Brost         2025-11-26  2393  }

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

Reply via email to