mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 10:34:43 +03:00
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 <tbergstrom@nvidia.com> Reviewed-on: http://git-master/r/1252069 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
Deepak Nibade
parent
6579c1ec6f
commit
d8da1d6438
@@ -2347,7 +2347,7 @@ int clk_mclkseq_change_mclk_gddr5(struct gk20a *g, enum gk20a_mclk_speed speed)
|
||||
mclk->switch_std = 0;
|
||||
} else {
|
||||
s64 prev_avg;
|
||||
u64 curr = (t1-t0)/1000;
|
||||
s64 curr = (t1-t0)/1000;
|
||||
|
||||
mclk->switch_max = curr > mclk->switch_max ?
|
||||
curr : mclk->switch_max;
|
||||
|
||||
@@ -195,7 +195,7 @@ static int clk_gp106_debugfs_init(struct gk20a *g) {
|
||||
struct dentry *gpu_root = platform->debugfs;
|
||||
struct dentry *clocks_root;
|
||||
struct dentry *d;
|
||||
int i;
|
||||
unsigned int i;
|
||||
|
||||
if (NULL == (clocks_root = debugfs_create_dir("clocks", gpu_root)))
|
||||
return -ENOMEM;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user