mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 02:22:34 +03:00
Below MISRA 10.3 violation is reported in hal.gr.config unit Error: MISRA C-2012 Rule 10.3: nvgpu/drivers/gpu/nvgpu/hal/gr/config/gr_config_gv100.c:150: misra_violation: Implicit conversion of "(int)average_tpcs - scale_factor * num_tpc_gpc[gpc_id]" from essential type "unsigned 32-bit int" to different or narrower essential type "signed 32-bit int". Fix this by converting "diff" variable to u32 and checking for greater value before doing subtraction operation Jira NVGPU-3406 Change-Id: I27695db5bd3a4f20db878888dc87dc78ff04888a Signed-off-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/2115590 GVS: Gerrit_Virtual_Submit Reviewed-by: Philip Elcan <pelcan@nvidia.com> Reviewed-by: Vinod Gopalakrishnakurup <vinodg@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>