From 84d02ed7b1f441dab2986c1e7e6c888ee523e046 Mon Sep 17 00:00:00 2001 From: Sourab Gupta Date: Wed, 20 Dec 2017 14:54:29 +0530 Subject: gpu: nvgpu: correct function arguments to fix QNX compilation The patch changes the function argument from 'int' to 'unsigned int' to fix the QNX compilation failures. Change-Id: Iaee7850d8310bea693996ac618b95252ca5d1b35 Signed-off-by: Sourab Gupta Reviewed-on: https://git-master.nvidia.com/r/1626397 Reviewed-by: svc-mobile-coverity Reviewed-by: Deepak Nibade GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/gk20a/channel_gk20a.c | 8 ++++---- drivers/gpu/nvgpu/gk20a/channel_gk20a.h | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'drivers') diff --git a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c index 3fe119d7..16d4711f 100644 --- a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c @@ -126,12 +126,12 @@ int channel_gk20a_commit_va(struct channel_gk20a *c) } int gk20a_channel_get_timescale_from_timeslice(struct gk20a *g, - int timeslice_period, - int *__timeslice_timeout, int *__timeslice_scale) + unsigned int timeslice_period, + unsigned int *__timeslice_timeout, unsigned int *__timeslice_scale) { - int value = scale_ptimer(timeslice_period, + unsigned int value = scale_ptimer(timeslice_period, ptimer_scalingfactor10x(g->ptimer_src_freq)); - int shift = 0; + unsigned int shift = 0; /* value field is 8 bits long */ while (value >= 1 << 8) { diff --git a/drivers/gpu/nvgpu/gk20a/channel_gk20a.h b/drivers/gpu/nvgpu/gk20a/channel_gk20a.h index 596b85f3..c13b1c58 100644 --- a/drivers/gpu/nvgpu/gk20a/channel_gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/channel_gk20a.h @@ -353,8 +353,8 @@ 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, - int timeslice_period, - int *__timeslice_timeout, int *__timeslice_scale); + unsigned int timeslice_period, + unsigned int *__timeslice_timeout, unsigned int *__timeslice_scale); int channel_gk20a_alloc_job(struct channel_gk20a *c, struct channel_gk20a_job **job_out); -- cgit v1.2.2