Hi Anna,

kernel test robot noticed the following build warnings:

[auto build test WARNING on d024361c631b3f020a26c07d683e5103404b0fbf]

url:    
https://github.com/intel-lab-lkp/linux/commits/Anna-Maniscalco/drm-msm-preemption-aware-hangcheck/20261029-194101
base:   d024361c631b3f020a26c07d683e5103404b0fbf
patch link:    
https://lore.kernel.org/r/20261029-preemption_aware_hangcheck-v2-1-be0056e1f02d%40gmail.com
patch subject: [PATCH v2] drm/msm: preemption aware hangcheck
config: arm-defconfig 
(https://download.01.org/0day-ci/archive/20261030/[email protected]/config)
compiler: clang version 24.0.0git (https://github.com/llvm/llvm-project 
c2ea4440d4b64c148de4fdfca1fc2c437a0701e4)
reproduce (this is a W=1 build): 
(https://download.01.org/0day-ci/archive/20261030/[email protected]/reproduce)

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]>
| Closes: 
https://lore.kernel.org/oe-kbuild-all/[email protected]/

All warnings (new ones prefixed by >>):

>> drivers/gpu/drm/msm/msm_gpu.c:660:6: warning: unused variable 'ret' 
>> [-Wunused-variable]
     660 |         int ret;
         |             ^~~
   1 warning generated.
--
>> drivers/gpu/drm/msm/adreno/a6xx_preempt.c:18:21: warning: unused variable 
>> 'dev' [-Wunused-variable]
      18 |         struct drm_device *dev = gpu->dev;
         |                            ^~~
>> drivers/gpu/drm/msm/adreno/a6xx_preempt.c:32:6: warning: variable 
>> 'last_active_ctxcycles' is used uninitialized whenever 'if' condition is 
>> false [-Wsometimes-uninitialized]
      32 |         if (ring)
         |             ^~~~
   drivers/gpu/drm/msm/adreno/a6xx_preempt.c:55:37: note: uninitialized use 
occurs here
      55 |         postamble[count++] = lower_32_bits(last_active_ctxcycles);
         |                                            ^~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/msm/adreno/a6xx_preempt.c:32:2: note: remove the 'if' if its 
condition is always true
      32 |         if (ring)
         |         ^~~~~~~~~
      33 |                 last_active_ctxcycles = rbmemptr(ring, 
last_active_ctxcycles);
   drivers/gpu/drm/msm/adreno/a6xx_preempt.c:29:32: note: initialize the 
variable 'last_active_ctxcycles' to silence this warning
      29 |         uint64_t last_active_ctxcycles;
         |                                       ^
         |                                        = 0
   2 warnings generated.


vim +/ret +660 drivers/gpu/drm/msm/msm_gpu.c

   655  
   656  static bool check_ring_timeout(struct msm_ringbuffer *ring, unsigned 
long timeout)
   657  {
   658          struct msm_gpu *gpu = ring->gpu;
   659          u64 start, end;
 > 660          int ret;
   661  
   662          if (!gpu->funcs->get_ctx_timestamp)
   663                  return !made_progress(gpu, ring);
   664  
   665          start = ring->memptrs->last_job_start_ctx;
   666  
   667          if (gpu->funcs->get_ctx_timestamp(ring, &end))
   668                  end = ring->memptrs->last_active_ctxcycles;
   669  
   670          if (end >= start)
   671                  return (end - start) > timeout;
   672          else
   673                  return false;
   674  }
   675  

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

Reply via email to