Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/amd/display: Remove unnecessary assignments

[WHAT & HOW]
TimeForFetchingMetaPTE, TimeForFetchingRowInVBlank and
LinesToRequestPrefetchPixelData are local variables. They
are freed when CalculatePrefetchSchedule() ends and need
not clearing explicitly.

This fixes 21 UNUSED_VALUE issues reported by Coverity.

Reviewed-by: Nevenko Stupar <nevenko.stupar@amd.com>
Signed-off-by: Alex Hung <alex.hung@amd.com>
Signed-off-by: Rodrigo Siqueira <rodrigo.siqueira@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Alex Hung and committed by
Alex Deucher
b9c8ad73 59b26c9a

-21
-3
drivers/gpu/drm/amd/display/dc/dml/dcn20/display_mode_vba_20.c
··· 785 785 786 786 if (MyError) { 787 787 *PrefetchBandwidth = 0; 788 - TimeForFetchingMetaPTE = 0; 789 - TimeForFetchingRowInVBlank = 0; 790 788 *DestinationLinesToRequestVMInVBlank = 0; 791 789 *DestinationLinesToRequestRowInVBlank = 0; 792 790 *DestinationLinesForPrefetch = 0; 793 - LinesToRequestPrefetchPixelData = 0; 794 791 *VRatioPrefetchY = 0; 795 792 *VRatioPrefetchC = 0; 796 793 *RequiredPrefetchPixDataBW = 0;
-3
drivers/gpu/drm/amd/display/dc/dml/dcn20/display_mode_vba_20v2.c
··· 845 845 846 846 if (MyError) { 847 847 *PrefetchBandwidth = 0; 848 - TimeForFetchingMetaPTE = 0; 849 - TimeForFetchingRowInVBlank = 0; 850 848 *DestinationLinesToRequestVMInVBlank = 0; 851 849 *DestinationLinesToRequestRowInVBlank = 0; 852 850 *DestinationLinesForPrefetch = 0; 853 - LinesToRequestPrefetchPixelData = 0; 854 851 *VRatioPrefetchY = 0; 855 852 *VRatioPrefetchC = 0; 856 853 *RequiredPrefetchPixDataBW = 0;
-3
drivers/gpu/drm/amd/display/dc/dml/dcn21/display_mode_vba_21.c
··· 1049 1049 1050 1050 if (MyError) { 1051 1051 *PrefetchBandwidth = 0; 1052 - TimeForFetchingMetaPTE = 0; 1053 - TimeForFetchingRowInVBlank = 0; 1054 1052 *DestinationLinesToRequestVMInVBlank = 0; 1055 1053 *DestinationLinesToRequestRowInVBlank = 0; 1056 1054 *DestinationLinesForPrefetch = 0; 1057 - LinesToRequestPrefetchPixelData = 0; 1058 1055 *VRatioPrefetchY = 0; 1059 1056 *VRatioPrefetchC = 0; 1060 1057 *RequiredPrefetchPixDataBWLuma = 0;
-3
drivers/gpu/drm/amd/display/dc/dml/dcn30/display_mode_vba_30.c
··· 1280 1280 1281 1281 if (MyError) { 1282 1282 *PrefetchBandwidth = 0; 1283 - TimeForFetchingMetaPTE = 0; 1284 - TimeForFetchingRowInVBlank = 0; 1285 1283 *DestinationLinesToRequestVMInVBlank = 0; 1286 1284 *DestinationLinesToRequestRowInVBlank = 0; 1287 1285 *DestinationLinesForPrefetch = 0; 1288 - LinesToRequestPrefetchPixelData = 0; 1289 1286 *VRatioPrefetchY = 0; 1290 1287 *VRatioPrefetchC = 0; 1291 1288 *RequiredPrefetchPixDataBWLuma = 0;
-3
drivers/gpu/drm/amd/display/dc/dml/dcn31/display_mode_vba_31.c
··· 1444 1444 1445 1445 if (MyError) { 1446 1446 *PrefetchBandwidth = 0; 1447 - TimeForFetchingMetaPTE = 0; 1448 - TimeForFetchingRowInVBlank = 0; 1449 1447 *DestinationLinesToRequestVMInVBlank = 0; 1450 1448 *DestinationLinesToRequestRowInVBlank = 0; 1451 1449 *DestinationLinesForPrefetch = 0; 1452 - LinesToRequestPrefetchPixelData = 0; 1453 1450 *VRatioPrefetchY = 0; 1454 1451 *VRatioPrefetchC = 0; 1455 1452 *RequiredPrefetchPixDataBWLuma = 0;
-3
drivers/gpu/drm/amd/display/dc/dml/dcn314/display_mode_vba_314.c
··· 1461 1461 1462 1462 if (MyError) { 1463 1463 *PrefetchBandwidth = 0; 1464 - TimeForFetchingMetaPTE = 0; 1465 - TimeForFetchingRowInVBlank = 0; 1466 1464 *DestinationLinesToRequestVMInVBlank = 0; 1467 1465 *DestinationLinesToRequestRowInVBlank = 0; 1468 1466 *DestinationLinesForPrefetch = 0; 1469 - LinesToRequestPrefetchPixelData = 0; 1470 1467 *VRatioPrefetchY = 0; 1471 1468 *VRatioPrefetchC = 0; 1472 1469 *RequiredPrefetchPixDataBWLuma = 0;
-3
drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_util_32.c
··· 4097 4097 4098 4098 if (MyError) { 4099 4099 *PrefetchBandwidth = 0; 4100 - TimeForFetchingMetaPTE = 0; 4101 - TimeForFetchingRowInVBlank = 0; 4102 4100 *DestinationLinesToRequestVMInVBlank = 0; 4103 4101 *DestinationLinesToRequestRowInVBlank = 0; 4104 4102 *DestinationLinesForPrefetch = 0; 4105 - LinesToRequestPrefetchPixelData = 0; 4106 4103 *VRatioPrefetchY = 0; 4107 4104 *VRatioPrefetchC = 0; 4108 4105 *RequiredPrefetchPixDataBWLuma = 0;