mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-22 17:36:20 +03:00
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:
committed by
mobile promotions
parent
2d93706fe1
commit
19c80f89be
@@ -436,7 +436,7 @@ void nvgpu_dma_free_sys(struct gk20a *g, struct nvgpu_mem *mem)
|
||||
dma_dbg_free(g, mem->size, mem->priv.flags, "sysmem");
|
||||
|
||||
if (!(mem->mem_flags & NVGPU_MEM_FLAG_SHADOW_COPY) &&
|
||||
!(mem->mem_flags & __NVGPU_MEM_FLAG_NO_DMA) &&
|
||||
!(mem->mem_flags & NVGPU_MEM_FLAG_NO_DMA) &&
|
||||
(mem->cpu_va || mem->priv.pages)) {
|
||||
void *cpu_addr = mem->cpu_va;
|
||||
|
||||
@@ -464,7 +464,7 @@ void nvgpu_dma_free_sys(struct gk20a *g, struct nvgpu_mem *mem)
|
||||
* When this flag is set this means we are freeing a "phys" nvgpu_mem.
|
||||
* To handle this just nvgpu_kfree() the nvgpu_sgt and nvgpu_sgl.
|
||||
*/
|
||||
if (mem->mem_flags & __NVGPU_MEM_FLAG_NO_DMA) {
|
||||
if (mem->mem_flags & NVGPU_MEM_FLAG_NO_DMA) {
|
||||
nvgpu_kfree(g, mem->phys_sgt->sgl);
|
||||
nvgpu_kfree(g, mem->phys_sgt);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user