gpu: nvgpu: mm: fix misra 2.7 violation

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

This patch removes the unused struct gk20a pointer from
the nvgpu_aperture_str() function.

Jira NVGPU-3178

Change-Id: Ied7fed13e44f1083e7477a5d6fb9facafca838de
Signed-off-by: Scott Long <scottl@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2174883
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: Philip Elcan <pelcan@nvidia.com>
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:
Scott Long
2019-08-13 19:47:13 -07:00
committed by mobile promotions
parent bac6070509
commit a139172130
5 changed files with 6 additions and 8 deletions

View File

@@ -760,7 +760,7 @@ static int nvgpu_gmmu_update_page_table(struct vm_gk20a *vm,
page_size >> 10,
nvgpu_gmmu_perm_str(attrs->rw_flag),
attrs->kind_v,
nvgpu_aperture_str(g, attrs->aperture),
nvgpu_aperture_str(attrs->aperture),
attrs->cacheable ? 'C' : '-',
attrs->sparse ? 'S' : '-',
attrs->priv ? 'P' : '-',

View File

@@ -221,7 +221,7 @@ static void update_gmmu_pte_locked(struct vm_gk20a *vm,
page_size >> 10,
nvgpu_gmmu_perm_str(attrs->rw_flag),
attrs->kind_v,
nvgpu_aperture_str(g, attrs->aperture),
nvgpu_aperture_str(attrs->aperture),
attrs->cacheable ? 'C' : '-',
attrs->sparse ? 'S' : '-',
attrs->priv ? 'P' : '-',

View File

@@ -273,7 +273,7 @@ static void update_gmmu_pte_locked(struct vm_gk20a *vm,
page_size >> 10,
nvgpu_gmmu_perm_str(attrs->rw_flag),
attrs->kind_v,
nvgpu_aperture_str(g, attrs->aperture),
nvgpu_aperture_str(attrs->aperture),
attrs->cacheable ? 'C' : '-',
attrs->sparse ? 'S' : '-',
attrs->priv ? 'P' : '-',
@@ -294,7 +294,7 @@ static void update_gmmu_pte_locked(struct vm_gk20a *vm,
page_size >> 10,
nvgpu_gmmu_perm_str(attrs->rw_flag),
attrs->kind_v,
nvgpu_aperture_str(g, attrs->aperture),
nvgpu_aperture_str(attrs->aperture),
attrs->cacheable ? 'C' : '-',
attrs->sparse ? 'S' : '-',
attrs->priv ? 'P' : '-',

View File

@@ -159,8 +159,7 @@ static const char *aperture_name[APERTURE_MAX_ENUM + 1] = {
[APERTURE_MAX_ENUM] = "UNKNOWN",
};
static inline const char *nvgpu_aperture_str(struct gk20a *g,
enum nvgpu_aperture aperture)
static inline const char *nvgpu_aperture_str(enum nvgpu_aperture aperture)
{
if ((aperture < APERTURE_INVALID) || (aperture >= APERTURE_MAX_ENUM)) {
return aperture_name[APERTURE_MAX_ENUM];

View File

@@ -171,8 +171,7 @@ struct nvgpu_mapped_buf *nvgpu_vm_find_mapping(struct vm_gk20a *vm,
vm->gmmu_page_sizes[mapped_buffer->pgsz_idx] >> 10,
vm_aspace_id(vm),
mapped_buffer->flags,
nvgpu_aperture_str(g,
gk20a_dmabuf_aperture(g, os_buf->dmabuf)));
nvgpu_aperture_str(gk20a_dmabuf_aperture(g, os_buf->dmabuf)));
return mapped_buffer;
}