mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 10:34:43 +03:00
9c40a7389dd0fcfdf5b490fec9a240ec47d173a4
Fix the issue in DIV_ROUND_CLOSEST implementation. Current implementation will have issues for an input of two negative numbers. For example, Input values of a = -13 and divisor = -5 should ideally give result as 3. But because of the third condition check ie.(val) > 0, the result would be given incorrectly as 2 with the current implementation. Modify the condition to handle two negative number division. Jira NVGPU-4478 Change-Id: Ifb3f58b4ff742abbb59fda328c1b5facdcb1b38b Signed-off-by: ajesh <akv@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2284320 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Alex Waterman <alexw@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> GVS: Gerrit_Virtual_Submit
Description
No description provided