drm/amd/display: remove unreachable code
PATCH 1/1 drm/amd/display: remove unreachable code
drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn32/display_mode_vba_util_32.c:1658 dml32_TruncToValidBPP() warn: ignoring unreachable code.
--- .../drm/amd/display/dc/dml/dcn32/display_mode_vba_util_32.c | 4 ---- 1 file changed, 4 deletions(-)
drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_util_32.c +0 -4
@@ -1654,10 +1654,6 @@ double dml32_TruncToValidBPP(else return DesiredBPP; } - - *RequiredSlots =dml_ceil (DesiredBPP / MaxLinkBPP *64 ,1 ); - -return BPP_INVALID ; }// TruncToValidBPP double dml32_RequiredDTBCLK(
Signature · 1 line
2.20.1.7.g153144c
Hi,
Quoted 14 lines · Jiapeng Chong
drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn32/display_mode_vba_util_32.c:1658dml32_TruncToValidBPP()warn: ignoring unreachable code.Reported-by Abaci Robot <[email protected]>Signed-off-by Jiapeng Chong <[email protected]>--- .../drm/amd/display/dc/dml/dcn32/display_mode_vba_util_32.c | 4 ---- 1 file changed, 4 deletions(-)drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_util_32.c +0
-0
drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_util_32.c double dml32_TruncToValidBPP( · line 1659
Quoted 10 lines
drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_util_32.c +0
-4@@ -1654,10 +1654,6 @@ double dml32_TruncToValidBPP(else return DesiredBPP; } - - *RequiredSlots =dml_ceil (DesiredBPP / MaxLinkBPP *64 ,1 ); - -return BPP_INVALID ; }// TruncToValidBPP double dml32_RequiredDTBCLK(
Seems correct.
I feel like RequiredSlots is not actually used anywhere in the code, just passed around dml32_TruncToValidBPP() and dml32_CalculateOutputLink(). I've looked for any mentions of it in the mailing list, but could not find anything that implied it's part of ground working. I wonder if it's something outside the Linux tree for other platforms or related to HW gospel.