gpu: nvgpu: mm: fix misra 2.7 violations

Advisory Rule 2.7 states that there should be no unused
parameters in functions.

This patch removes unused function parameters from the following:

 * release_as_share_id() -> remove 'id' param
 * nvgpu_pd_cache_look_up() -> remove 'g' param
 * nvgpu_vm_get_pte_size_fixed_map() -> remove 'size' param

Jira NVGPU-3178

Change-Id: Id2c3b5378bba9bdc0312742fd8393fb3ec67c4df
Signed-off-by: Scott Long <scottl@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2178650
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:
Scott Long
2019-08-19 13:40:12 -07:00
committed by mobile promotions
parent f5904601c8
commit 26d955be23
3 changed files with 6 additions and 8 deletions

View File

@@ -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);

View File

@@ -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;

View File

@@ -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] &&