drivers/gpu/drm/amd/amdgpu/../display/dc/dml2_0/display_mode_util.c:186 dml_round() warn: inconsistent indenting

kernel test robot <[email protected]>
Newsgroups dev.linux.lists.oe-kbuild-all,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   bcc44b6785f216eb939226ade6e3910baa30516b
commit: b35601c5432a52c5a889a8bf505bbe2540e13254 drm/amd/display: Fix unused parameters warnings in dml2_0
date:   4 months ago
config: x86_64-randconfig-r073-20260808 (https://download.01.org/0day-ci/archive/20260808/[email protected]/config)
compiler: clang version 22.1.3 (https://github.com/llvm/llvm-project e9846648fd6183ee6d8cbdb4502213fcf902a211)
smatch: v0.5.0-9187-g5189e3fb

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
| Fixes: b35601c5432a ("drm/amd/display: Fix unused parameters warnings in dml2_0")
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

New smatch warnings:
drivers/gpu/drm/amd/amdgpu/../display/dc/dml2_0/display_mode_util.c:186 dml_round() warn: inconsistent indenting

Old smatch warnings:
drivers/gpu/drm/amd/amdgpu/../display/dc/dml2_0/display_mode_util.c:118 dml_floor() warn: if statement not indented
drivers/gpu/drm/amd/amdgpu/../display/dc/dml2_0/display_mode_util.c:152 dml_max() warn: inconsistent indenting
drivers/gpu/drm/amd/amdgpu/../display/dc/dml2_0/display_mode_util.c:747 dml_get_num_active_planes() warn: if statement not indented

vim +186 drivers/gpu/drm/amd/amdgpu/../display/dc/dml2_0/display_mode_util.c

7966f319c66d94 drivers/gpu/drm/amd/display/dc/dml2/display_mode_util.c   Qingqing Zhuo      2023-07-28  178  
7966f319c66d94 drivers/gpu/drm/amd/display/dc/dml2/display_mode_util.c   Qingqing Zhuo      2023-07-28  179  dml_float_t dml_round(dml_float_t val, dml_bool_t bankers_rounding)
7966f319c66d94 drivers/gpu/drm/amd/display/dc/dml2/display_mode_util.c   Qingqing Zhuo      2023-07-28  180  {
b35601c5432a52 drivers/gpu/drm/amd/display/dc/dml2_0/display_mode_util.c Gaghik Khachatrian 2026-03-07  181  	(void)bankers_rounding;
7966f319c66d94 drivers/gpu/drm/amd/display/dc/dml2/display_mode_util.c   Qingqing Zhuo      2023-07-28  182  //	if (bankers_rounding)
7966f319c66d94 drivers/gpu/drm/amd/display/dc/dml2/display_mode_util.c   Qingqing Zhuo      2023-07-28  183  //			return (dml_float_t) lrint(val);
7966f319c66d94 drivers/gpu/drm/amd/display/dc/dml2/display_mode_util.c   Qingqing Zhuo      2023-07-28  184  //	else {
7966f319c66d94 drivers/gpu/drm/amd/display/dc/dml2/display_mode_util.c   Qingqing Zhuo      2023-07-28  185  //		return round(val);
7966f319c66d94 drivers/gpu/drm/amd/display/dc/dml2/display_mode_util.c   Qingqing Zhuo      2023-07-28 @186  		double round_pt = 0.5;
7966f319c66d94 drivers/gpu/drm/amd/display/dc/dml2/display_mode_util.c   Qingqing Zhuo      2023-07-28  187  		double ceil = dml_ceil(val, 1);
7966f319c66d94 drivers/gpu/drm/amd/display/dc/dml2/display_mode_util.c   Qingqing Zhuo      2023-07-28  188  		double floor = dml_floor(val, 1);
7966f319c66d94 drivers/gpu/drm/amd/display/dc/dml2/display_mode_util.c   Qingqing Zhuo      2023-07-28  189  
7966f319c66d94 drivers/gpu/drm/amd/display/dc/dml2/display_mode_util.c   Qingqing Zhuo      2023-07-28  190  		if (val - floor >= round_pt)
7966f319c66d94 drivers/gpu/drm/amd/display/dc/dml2/display_mode_util.c   Qingqing Zhuo      2023-07-28  191  			return ceil;
7966f319c66d94 drivers/gpu/drm/amd/display/dc/dml2/display_mode_util.c   Qingqing Zhuo      2023-07-28  192  		else
7966f319c66d94 drivers/gpu/drm/amd/display/dc/dml2/display_mode_util.c   Qingqing Zhuo      2023-07-28  193  			return floor;
7966f319c66d94 drivers/gpu/drm/amd/display/dc/dml2/display_mode_util.c   Qingqing Zhuo      2023-07-28  194  //	}
7966f319c66d94 drivers/gpu/drm/amd/display/dc/dml2/display_mode_util.c   Qingqing Zhuo      2023-07-28  195  }
7966f319c66d94 drivers/gpu/drm/amd/display/dc/dml2/display_mode_util.c   Qingqing Zhuo      2023-07-28  196  

:::::: The code at line 186 was first introduced by commit
:::::: 7966f319c66d9468623c6a6a017ecbc0dd79be75 drm/amd/display: Introduce DML2

:::::: TO: Qingqing Zhuo <[email protected]>
:::::: CC: Alex Deucher <[email protected]>

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.