diff --git a/drivers/gpu/nvgpu/common/mm/as.c b/drivers/gpu/nvgpu/common/mm/as.c index 2baaed714..9e93320b0 100644 --- a/drivers/gpu/nvgpu/common/mm/as.c +++ b/drivers/gpu/nvgpu/common/mm/as.c @@ -43,9 +43,9 @@ static int generate_as_share_id(struct gk20a_as *as) return as->last_share_id; } /* still dumb */ -static void release_as_share_id(struct gk20a_as *as, int id) +static void release_as_share_id(struct gk20a_as_share *as_share) { - struct gk20a *g = gk20a_from_as(as); + struct gk20a *g = gk20a_from_as(as_share->as); nvgpu_log_fn(g, " "); return; @@ -183,7 +183,7 @@ int gk20a_as_release_share(struct gk20a_as_share *as_share) gk20a_idle(g); release_fail: - release_as_share_id(as_share->as, as_share->id); + release_as_share_id(as_share); nvgpu_put(g); nvgpu_kfree(g, as_share); diff --git a/drivers/gpu/nvgpu/common/mm/gmmu/pd_cache.c b/drivers/gpu/nvgpu/common/mm/gmmu/pd_cache.c index cf93d8bdd..2433a4f2e 100644 --- a/drivers/gpu/nvgpu/common/mm/gmmu/pd_cache.c +++ b/drivers/gpu/nvgpu/common/mm/gmmu/pd_cache.c @@ -435,7 +435,6 @@ static void nvgpu_pd_cache_do_free(struct gk20a *g, } static struct nvgpu_pd_mem_entry *nvgpu_pd_cache_look_up( - struct gk20a *g, struct nvgpu_pd_cache *cache, struct nvgpu_gmmu_pd *pd) { @@ -457,7 +456,7 @@ static void nvgpu_pd_cache_free(struct gk20a *g, struct nvgpu_pd_cache *cache, pd_dbg(g, "PD-Free [C] 0x%p", pd->mem); - pentry = nvgpu_pd_cache_look_up(g, cache, pd); + pentry = nvgpu_pd_cache_look_up(cache, pd); if (pentry == NULL) { nvgpu_do_assert_print(g, "Attempting to free non-existent pd"); return; diff --git a/drivers/gpu/nvgpu/common/mm/vm.c b/drivers/gpu/nvgpu/common/mm/vm.c index ca31b2ea3..a5d802de6 100644 --- a/drivers/gpu/nvgpu/common/mm/vm.c +++ b/drivers/gpu/nvgpu/common/mm/vm.c @@ -65,8 +65,7 @@ static void nvgpu_vm_do_unmap(struct nvgpu_mapped_buf *mapped_buffer, * Attempt to find a reserved memory area to determine PTE size for the passed * mapping. If no reserved area can be found use small pages. */ -static u32 nvgpu_vm_get_pte_size_fixed_map(struct vm_gk20a *vm, - u64 base, u64 size) +static u32 nvgpu_vm_get_pte_size_fixed_map(struct vm_gk20a *vm, u64 base) { struct nvgpu_vm_area *vm_area; @@ -132,7 +131,7 @@ static u32 nvgpu_vm_get_pte_size(struct vm_gk20a *vm, u64 base, u64 size) } if (base != 0ULL) { - return nvgpu_vm_get_pte_size_fixed_map(vm, base, size); + return nvgpu_vm_get_pte_size_fixed_map(vm, base); } if (size >= vm->gmmu_page_sizes[GMMU_PAGE_SIZE_BIG] &&