drm/amdgpu: remove redundant outer loop and remove commented out code