mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-22 17:36:20 +03:00
MISRA Advisory Rule 10.5 states that the value of an expression should not be cast to an inappropriate essential type. This change removes five violations of this rule that involve casting boolean results to unsigned values: * pass 1/0 (instead of true/false) to nvgpu_atomic operations * fix skip_mask handling in gm20b_gr_init_pd_skip_table_gpc() * fix l3_alloc flags check in nvgpu_gmmu_map_locked() This change also eliminates several MISRA Advisory Rule 4.6 violations. JIRA NVGPU-3798 Change-Id: I707da8a812bfb32eaeb2200463885c0961b197b3 Signed-off-by: Scott Long <scottl@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/2153070 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>