From 983b4018e28d1a8911cfe224fcdfc83aa3413bfb Mon Sep 17 00:00:00 2001 From: Thomas Fleury Date: Tue, 30 Apr 2019 10:00:13 -0700 Subject: [PATCH] gpu: nvgpu: userd MISRA fix for unused return value g->ops.userd.init_mem return value is unused. Changed type to void to fix MISRA rule 17.7 violation Jira NVGPU-3260 Change-Id: If1cc0248522162944b6c8cefcf9963d6b1a1101f Signed-off-by: Thomas Fleury Reviewed-on: https://git-master.nvidia.com/r/2108839 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/hal/fifo/userd_gk20a.c | 4 +--- drivers/gpu/nvgpu/hal/fifo/userd_gk20a.h | 2 +- drivers/gpu/nvgpu/include/nvgpu/gk20a.h | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/nvgpu/hal/fifo/userd_gk20a.c b/drivers/gpu/nvgpu/hal/fifo/userd_gk20a.c index 19aa346d9..4b9547351 100644 --- a/drivers/gpu/nvgpu/hal/fifo/userd_gk20a.c +++ b/drivers/gpu/nvgpu/hal/fifo/userd_gk20a.c @@ -32,7 +32,7 @@ #include -int gk20a_userd_init_mem(struct gk20a *g, struct channel_gk20a *c) +void gk20a_userd_init_mem(struct gk20a *g, struct channel_gk20a *c) { struct nvgpu_mem *mem = c->userd_mem; u32 offset = c->userd_offset / U32(sizeof(u32)); @@ -48,8 +48,6 @@ int gk20a_userd_init_mem(struct gk20a *g, struct channel_gk20a *c) nvgpu_mem_wr32(g, mem, offset + ram_userd_get_hi_w(), 0); nvgpu_mem_wr32(g, mem, offset + ram_userd_gp_get_w(), 0); nvgpu_mem_wr32(g, mem, offset + ram_userd_gp_put_w(), 0); - - return 0; } u32 gk20a_userd_gp_get(struct gk20a *g, struct channel_gk20a *c) diff --git a/drivers/gpu/nvgpu/hal/fifo/userd_gk20a.h b/drivers/gpu/nvgpu/hal/fifo/userd_gk20a.h index ab98e4e34..919c4c758 100644 --- a/drivers/gpu/nvgpu/hal/fifo/userd_gk20a.h +++ b/drivers/gpu/nvgpu/hal/fifo/userd_gk20a.h @@ -26,7 +26,7 @@ struct gk20a; struct channel_gk20a; -int gk20a_userd_init_mem(struct gk20a *g, struct channel_gk20a *c); +void gk20a_userd_init_mem(struct gk20a *g, struct channel_gk20a *c); u32 gk20a_userd_gp_get(struct gk20a *g, struct channel_gk20a *c); u64 gk20a_userd_pb_get(struct gk20a *g, struct channel_gk20a *c); void gk20a_userd_gp_put(struct gk20a *g, struct channel_gk20a *c); diff --git a/drivers/gpu/nvgpu/include/nvgpu/gk20a.h b/drivers/gpu/nvgpu/include/nvgpu/gk20a.h index c0d5210a3..bc6c5028f 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/gk20a.h +++ b/drivers/gpu/nvgpu/include/nvgpu/gk20a.h @@ -1085,7 +1085,7 @@ struct gpu_ops { struct { int (*setup_sw)(struct gk20a *g); void (*cleanup_sw)(struct gk20a *g); - int (*init_mem)(struct gk20a *g, struct channel_gk20a *c); + void (*init_mem)(struct gk20a *g, struct channel_gk20a *c); u32 (*gp_get)(struct gk20a *g, struct channel_gk20a *c); void (*gp_put)(struct gk20a *g, struct channel_gk20a *c); u64 (*pb_get)(struct gk20a *g, struct channel_gk20a *c);