mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-23 18:16:01 +03:00
CERT-C INT32 states to ensure that operations on signed integers do not overflow. In page_table.c, the parameter lvl was triggering INT32 violations when adding to the value. To address these violations, do two things. First, since this is really an unsigned value, make it a u32. And rather than just make the INT32 violations INT30 violations, use the safe operations. JIRA NVGPU-3515 Change-Id: Iabd5e239813c695638988143ee901b1c19a0df5d Signed-off-by: Philip Elcan <pelcan@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/2125028 Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com> Reviewed-by: Alex Waterman <alexw@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Vinod Gopalakrishnakurup <vinodg@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>