[drm-misc:drm-misc-next 3/7] drivers/gpu/drm/panel/panel-visionox-vtdr6130.c:249:6: warning: variable 'ret' is uninitialized when used here

kernel test robot lkp at intel.com
Thu Jan 19 16:32:00 UTC 2023


tree:   git://anongit.freedesktop.org/drm/drm-misc drm-misc-next
head:   43bde505d66a41c2ad706d603e97b2c8aa2fbe4a
commit: 9402cde9347eca050e14ea9e47270e84a6899162 [3/7] drm/panel: vtdr6130: Use 16-bit brightness function
config: mips-randconfig-r031-20230119 (https://download.01.org/0day-ci/archive/20230120/202301200041.hwrKmLMy-lkp@intel.com/config)
compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project 4196ca3278f78c6e19246e54ab0ecb364e37d66a)
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
        # install mips cross compiling tool for clang build
        # apt-get install binutils-mips-linux-gnu
        git remote add drm-misc git://anongit.freedesktop.org/drm/drm-misc
        git fetch --no-tags drm-misc drm-misc-next
        git checkout 9402cde9347eca050e14ea9e47270e84a6899162
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=mips olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=mips SHELL=/bin/bash drivers/gpu/drm/panel/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp at intel.com>

All warnings (new ones prefixed by >>):

>> drivers/gpu/drm/panel/panel-visionox-vtdr6130.c:249:6: warning: variable 'ret' is uninitialized when used here [-Wuninitialized]
           if (ret < 0)
               ^~~
   drivers/gpu/drm/panel/panel-visionox-vtdr6130.c:246:9: note: initialize the variable 'ret' to silence this warning
           int ret;
                  ^
                   = 0
   1 warning generated.


vim +/ret +249 drivers/gpu/drm/panel/panel-visionox-vtdr6130.c

2349183d32d83a7 Neil Armstrong 2023-01-09  241  
2349183d32d83a7 Neil Armstrong 2023-01-09  242  static int visionox_vtdr6130_bl_update_status(struct backlight_device *bl)
2349183d32d83a7 Neil Armstrong 2023-01-09  243  {
2349183d32d83a7 Neil Armstrong 2023-01-09  244  	struct mipi_dsi_device *dsi = bl_get_data(bl);
2349183d32d83a7 Neil Armstrong 2023-01-09  245  	u16 brightness = backlight_get_brightness(bl);
2349183d32d83a7 Neil Armstrong 2023-01-09  246  	int ret;
2349183d32d83a7 Neil Armstrong 2023-01-09  247  
9402cde9347eca0 Richard Acayan 2023-01-16  248  	mipi_dsi_dcs_set_display_brightness_large(dsi, brightness);
2349183d32d83a7 Neil Armstrong 2023-01-09 @249  	if (ret < 0)
2349183d32d83a7 Neil Armstrong 2023-01-09  250  		return ret;
2349183d32d83a7 Neil Armstrong 2023-01-09  251  
2349183d32d83a7 Neil Armstrong 2023-01-09  252  	return 0;
2349183d32d83a7 Neil Armstrong 2023-01-09  253  }
2349183d32d83a7 Neil Armstrong 2023-01-09  254  

:::::: The code at line 249 was first introduced by commit
:::::: 2349183d32d83a7635baa804934813bcad13fd62 drm/panel: add visionox vtdr6130 DSI panel driver

:::::: TO: Neil Armstrong <neil.armstrong at linaro.org>
:::::: CC: Neil Armstrong <neil.armstrong at linaro.org>

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


More information about the dri-devel mailing list