mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-23 18:16:01 +03:00
Improve the code complexity for the rbtree function delete_fixup(). Create smaller functions, delete_fixup_right_child() and delete_left_child() to handle those parts of the agorithm. Also, create helper function has_no_red_children() to handle a common check in these new functions. This brings the TCC metric to 7. JIRA NVGPU-4094 Change-Id: If34167be308093ae3b597e02bbd3da8b4e9d27aa Signed-off-by: Philip Elcan <pelcan@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/2205844 Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com> Reviewed-by: Nicolas Benech <nbenech@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Alex Waterman <alexw@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
11 KiB
11 KiB