From f9cc478c313ba74d12d5ccf1b7899790c35b9f6f Mon Sep 17 00:00:00 2001 From: Vaibhav Kachore Date: Tue, 23 Apr 2019 23:04:11 +0530 Subject: [PATCH] gpu: nvgpu: change return type of resume_all_serviceable_ch - nvgpu_channel_resume_all_serviceable_ch is always returning 0. So, it is safe to change return type of this function to void. - This is required to fix MISRA violation: MISRA C-2012 Rule 17.7: The value returned by a function having non-void return shall be used. JIRA NVGPU-3140 Change-Id: I12930ddb21b506266664aac8905326204e9483eb Signed-off-by: Vaibhav Kachore Reviewed-on: https://git-master.nvidia.com/r/2106989 GVS: Gerrit_Virtual_Submit Reviewed-by: Adeel Raza Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/common/fifo/channel.c | 3 +-- drivers/gpu/nvgpu/include/nvgpu/channel.h | 2 +- drivers/gpu/nvgpu/include/nvgpu/gk20a.h | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/nvgpu/common/fifo/channel.c b/drivers/gpu/nvgpu/common/fifo/channel.c index 15a52d4b9..71c5383c1 100644 --- a/drivers/gpu/nvgpu/common/fifo/channel.c +++ b/drivers/gpu/nvgpu/common/fifo/channel.c @@ -2386,7 +2386,7 @@ int nvgpu_channel_suspend_all_serviceable_ch(struct gk20a *g) return 0; } -int nvgpu_channel_resume_all_serviceable_ch(struct gk20a *g) +void nvgpu_channel_resume_all_serviceable_ch(struct gk20a *g) { struct fifo_gk20a *f = &g->fifo; u32 chid; @@ -2418,7 +2418,6 @@ int nvgpu_channel_resume_all_serviceable_ch(struct gk20a *g) } nvgpu_log_fn(g, "done"); - return 0; } void gk20a_channel_semaphore_wakeup(struct gk20a *g, bool post_events) diff --git a/drivers/gpu/nvgpu/include/nvgpu/channel.h b/drivers/gpu/nvgpu/include/nvgpu/channel.h index d19a7ca6d..731d2a33e 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/channel.h +++ b/drivers/gpu/nvgpu/include/nvgpu/channel.h @@ -433,7 +433,7 @@ int gk20a_enable_channel_tsg(struct gk20a *g, struct channel_gk20a *ch); int gk20a_disable_channel_tsg(struct gk20a *g, struct channel_gk20a *ch); int nvgpu_channel_suspend_all_serviceable_ch(struct gk20a *g); -int nvgpu_channel_resume_all_serviceable_ch(struct gk20a *g); +void nvgpu_channel_resume_all_serviceable_ch(struct gk20a *g); void gk20a_channel_deterministic_idle(struct gk20a *g); void gk20a_channel_deterministic_unidle(struct gk20a *g); diff --git a/drivers/gpu/nvgpu/include/nvgpu/gk20a.h b/drivers/gpu/nvgpu/include/nvgpu/gk20a.h index 1b67c3865..95ee35f2d 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/gk20a.h +++ b/drivers/gpu/nvgpu/include/nvgpu/gk20a.h @@ -1199,7 +1199,7 @@ struct gpu_ops { void (*force_ctx_reload)(struct channel_gk20a *ch); void (*abort_clean_up)(struct channel_gk20a *ch); int (*suspend_all_serviceable_ch)(struct gk20a *g); - int (*resume_all_serviceable_ch)(struct gk20a *g); + void (*resume_all_serviceable_ch)(struct gk20a *g); void (*set_error_notifier)(struct channel_gk20a *ch, u32 error); void (*reset_faulted)(struct gk20a *g, struct channel_gk20a *ch, bool eng, bool pbdma);