summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDeepak Nibade <dnibade@nvidia.com>2017-12-06 08:24:27 -0500
committermobile promotions <svcmobile_promotions@nvidia.com>2017-12-08 14:58:22 -0500
commitf3dcf5f534696dc6dbd63486469fbae7bdcae23f (patch)
treed1864d0924091ab5cfc192fb7a9a1ecdbfc67dd9
parentac78f5d95eeed84880432ee0428bfa49e6fbb0d7 (diff)
gpu: nvgpu: fix int declaration
variable g->gr.ctx_vars.regs_base_index is declared as "int", but it is assigned value from unsigned int pointer Since we expect it to be unsigned at all the places, declare it as "u32" instead of "int" Jira NVGPU-449 Change-Id: I2a5b35698c655fa0caa3e38e37ed4d84569c996a Signed-off-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1612446 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Konsta Holtta <kholtta@nvidia.com> Reviewed-by: Alex Waterman <alexw@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
-rw-r--r--drivers/gpu/nvgpu/gk20a/gr_ctx_gk20a.c2
-rw-r--r--drivers/gpu/nvgpu/gk20a/gr_gk20a.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gr_ctx_gk20a.c b/drivers/gpu/nvgpu/gk20a/gr_ctx_gk20a.c
index 3d7861d4..7120059c 100644
--- a/drivers/gpu/nvgpu/gk20a/gr_ctx_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/gr_ctx_gk20a.c
@@ -241,7 +241,7 @@ static int gr_gk20a_init_ctx_vars_fw(struct gk20a *g, struct gr_gk20a *gr)
241 break; 241 break;
242 case NETLIST_REGIONID_CTXSW_REG_BASE_INDEX: 242 case NETLIST_REGIONID_CTXSW_REG_BASE_INDEX:
243 g->gr.ctx_vars.regs_base_index = *src; 243 g->gr.ctx_vars.regs_base_index = *src;
244 gk20a_dbg_info("NETLIST_REGIONID_CTXSW_REG_BASE_INDEX : %d", 244 gk20a_dbg_info("NETLIST_REGIONID_CTXSW_REG_BASE_INDEX : %u",
245 g->gr.ctx_vars.regs_base_index); 245 g->gr.ctx_vars.regs_base_index);
246 break; 246 break;
247 case NETLIST_REGIONID_MAJORV: 247 case NETLIST_REGIONID_MAJORV:
diff --git a/drivers/gpu/nvgpu/gk20a/gr_gk20a.h b/drivers/gpu/nvgpu/gk20a/gr_gk20a.h
index 14668dc6..c4d5dbdc 100644
--- a/drivers/gpu/nvgpu/gk20a/gr_gk20a.h
+++ b/drivers/gpu/nvgpu/gk20a/gr_gk20a.h
@@ -311,7 +311,7 @@ struct gr_gk20a {
311 struct aiv_list_gk20a pm_ucgpc; 311 struct aiv_list_gk20a pm_ucgpc;
312 struct aiv_list_gk20a etpc; 312 struct aiv_list_gk20a etpc;
313 } ctxsw_regs; 313 } ctxsw_regs;
314 int regs_base_index; 314 u32 regs_base_index;
315 bool valid; 315 bool valid;
316 316
317 u32 preempt_image_size; 317 u32 preempt_image_size;