summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/vgpu/fifo_vgpu.c
diff options
context:
space:
mode:
authorTerje Bergstrom <tbergstrom@nvidia.com>2016-11-09 18:53:16 -0500
committermobile promotions <svcmobile_promotions@nvidia.com>2016-11-17 00:35:36 -0500
commitd29afd2c9e990799b470bb95a97935cf5b5020db (patch)
tree48f14dffe90956e9b42b02a87b95fd7a1dfeef3e /drivers/gpu/nvgpu/vgpu/fifo_vgpu.c
parent5494e846c78dd0da74635905ead3abe45502375f (diff)
gpu: nvgpu: Fix signed comparison bugs
Fix small problems related to signed versus unsigned comparisons throughout the driver. Bump up the warning level to prevent such problems from occuring in future. Change-Id: I8ff5efb419f664e8a2aedadd6515ae4d18502ae0 Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: http://git-master/r/1252068 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/vgpu/fifo_vgpu.c')
-rw-r--r--drivers/gpu/nvgpu/vgpu/fifo_vgpu.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/gpu/nvgpu/vgpu/fifo_vgpu.c b/drivers/gpu/nvgpu/vgpu/fifo_vgpu.c
index efeeb8ee..c3669990 100644
--- a/drivers/gpu/nvgpu/vgpu/fifo_vgpu.c
+++ b/drivers/gpu/nvgpu/vgpu/fifo_vgpu.c
@@ -184,7 +184,7 @@ static int init_runlist(struct gk20a *g, struct fifo_gk20a *f)
184{ 184{
185 struct fifo_runlist_info_gk20a *runlist; 185 struct fifo_runlist_info_gk20a *runlist;
186 struct device *d = dev_from_gk20a(g); 186 struct device *d = dev_from_gk20a(g);
187 s32 runlist_id = -1; 187 unsigned int runlist_id = -1;
188 u32 i; 188 u32 i;
189 u64 runlist_size; 189 u64 runlist_size;
190 190
@@ -238,7 +238,8 @@ static int vgpu_init_fifo_setup_sw(struct gk20a *g)
238 struct fifo_gk20a *f = &g->fifo; 238 struct fifo_gk20a *f = &g->fifo;
239 struct device *d = dev_from_gk20a(g); 239 struct device *d = dev_from_gk20a(g);
240 struct vgpu_priv_data *priv = vgpu_get_priv_data(g); 240 struct vgpu_priv_data *priv = vgpu_get_priv_data(g);
241 int chid, err = 0; 241 unsigned int chid;
242 int err = 0;
242 243
243 gk20a_dbg_fn(""); 244 gk20a_dbg_fn("");
244 245
@@ -486,7 +487,7 @@ static int vgpu_fifo_update_runlist_locked(struct gk20a *g, u32 runlist_id,
486 487
487 /* valid channel, add/remove it from active list. 488 /* valid channel, add/remove it from active list.
488 Otherwise, keep active list untouched for suspend/resume. */ 489 Otherwise, keep active list untouched for suspend/resume. */
489 if (hw_chid != ~0) { 490 if (hw_chid != (u32)~0) {
490 if (add) { 491 if (add) {
491 if (test_and_set_bit(hw_chid, 492 if (test_and_set_bit(hw_chid,
492 runlist->active_channels) == 1) 493 runlist->active_channels) == 1)
@@ -498,7 +499,7 @@ static int vgpu_fifo_update_runlist_locked(struct gk20a *g, u32 runlist_id,
498 } 499 }
499 } 500 }
500 501
501 if (hw_chid != ~0 || /* add/remove a valid channel */ 502 if (hw_chid != (u32)~0 || /* add/remove a valid channel */
502 add /* resume to add all channels back */) { 503 add /* resume to add all channels back */) {
503 u32 chid; 504 u32 chid;
504 505