
tree: https://gitee.com/openeuler/kernel.git OLK-5.10 head: b5ec139da1a4916dfc9644ee3d9426dbd6f23c13 commit: 80764bc784413eb604c7d472db55b1ca72d4bbc5 [2882/2882] drm/loongson: add kernel modesetting driver support for ls7a1000/ls7a2000 config: x86_64-buildonly-randconfig-2004-20250502 (https://download.01.org/0day-ci/archive/20250604/202506040411.rMDpRs4Q-lkp@i...) compiler: clang version 20.1.2 (https://github.com/llvm/llvm-project 58df0ef89dd64126512e4ee27b4ac3fd8ddf6247) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250604/202506040411.rMDpRs4Q-lkp@i...) 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@intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202506040411.rMDpRs4Q-lkp@intel.com/ All warnings (new ones prefixed by >>): drivers/gpu/drm/loongson/lsdc_plane.c:98:13: warning: variable 'lo32_addr_reg' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized] 98 | } else if (index == 1) { | ^~~~~~~~~~ drivers/gpu/drm/loongson/lsdc_plane.c:114:33: note: uninitialized use occurs here 114 | writel(paddr, ldev->reg_base + lo32_addr_reg); | ^~~~~~~~~~~~~ drivers/gpu/drm/loongson/lsdc_plane.c:98:9: note: remove the 'if' if its condition is always true 98 | } else if (index == 1) { | ^~~~~~~~~~~~~~~ drivers/gpu/drm/loongson/lsdc_plane.c:77:19: note: initialize the variable 'lo32_addr_reg' to silence this warning 77 | u32 lo32_addr_reg; | ^ | = 0 drivers/gpu/drm/loongson/lsdc_plane.c:98:13: warning: variable 'hi32_addr_reg' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized] 98 | } else if (index == 1) { | ^~~~~~~~~~ drivers/gpu/drm/loongson/lsdc_plane.c:115:48: note: uninitialized use occurs here 115 | writel((paddr >> 32) & 0xFF, ldev->reg_base + hi32_addr_reg); | ^~~~~~~~~~~~~ drivers/gpu/drm/loongson/lsdc_plane.c:98:9: note: remove the 'if' if its condition is always true 98 | } else if (index == 1) { | ^~~~~~~~~~~~~~~ drivers/gpu/drm/loongson/lsdc_plane.c:78:19: note: initialize the variable 'hi32_addr_reg' to silence this warning 78 | u32 hi32_addr_reg; | ^ | = 0 drivers/gpu/drm/loongson/lsdc_plane.c:98:13: warning: variable 'val' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized] 98 | } else if (index == 1) { | ^~~~~~~~~~ drivers/gpu/drm/loongson/lsdc_plane.c:120:9: note: uninitialized use occurs here 120 | writel(val | CFG_PAGE_FLIP_BIT, ldev->reg_base + cfg_reg); | ^~~ drivers/gpu/drm/loongson/lsdc_plane.c:98:9: note: remove the 'if' if its condition is always true 98 | } else if (index == 1) { | ^~~~~~~~~~~~~~~ drivers/gpu/drm/loongson/lsdc_plane.c:80:9: note: initialize the variable 'val' to silence this warning 80 | u32 val; | ^ | = 0 drivers/gpu/drm/loongson/lsdc_plane.c:98:13: warning: variable 'cfg_reg' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized] 98 | } else if (index == 1) { | ^~~~~~~~~~ drivers/gpu/drm/loongson/lsdc_plane.c:120:51: note: uninitialized use occurs here 120 | writel(val | CFG_PAGE_FLIP_BIT, ldev->reg_base + cfg_reg); | ^~~~~~~ drivers/gpu/drm/loongson/lsdc_plane.c:98:9: note: remove the 'if' if its condition is always true 98 | } else if (index == 1) { | ^~~~~~~~~~~~~~~ drivers/gpu/drm/loongson/lsdc_plane.c:79:13: note: initialize the variable 'cfg_reg' to silence this warning 79 | u32 cfg_reg; | ^ | = 0
drivers/gpu/drm/loongson/lsdc_plane.c:444:7: warning: variable 'format_count' is used uninitialized whenever switch case is taken [-Wsometimes-uninitialized] 444 | case DRM_PLANE_TYPE_OVERLAY: | ^~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/loongson/lsdc_plane.c:451:21: note: uninitialized use occurs here 451 | formats, format_count, | ^~~~~~~~~~~~ drivers/gpu/drm/loongson/lsdc_plane.c:428:27: note: initialize the variable 'format_count' to silence this warning 428 | unsigned int format_count; | ^ | = 0 5 warnings generated.
vim +/format_count +444 drivers/gpu/drm/loongson/lsdc_plane.c 420 421 int lsdc_plane_init(struct lsdc_device *ldev, 422 struct drm_plane *plane, 423 enum drm_plane_type type, 424 unsigned int index) 425 { 426 struct drm_device *ddev = ldev->ddev; 427 int zpos = lsdc_plane_get_default_zpos(type); 428 unsigned int format_count; 429 const u32 *formats; 430 const char *name; 431 int ret; 432 433 switch (type) { 434 case DRM_PLANE_TYPE_PRIMARY: 435 formats = lsdc_primary_formats; 436 format_count = ARRAY_SIZE(lsdc_primary_formats); 437 name = "primary-%u"; 438 break; 439 case DRM_PLANE_TYPE_CURSOR: 440 formats = lsdc_cursor_formats; 441 format_count = ARRAY_SIZE(lsdc_cursor_formats); 442 name = "cursor-%u"; 443 break;
444 case DRM_PLANE_TYPE_OVERLAY:
-- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki