From 1a611c99288f7fa314a7878a7c4eec3d11d7c627 Mon Sep 17 00:00:00 2001 From: Alex Waterman Date: Mon, 17 Dec 2018 15:38:09 -0800 Subject: [PATCH] gpu: nvgpu: MISRA rule 21.2 fixes in VM Rename misc static functions in vm.c to remove their '__' prefix. This includes: __nvgpu_vm_free_entries() -> nvgpu_vm_do_free_entries() __nvgpu_vm_remove() -> nvgpu_vm_remove() __nvgpu_vm_remove_ref() -> nvgpu_vm_remove_ref() JIRA NVGPU-1029 Change-Id: Id163a5e5437e94d87caeb74ef4c941907797cdc5 Signed-off-by: Alex Waterman Reviewed-on: https://git-master.nvidia.com/r/1974842 Reviewed-by: Scott Long Reviewed-by: Vinod Gopalakrishnakurup Reviewed-by: svc-mobile-coverity Reviewed-by: svc-mobile-misra Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/common/mm/vm.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/nvgpu/common/mm/vm.c b/drivers/gpu/nvgpu/common/mm/vm.c index 1dee80744..6ad9acf01 100644 --- a/drivers/gpu/nvgpu/common/mm/vm.c +++ b/drivers/gpu/nvgpu/common/mm/vm.c @@ -83,9 +83,9 @@ int nvgpu_vm_pde_coverage_bit_count(struct vm_gk20a *vm) return vm->mmu_levels[final_pde_level].lo_bit[0]; } -static void __nvgpu_vm_free_entries(struct vm_gk20a *vm, - struct nvgpu_gmmu_pd *pd, - int level) +static void nvgpu_vm_do_free_entries(struct vm_gk20a *vm, + struct nvgpu_gmmu_pd *pd, + int level) { int i; @@ -96,8 +96,8 @@ static void __nvgpu_vm_free_entries(struct vm_gk20a *vm, if (pd->entries != NULL) { for (i = 0; i < pd->num_entries; i++) { - __nvgpu_vm_free_entries(vm, &pd->entries[i], - level + 1); + nvgpu_vm_do_free_entries(vm, &pd->entries[i], + level + 1); } nvgpu_vfree(vm->mm->g, pd->entries); pd->entries = NULL; @@ -117,7 +117,7 @@ static void nvgpu_vm_free_entries(struct vm_gk20a *vm, } for (i = 0; i < pdb->num_entries; i++) { - __nvgpu_vm_free_entries(vm, &pdb->entries[i], 1); + nvgpu_vm_do_free_entries(vm, &pdb->entries[i], 1); } nvgpu_vfree(g, pdb->entries); @@ -600,7 +600,7 @@ struct vm_gk20a *nvgpu_vm_init(struct gk20a *g, /* * Cleanup the VM! */ -static void __nvgpu_vm_remove(struct vm_gk20a *vm) +static void nvgpu_vm_remove(struct vm_gk20a *vm) { struct nvgpu_mapped_buf *mapped_buffer; struct nvgpu_vm_area *vm_area, *vm_area_tmp; @@ -665,11 +665,11 @@ static void __nvgpu_vm_remove(struct vm_gk20a *vm) nvgpu_kfree(g, vm); } -static void __nvgpu_vm_remove_ref(struct nvgpu_ref *ref) +static void nvgpu_vm_remove_ref(struct nvgpu_ref *ref) { struct vm_gk20a *vm = container_of(ref, struct vm_gk20a, ref); - __nvgpu_vm_remove(vm); + nvgpu_vm_remove(vm); } void nvgpu_vm_get(struct vm_gk20a *vm) @@ -679,7 +679,7 @@ void nvgpu_vm_get(struct vm_gk20a *vm) void nvgpu_vm_put(struct vm_gk20a *vm) { - nvgpu_ref_put(&vm->ref, __nvgpu_vm_remove_ref); + nvgpu_ref_put(&vm->ref, nvgpu_vm_remove_ref); } int nvgpu_insert_mapped_buf(struct vm_gk20a *vm,