Hi Jouni,

kernel test robot noticed the following build warnings:

[auto build test WARNING on next-20251124]
[cannot apply to drm-intel/for-linux-next drm-intel/for-linux-next-fixes 
drm-tip/drm-tip v6.18-rc7 v6.18-rc6 v6.18-rc5 linus/master v6.18-rc7]
[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#_base_tree_information]

url:    
https://github.com/intel-lab-lkp/linux/commits/Jouni-H-gander/drm-i915-psr-Add-helper-for-checking-if-vblank-evasion-is-needed-by-PSR/20251125-143352
base:   next-20251124
patch link:    
https://lore.kernel.org/r/20251125063253.328023-2-jouni.hogander%40intel.com
patch subject: [PATCH 1/4] drm/i915/psr: Add helper for checking if vblank 
evasion is needed by PSR
config: x86_64-randconfig-003-20251126 
(https://download.01.org/0day-ci/archive/20251126/[email protected]/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 
87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
reproduce (this is a W=1 build): 
(https://download.01.org/0day-ci/archive/20251126/[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/i915/display/intel_psr.c:4550:2: warning: variable 
>> 'intel_dp' is used uninitialized whenever 'for' loop exits because its 
>> condition is false [-Wsometimes-uninitialized]
    4550 |         for_each_intel_encoder_mask_with_psr(display->drm, encoder,
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    4551 |                                              
crtc_state->uapi.encoder_mask) {
         |                                              
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/i915/display/intel_display.h:271:2: note: expanded from 
macro 'for_each_intel_encoder_mask_with_psr'
     271 |         list_for_each_entry((intel_encoder), 
&(dev)->mode_config.encoder_list, base.head) \
         |         
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/list.h:783:7: note: expanded from macro 'list_for_each_entry'
     783 |              !list_entry_is_head(pos, head, member);                 
   \
         |              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/i915/display/intel_psr.c:4556:9: note: uninitialized use 
occurs here
    4556 |         return intel_dp->psr.psr2_sel_fetch_enabled;
         |                ^~~~~~~~
   drivers/gpu/drm/i915/display/intel_psr.c:4550:2: note: remove the condition 
if it is always true
    4550 |         for_each_intel_encoder_mask_with_psr(display->drm, encoder,
         |         ^
   drivers/gpu/drm/i915/display/intel_display.h:271:2: note: expanded from 
macro 'for_each_intel_encoder_mask_with_psr'
     271 |         list_for_each_entry((intel_encoder), 
&(dev)->mode_config.encoder_list, base.head) \
         |         ^
   include/linux/list.h:783:7: note: expanded from macro 'list_for_each_entry'
     783 |              !list_entry_is_head(pos, head, member);                 
   \
         |              ^
   drivers/gpu/drm/i915/display/intel_psr.c:4548:27: note: initialize the 
variable 'intel_dp' to silence this warning
    4548 |         struct intel_dp *intel_dp;
         |                                  ^
         |                                   = NULL
   1 warning generated.


vim +4550 drivers/gpu/drm/i915/display/intel_psr.c

  4543  
  4544  bool intel_psr_needs_evasion(const struct intel_crtc_state *crtc_state)
  4545  {
  4546          struct intel_display *display = to_intel_display(crtc_state);
  4547          struct intel_encoder *encoder;
  4548          struct intel_dp *intel_dp;
  4549  
> 4550          for_each_intel_encoder_mask_with_psr(display->drm, encoder,

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

Reply via email to