diff options
author | Terje Bergstrom <tbergstrom@nvidia.com> | 2016-11-09 18:53:16 -0500 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2016-11-17 00:35:36 -0500 |
commit | d29afd2c9e990799b470bb95a97935cf5b5020db (patch) | |
tree | 48f14dffe90956e9b42b02a87b95fd7a1dfeef3e /drivers/gpu/nvgpu/gk20a/pmu_gk20a.c | |
parent | 5494e846c78dd0da74635905ead3abe45502375f (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/gk20a/pmu_gk20a.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/pmu_gk20a.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/pmu_gk20a.c b/drivers/gpu/nvgpu/gk20a/pmu_gk20a.c index bfa3902e..193938ba 100644 --- a/drivers/gpu/nvgpu/gk20a/pmu_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/pmu_gk20a.c | |||
@@ -2709,7 +2709,7 @@ static bool pmu_queue_has_room(struct pmu_gk20a *pmu, | |||
2709 | { | 2709 | { |
2710 | u32 head, tail; | 2710 | u32 head, tail; |
2711 | bool rewind = false; | 2711 | bool rewind = false; |
2712 | int free; | 2712 | unsigned int free; |
2713 | 2713 | ||
2714 | size = ALIGN(size, QUEUE_ALIGNMENT); | 2714 | size = ALIGN(size, QUEUE_ALIGNMENT); |
2715 | 2715 | ||
@@ -2955,7 +2955,8 @@ static int gk20a_init_pmu_setup_sw(struct gk20a *g) | |||
2955 | struct mm_gk20a *mm = &g->mm; | 2955 | struct mm_gk20a *mm = &g->mm; |
2956 | struct vm_gk20a *vm = &mm->pmu.vm; | 2956 | struct vm_gk20a *vm = &mm->pmu.vm; |
2957 | struct device *d = dev_from_gk20a(g); | 2957 | struct device *d = dev_from_gk20a(g); |
2958 | int i, err = 0; | 2958 | unsigned int i; |
2959 | int err = 0; | ||
2959 | u8 *ptr; | 2960 | u8 *ptr; |
2960 | 2961 | ||
2961 | gk20a_dbg_fn(""); | 2962 | gk20a_dbg_fn(""); |
@@ -4128,7 +4129,7 @@ static void pmu_dump_elpg_stats(struct pmu_gk20a *pmu) | |||
4128 | void pmu_dump_falcon_stats(struct pmu_gk20a *pmu) | 4129 | void pmu_dump_falcon_stats(struct pmu_gk20a *pmu) |
4129 | { | 4130 | { |
4130 | struct gk20a *g = gk20a_from_pmu(pmu); | 4131 | struct gk20a *g = gk20a_from_pmu(pmu); |
4131 | int i; | 4132 | unsigned int i; |
4132 | 4133 | ||
4133 | gk20a_err(dev_from_gk20a(g), "pwr_falcon_os_r : %d", | 4134 | gk20a_err(dev_from_gk20a(g), "pwr_falcon_os_r : %d", |
4134 | gk20a_readl(g, pwr_falcon_os_r())); | 4135 | gk20a_readl(g, pwr_falcon_os_r())); |