From d8da1d64381bb1265e194d81cb02673efa6ca54c Mon Sep 17 00:00:00 2001 From: Terje Bergstrom Date: Wed, 9 Nov 2016 15:54:27 -0800 Subject: 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: Ib7026728ef0e8c3c9e68956fc9794ec3a786a8a2 Signed-off-by: Terje Bergstrom Reviewed-on: http://git-master/r/1252069 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/gp10b/fb_gp10b.c | 4 ++-- drivers/gpu/nvgpu/gp10b/ltc_gp10b.c | 2 +- drivers/gpu/nvgpu/gp10b/platform_gp10b_tegra.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'drivers/gpu/nvgpu/gp10b') diff --git a/drivers/gpu/nvgpu/gp10b/fb_gp10b.c b/drivers/gpu/nvgpu/gp10b/fb_gp10b.c index 9c0bc992..5324b5ef 100644 --- a/drivers/gpu/nvgpu/gp10b/fb_gp10b.c +++ b/drivers/gpu/nvgpu/gp10b/fb_gp10b.c @@ -87,12 +87,12 @@ static void gp10b_init_kind_attr(void) } } -static int gp10b_fb_compression_page_size(struct gk20a *g) +static unsigned int gp10b_fb_compression_page_size(struct gk20a *g) { return SZ_64K; } -static int gp10b_fb_compressible_page_size(struct gk20a *g) +static unsigned int gp10b_fb_compressible_page_size(struct gk20a *g) { return SZ_4K; } diff --git a/drivers/gpu/nvgpu/gp10b/ltc_gp10b.c b/drivers/gpu/nvgpu/gp10b/ltc_gp10b.c index 3e64d435..31c79aff 100644 --- a/drivers/gpu/nvgpu/gp10b/ltc_gp10b.c +++ b/drivers/gpu/nvgpu/gp10b/ltc_gp10b.c @@ -124,7 +124,7 @@ static int gp10b_ltc_init_comptags(struct gk20a *g, struct gr_gk20a *gr) static void gp10b_ltc_isr(struct gk20a *g) { u32 mc_intr, ltc_intr; - int ltc, slice; + unsigned int ltc, slice; u32 ltc_stride = nvgpu_get_litter_value(g, GPU_LIT_LTC_STRIDE); u32 lts_stride = nvgpu_get_litter_value(g, GPU_LIT_LTS_STRIDE); diff --git a/drivers/gpu/nvgpu/gp10b/platform_gp10b_tegra.c b/drivers/gpu/nvgpu/gp10b/platform_gp10b_tegra.c index db4f14dd..8cf6d5e8 100644 --- a/drivers/gpu/nvgpu/gp10b/platform_gp10b_tegra.c +++ b/drivers/gpu/nvgpu/gp10b/platform_gp10b_tegra.c @@ -62,7 +62,7 @@ static void gr_gp10b_remove_sysfs(struct device *dev); static int gp10b_tegra_get_clocks(struct device *dev) { struct gk20a_platform *platform = dev_get_drvdata(dev); - int i; + unsigned int i; if (platform->is_fmodel) return 0; -- cgit v1.2.2