From 9449396ffc72a66a4e03d0f6ff4b90c2d06c18e6 Mon Sep 17 00:00:00 2001 From: Nicolas Benech Date: Tue, 16 Apr 2019 10:30:22 -0400 Subject: [PATCH] gpu: nvgpu: change return type of channel timescale MISRA Rule-17.7 requires the return value of all functions to be used. Fix is either to use the return value or change the function to return void. In the case of the gk20a_channel_get_timescale_from_timeslice, it was always returning 0, so this patch changes the signature to return void instead. JIRA NVGPU-3039 Change-Id: Icff12af534ddae9929694f171b6a20ba359df7e7 Signed-off-by: Nicolas Benech Reviewed-on: https://git-master.nvidia.com/r/2098764 Reviewed-by: svc-mobile-coverity Reviewed-by: svc-mobile-misra GVS: Gerrit_Virtual_Submit Reviewed-by: Adeel Raza Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/common/fifo/channel.c | 4 +--- drivers/gpu/nvgpu/include/nvgpu/channel.h | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/nvgpu/common/fifo/channel.c b/drivers/gpu/nvgpu/common/fifo/channel.c index 5e77de020..efad6ad66 100644 --- a/drivers/gpu/nvgpu/common/fifo/channel.c +++ b/drivers/gpu/nvgpu/common/fifo/channel.c @@ -132,7 +132,7 @@ int channel_gk20a_commit_va(struct channel_gk20a *c) return 0; } -int gk20a_channel_get_timescale_from_timeslice(struct gk20a *g, +void gk20a_channel_get_timescale_from_timeslice(struct gk20a *g, unsigned int timeslice_period, unsigned int *__timeslice_timeout, unsigned int *__timeslice_scale) { @@ -155,8 +155,6 @@ int gk20a_channel_get_timescale_from_timeslice(struct gk20a *g, *__timeslice_timeout = value; *__timeslice_scale = shift; - - return 0; } int channel_gk20a_update_runlist(struct channel_gk20a *c, bool add) diff --git a/drivers/gpu/nvgpu/include/nvgpu/channel.h b/drivers/gpu/nvgpu/include/nvgpu/channel.h index 7a3d89e87..d19a7ca6d 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/channel.h +++ b/drivers/gpu/nvgpu/include/nvgpu/channel.h @@ -477,7 +477,7 @@ void channel_gk20a_joblist_unlock(struct channel_gk20a *c); bool channel_gk20a_joblist_is_empty(struct channel_gk20a *c); int channel_gk20a_update_runlist(struct channel_gk20a *c, bool add); -int gk20a_channel_get_timescale_from_timeslice(struct gk20a *g, +void gk20a_channel_get_timescale_from_timeslice(struct gk20a *g, unsigned int timeslice_period, unsigned int *__timeslice_timeout, unsigned int *__timeslice_scale);