summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/fifo_gk20a.h
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/gk20a/fifo_gk20a.h
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/gk20a/fifo_gk20a.h')
-rw-r--r--drivers/gpu/nvgpu/gk20a/fifo_gk20a.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.h b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.h
index 64bdeabb..c32142e3 100644
--- a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.h
+++ b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.h
@@ -26,7 +26,9 @@
26 26
27#define MAX_RUNLIST_BUFFERS 2 27#define MAX_RUNLIST_BUFFERS 2
28 28
29#define FIFO_INVAL_ENGINE_ID ~0 29#define FIFO_INVAL_ENGINE_ID ((u32)~0)
30#define FIFO_INVAL_CHANNEL_ID ((u32)~0)
31#define FIFO_INVAL_TSG_ID ((u32)~0)
30 32
31/* generally corresponds to the "pbdma" engine */ 33/* generally corresponds to the "pbdma" engine */
32 34
@@ -96,11 +98,11 @@ struct fifo_engine_info_gk20a {
96 98
97struct fifo_gk20a { 99struct fifo_gk20a {
98 struct gk20a *g; 100 struct gk20a *g;
99 int num_channels; 101 unsigned int num_channels;
100 int runlist_entry_size; 102 unsigned int runlist_entry_size;
101 int num_runlist_entries; 103 unsigned int num_runlist_entries;
102 104
103 int num_pbdma; 105 unsigned int num_pbdma;
104 u32 *pbdma_map; 106 u32 *pbdma_map;
105 107
106 struct fifo_engine_info_gk20a *engine_info; 108 struct fifo_engine_info_gk20a *engine_info;
@@ -114,7 +116,7 @@ struct fifo_gk20a {
114 struct mem_desc userd; 116 struct mem_desc userd;
115 u32 userd_entry_size; 117 u32 userd_entry_size;
116 118
117 int used_channels; 119 unsigned int used_channels;
118 struct channel_gk20a *channel; 120 struct channel_gk20a *channel;
119 /* zero-kref'd channels here */ 121 /* zero-kref'd channels here */
120 struct list_head free_chs; 122 struct list_head free_chs;