Skip to contentSkip to conversation

drm/amd/display: Fix indentation in dcn32_get_vco_frequency_from_reg()

PATCH Applied Nathan Chancellor 3 participants 3 messages Jun 23, 2022

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amd/display: Fix indentation in dcn32_get_vco_frequency_from_reg()

Clang warns:

drivers/gpu/drm/amd/amdgpu/../display/dc/clk_mgr/dcn32/dcn32_clk_mgr.c:549:4: warning: misleading indentation; statement is not part of the previous 'else' [-Wmisleading-indentation]

                          pll_req = dc_fixpt_from_int(pll_req_reg & clk_mgr->clk_mgr_mask->FbMult_int);
                          ^
  drivers/gpu/drm/amd/amdgpu/../display/dc/clk_mgr/dcn32/dcn32_clk_mgr.c:542:3: note: previous statement is here
                  else
                  ^

1 warning generated.

Indent this statement to the left, as it was clearly intended to be called unconditionally, which will fix the warning.

Fixes 3e838f7ccf64 ("drm/amd/display: Get VCO frequency from registers")
---
 drivers/gpu/drm/amd/display/dc/clk_mgr/dcn32/dcn32_clk_mgr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn32/dcn32_clk_mgr.c +1 -1
index 113f93b3d3b2..4e8059f20007 100644
@@ -546,7 +546,7 @@ static uint32_t dcn32_get_vco_frequency_from_reg(struct clk_mgr_internal *clk_mg
 		 * this works because the int part is on the right edge of the register
 		 * and the frac part is on the left edge
 		 */
-			pll_req = dc_fixpt_from_int(pll_req_reg & clk_mgr->clk_mgr_mask->FbMult_int);
+		pll_req = dc_fixpt_from_int(pll_req_reg & clk_mgr->clk_mgr_mask->FbMult_int);
 		pll_req.value |= pll_req_reg & clk_mgr->clk_mgr_mask->FbMult_frac;
 
 		/* multiply by REFCLK period */

base-commit: fdf249c70a36e2daa7ddf1252cf3b71faed87abc

Signature · 1 line
2.36.1
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 8 lines · Nathan Chancellor

Clang warns:

drivers/gpu/drm/amd/amdgpu/../display/dc/clk_mgr/dcn32/dcn32_clk_mgr.c:549:4: warning: misleading indentation; statement is not part of the previous 'else' [-Wmisleading-indentation]

                          pll_req = dc_fixpt_from_int(pll_req_reg & clk_mgr->clk_mgr_mask->FbMult_int);
                          ^
  drivers/gpu/drm/amd/amdgpu/../display/dc/clk_mgr/dcn32/dcn32_clk_mgr.c:542:3: note: previous statement is here
                  else
                  ^
Quoted 8 lines

1 warning generated.

Indent this statement to the left, as it was clearly intended to be called unconditionally, which will fix the warning.

Fixes 3e838f7ccf64 ("drm/amd/display: Get VCO frequency from registers")

Just hit this myself, thanks for the fix!

Quoted 19 lines
---
 drivers/gpu/drm/amd/display/dc/clk_mgr/dcn32/dcn32_clk_mgr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn32/dcn32_clk_mgr.c +1 -1
index 113f93b3d3b2..4e8059f20007 100644
@@ -546,7 +546,7 @@ static uint32_t dcn32_get_vco_frequency_from_reg(struct clk_mgr_internal *clk_mg
 		 * this works because the int part is on the right edge of the register
 		 * and the frac part is on the left edge
 		 */
-			pll_req = dc_fixpt_from_int(pll_req_reg & clk_mgr->clk_mgr_mask->FbMult_int);
+		pll_req = dc_fixpt_from_int(pll_req_reg & clk_mgr->clk_mgr_mask->FbMult_int);
 		pll_req.value |= pll_req_reg & clk_mgr->clk_mgr_mask->FbMult_frac;
 
 		/* multiply by REFCLK period */

base-commit: fdf249c70a36e2daa7ddf1252cf3b71faed87abc

Applied
#2 lore raw

Applied. Thanks!

Alex

Quoted 44 lines · Leo
Quoted 8 lines · Nathan Chancellor

Clang warns:

drivers/gpu/drm/amd/amdgpu/../display/dc/clk_mgr/dcn32/dcn32_clk_mgr.c:549:4: warning: misleading indentation; statement is not part of the previous 'else' [-Wmisleading-indentation]

                          pll_req = dc_fixpt_from_int(pll_req_reg & clk_mgr->clk_mgr_mask->FbMult_int);
                          ^
  drivers/gpu/drm/amd/amdgpu/../display/dc/clk_mgr/dcn32/dcn32_clk_mgr.c:542:3: note: previous statement is here
                  else
                  ^
Quoted 8 lines

1 warning generated.

Indent this statement to the left, as it was clearly intended to be called unconditionally, which will fix the warning.

Fixes 3e838f7ccf64 ("drm/amd/display: Get VCO frequency from registers")

Just hit this myself, thanks for the fix!

Quoted 19 lines
---
 drivers/gpu/drm/amd/display/dc/clk_mgr/dcn32/dcn32_clk_mgr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn32/dcn32_clk_mgr.c +1 -1
index 113f93b3d3b2..4e8059f20007 100644
@@ -546,7 +546,7 @@ static uint32_t dcn32_get_vco_frequency_from_reg(struct clk_mgr_internal *clk_mg
               * this works because the int part is on the right edge of the register
               * and the frac part is on the left edge
               */
-                     pll_req = dc_fixpt_from_int(pll_req_reg & clk_mgr->clk_mgr_mask->FbMult_int);
+             pll_req = dc_fixpt_from_int(pll_req_reg & clk_mgr->clk_mgr_mask->FbMult_int);
              pll_req.value |= pll_req_reg & clk_mgr->clk_mgr_mask->FbMult_frac;
 
              /* multiply by REFCLK period */

base-commit: fdf249c70a36e2daa7ddf1252cf3b71faed87abc