gpu: nvgpu; fix MISRA errors in nvgpu.common.mm

Rule 2.2 doesn't allow unused variable assignments. The reason is
presence of unused variable assignments may indicate error in program's
logic.
Rule 21.x doesn't allow reserved identifier or macro names starting with
'_' to be reused or defined.

Jira NVGPU-3864

Change-Id: I8ee31c0ee522cd4de00b317b0b4463868ac958ef
Signed-off-by: Vedashree Vidwans <vvidwans@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2163723
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Vedashree Vidwans
2019-07-29 12:51:15 -07:00
committed by mobile promotions
parent 2d93706fe1
commit 19c80f89be
13 changed files with 72 additions and 71 deletions

View File

@@ -1041,7 +1041,7 @@ int nvgpu_vm_map(struct vm_gk20a *vm,
mapped_buffer = nvgpu_vm_find_mapping(vm,
os_buf,
map_addr,
flags,
binfo.flags,
map_key_kind);
if (mapped_buffer != NULL) {
@@ -1226,7 +1226,7 @@ int nvgpu_vm_map(struct vm_gk20a *vm,
binfo.pgsz_idx,
pte_kind,
ctag_offset,
flags,
binfo.flags,
rw,
clear_ctags,
false,
@@ -1251,7 +1251,7 @@ int nvgpu_vm_map(struct vm_gk20a *vm,
mapped_buffer->size = map_size;
mapped_buffer->pgsz_idx = binfo.pgsz_idx;
mapped_buffer->vm = vm;
mapped_buffer->flags = flags;
mapped_buffer->flags = binfo.flags;
nvgpu_assert(map_key_kind >= 0);
mapped_buffer->kind = (u32)map_key_kind;
mapped_buffer->va_allocated = va_allocated;