mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 10:34:43 +03:00
gpu: nvgpu: common: fix MISRA Rule 10.4 Violations
MISRA Rule 10.4 only allows the usage of arithmetic operations on operands of the same essential type category. Adding "U" at the end of the integer literals or casting operands to have same type of operands when an arithmetic operation is performed. This fixes violations where an arithmetic operation is performed on signed and unsigned int types. JIRA NVGPU-992 Change-Id: I27e3e59c3559c377b4bd3cbcfced90fdf90350f2 Signed-off-by: Sai Nikhil <snikhil@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1921459 Reviewed-by: svc-misra-checker <svc-misra-checker@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Adeel Raza <araza@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
2bded93b28
commit
303fc7496c
@@ -56,10 +56,10 @@ static int gk20a_vm_alloc_share(struct gk20a_as_share *as_share,
|
||||
struct vm_gk20a *vm;
|
||||
char name[32];
|
||||
const bool userspace_managed =
|
||||
(flags & NVGPU_AS_ALLOC_USERSPACE_MANAGED) != 0;
|
||||
(flags & NVGPU_AS_ALLOC_USERSPACE_MANAGED) != 0U;
|
||||
const bool unified_va =
|
||||
nvgpu_is_enabled(g, NVGPU_MM_UNIFY_ADDRESS_SPACES) ||
|
||||
(flags & NVGPU_AS_ALLOC_UNIFIED_VA) != 0;
|
||||
(flags & NVGPU_AS_ALLOC_UNIFIED_VA) != 0U;
|
||||
|
||||
nvgpu_log_fn(g, " ");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user