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 <nbenech@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2098764
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Adeel Raza <araza@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Nicolas Benech
2019-04-16 10:30:22 -04:00
committed by mobile promotions
parent 7a1bd816e1
commit 9449396ffc
2 changed files with 2 additions and 4 deletions

View File

@@ -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)

View File

@@ -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);