gpu: nvgpu: MISRA 10.x fix

-- This will MISRA 10.x violations in semaphore_pool.c,
   nvgpu_mem.h, nvgpu_mem.c and posix-nvgpu_mem.c.

JIRA NVGPU-3177

Change-Id: I1db234a47c7097da28fdfd3236d9b7c5fe385d79
Signed-off-by: Seeta Rama Raju <srajum@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2119524
Reviewed-by: Alex Waterman <alexw@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Vaibhav Kachore <vkachore@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Seeta Rama Raju
2019-05-15 12:34:15 +05:30
committed by mobile promotions
parent 1e95144194
commit 671cc9d785
4 changed files with 5 additions and 5 deletions

View File

@@ -134,7 +134,7 @@ int nvgpu_semaphore_pool_map(struct nvgpu_semaphore_pool *p,
*/ */
err = nvgpu_mem_create_from_mem(vm->mm->g, err = nvgpu_mem_create_from_mem(vm->mm->g,
&p->rw_mem, &p->sema_sea->sea_mem, &p->rw_mem, &p->sema_sea->sea_mem,
p->page_idx, 1); p->page_idx, 1UL);
if (err != 0) { if (err != 0) {
goto fail_unmap; goto fail_unmap;
} }
@@ -257,4 +257,4 @@ u64 nvgpu_semaphore_pool_gpu_va(struct nvgpu_semaphore_pool *p, bool global)
u64 nvgpu_semaphore_pool_get_page_idx(struct nvgpu_semaphore_pool *p) u64 nvgpu_semaphore_pool_get_page_idx(struct nvgpu_semaphore_pool *p)
{ {
return p->page_idx; return p->page_idx;
} }

View File

@@ -220,7 +220,7 @@ static inline bool nvgpu_mem_is_valid(struct nvgpu_mem *mem)
*/ */
int nvgpu_mem_create_from_mem(struct gk20a *g, int nvgpu_mem_create_from_mem(struct gk20a *g,
struct nvgpu_mem *dest, struct nvgpu_mem *src, struct nvgpu_mem *dest, struct nvgpu_mem *src,
u64 start_page, int nr_pages); u64 start_page, size_t nr_pages);
/** /**
* nvgpu_mem_create_from_phys - Create an nvgpu_mem from physical mem. * nvgpu_mem_create_from_phys - Create an nvgpu_mem from physical mem.

View File

@@ -141,7 +141,7 @@ u64 nvgpu_mem_get_phys_addr(struct gk20a *g, struct nvgpu_mem *mem)
*/ */
int nvgpu_mem_create_from_mem(struct gk20a *g, int nvgpu_mem_create_from_mem(struct gk20a *g,
struct nvgpu_mem *dest, struct nvgpu_mem *src, struct nvgpu_mem *dest, struct nvgpu_mem *src,
u64 start_page, int nr_pages) u64 start_page, size_t nr_pages)
{ {
int ret; int ret;
u64 start = start_page * PAGE_SIZE; u64 start = start_page * PAGE_SIZE;

View File

@@ -242,7 +242,7 @@ struct nvgpu_sgt *nvgpu_sgt_os_create_from_mem(struct gk20a *g,
int nvgpu_mem_create_from_mem(struct gk20a *g, int nvgpu_mem_create_from_mem(struct gk20a *g,
struct nvgpu_mem *dest, struct nvgpu_mem *src, struct nvgpu_mem *dest, struct nvgpu_mem *src,
u64 start_page, int nr_pages) u64 start_page, size_t nr_pages)
{ {
u64 start = start_page * U64(PAGE_SIZE); u64 start = start_page * U64(PAGE_SIZE);
u64 size = U64(nr_pages) * U64(PAGE_SIZE); u64 size = U64(nr_pages) * U64(PAGE_SIZE);