Re: [PATCH] drm/i915: Add bigjoiner force enable option to debugfs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Stanislav,

kernel test robot noticed the following build warnings:

[auto build test WARNING on drm-tip/drm-tip]

url:    https://github.com/intel-lab-lkp/linux/commits/Stanislav-Lisovskiy/drm-i915-Add-bigjoiner-force-enable-option-to-debugfs/20231017-105841
base:   git://anongit.freedesktop.org/drm/drm-tip drm-tip
patch link:    https://lore.kernel.org/r/20231012123411.17241-1-stanislav.lisovskiy%40intel.com
patch subject:  [PATCH] drm/i915: Add bigjoiner force enable option to debugfs
config: x86_64-rhel-8.3-rust (https://download.01.org/0day-ci/archive/20231017/202310171756.yzfTKqav-lkp@xxxxxxxxx/config)
compiler: clang version 16.0.4 (https://github.com/llvm/llvm-project.git ae42196bc493ffe877a7e3dff8be32035dea4d07)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231017/202310171756.yzfTKqav-lkp@xxxxxxxxx/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 <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202310171756.yzfTKqav-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

>> drivers/gpu/drm/i915/display/intel_display_debugfs.c:1413:6: warning: variable 'ret' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
           if (connector->base.status != connector_status_connected || !crtc) {
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/i915/display/intel_display_debugfs.c:1422:9: note: uninitialized use occurs here
           return ret;
                  ^~~
   drivers/gpu/drm/i915/display/intel_display_debugfs.c:1413:2: note: remove the 'if' if its condition is always true
           if (connector->base.status != connector_status_connected || !crtc) {
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/i915/display/intel_display_debugfs.c:1407:9: note: initialize the variable 'ret' to silence this warning
           int ret;
                  ^
                   = 0
   1 warning generated.


vim +1413 drivers/gpu/drm/i915/display/intel_display_debugfs.c

  1400	
  1401	static int i915_bigjoiner_enable_show(struct seq_file *m, void *data)
  1402	{
  1403		struct intel_connector *connector = to_intel_connector(m->private);
  1404		struct drm_crtc *crtc;
  1405		struct intel_encoder *encoder = intel_attached_encoder(connector);
  1406		struct intel_dp *intel_dp = enc_to_intel_dp(encoder);
  1407		int ret;
  1408	
  1409		if (!encoder)
  1410			return -ENODEV;
  1411	
  1412		crtc = connector->base.state->crtc;
> 1413		if (connector->base.status != connector_status_connected || !crtc) {
  1414			ret = -ENODEV;
  1415			goto out;
  1416		}
  1417	
  1418		seq_printf(m, "Bigjoiner enable: %d\n", intel_dp->force_bigjoiner_enable);
  1419	
  1420	out:
  1421	
  1422		return ret;
  1423	}
  1424	

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



[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux