mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-22 17:36:20 +03:00
gpu: nvgpu: fix misra violations common.mm.vm
This patch fixes misra violations in common/mm/vm.c. Rule 13.5 doesn't allow right hand operands of a logical operator to have persistent side effects. This patch translates logical operations to conditional operation. Change-Id: I83db6dba016eb353905a3887e7c47683b44b77d6 Signed-off-by: Vedashree Vidwans <vvidwans@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/2140974 Reviewed-by: Scott Long <scottl@nvidia.com> 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>
This commit is contained in:
committed by
mobile promotions
parent
164beb87b5
commit
4d6fc3780c
@@ -532,15 +532,19 @@ int nvgpu_vm_do_init(struct mm_gk20a *mm,
|
|||||||
* Determine if big pages are possible in this VM. If a split address
|
* Determine if big pages are possible in this VM. If a split address
|
||||||
* space is used then check the user_lp vma instead of the user vma.
|
* space is used then check the user_lp vma instead of the user vma.
|
||||||
*/
|
*/
|
||||||
|
if (big_pages) {
|
||||||
if (unified_va) {
|
if (unified_va) {
|
||||||
vm->big_pages = big_pages &&
|
vm->big_pages = nvgpu_big_pages_possible(vm,
|
||||||
nvgpu_big_pages_possible(vm, user_vma_start,
|
user_vma_start,
|
||||||
user_vma_limit - user_vma_start);
|
user_vma_limit - user_vma_start);
|
||||||
} else {
|
} else {
|
||||||
vm->big_pages = big_pages &&
|
vm->big_pages = nvgpu_big_pages_possible(vm,
|
||||||
nvgpu_big_pages_possible(vm, user_lp_vma_start,
|
user_lp_vma_start,
|
||||||
user_lp_vma_limit - user_lp_vma_start);
|
user_lp_vma_limit - user_lp_vma_start);
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
vm->big_pages = false;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* User VMA.
|
* User VMA.
|
||||||
|
|||||||
Reference in New Issue
Block a user