summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorDeepak Nibade <dnibade@nvidia.com>2017-12-06 07:57:00 -0500
committermobile promotions <svcmobile_promotions@nvidia.com>2017-12-08 14:58:15 -0500
commit9f404b811c8b1e8a5b7bf0eb6346d424bae31576 (patch)
tree90258421cc35bd6f75dd492d6bbe43174de27d35 /drivers
parent8b5339319282fc1e6c23ea106a48a2ca3b14d3e0 (diff)
gpu: nvgpu: fix unsigned int declaration
In gr_gk20a_init_access_map(), we declare num_entries as "unsigned int" But this variable is implicitly type casted into "int" while calling subsequent functions Hence explicitly declare it as type "int" Also declare variable "w" as "int" too since we use it to compare against num_entries Jira NVGPU-446 Change-Id: I289da6951db0a9ed6b8d6bcb3ee4f6071a4ddaf0 Signed-off-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1612444 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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/nvgpu/gk20a/gr_gk20a.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
index 3b888559..ad9ecdfa 100644
--- a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
@@ -4752,11 +4752,11 @@ static int gr_gk20a_init_access_map(struct gk20a *g)
4752{ 4752{
4753 struct gr_gk20a *gr = &g->gr; 4753 struct gr_gk20a *gr = &g->gr;
4754 struct nvgpu_mem *mem = &gr->global_ctx_buffer[PRIV_ACCESS_MAP].mem; 4754 struct nvgpu_mem *mem = &gr->global_ctx_buffer[PRIV_ACCESS_MAP].mem;
4755 u32 w, nr_pages = 4755 u32 nr_pages =
4756 DIV_ROUND_UP(gr->ctx_vars.priv_access_map_size, 4756 DIV_ROUND_UP(gr->ctx_vars.priv_access_map_size,
4757 PAGE_SIZE); 4757 PAGE_SIZE);
4758 u32 *whitelist = NULL; 4758 u32 *whitelist = NULL;
4759 unsigned int num_entries = 0; 4759 int w, num_entries = 0;
4760 4760
4761 if (nvgpu_mem_begin(g, mem)) { 4761 if (nvgpu_mem_begin(g, mem)) {
4762 nvgpu_err(g, 4762 nvgpu_err(g,