mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-23 18:16:01 +03:00
The vm object num_user_mapped_buffers was declared as an int. However, it is an unsigned value. Being a signed value required a cast to unsigned when calling nvgpu_big_zalloc() which causes a CERT-C INT31 violation. So, avoid the cast and use an unsigned type. And fix related INT30 violations related to num_user_mapped_buffers as well. To avoid introducing new MISRA/CERT-C violations, update the upstream user of these changes, fifo/channel.c and make the equivalent uses of this value, num_mapped_buffers a u32 as well. JIRA NVGPU-3517 Change-Id: I6f6d9dfe4a0ee16789b8cd17b908a3f3f9c4a40c Signed-off-by: Philip Elcan <pelcan@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/2127427 Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: svc-mobile-misra <svc-mobile-misra@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>