From 695d0dc505c853166794784206b83647157755bb Mon Sep 17 00:00:00 2001 From: Deepak Kumar Date: Thu, 11 Feb 2021 14:30:55 +0530 Subject: msm: kgsl: Change start variable type to int in kgsl_iommu_add_global Variable start should be of type int instead of u32. Correct this to ensure while loop can exit and WARN_ON statement is effective in case global VA space doesn't have enough space for current request. Change-Id: I0bc817abc9a16934b5c91fc31ba9c6dff3545c90 Signed-off-by: Deepak Kumar Signed-off-by: Pranav Patel --- drivers/gpu/msm/kgsl_iommu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/gpu/msm/kgsl_iommu.c b/drivers/gpu/msm/kgsl_iommu.c index 08f5c6d9d50b..98537730cbc9 100644 --- a/drivers/gpu/msm/kgsl_iommu.c +++ b/drivers/gpu/msm/kgsl_iommu.c @@ -199,8 +199,9 @@ static void kgsl_iommu_remove_global(struct kgsl_mmu *mmu, static void kgsl_iommu_add_global(struct kgsl_mmu *mmu, struct kgsl_memdesc *memdesc, const char *name) { - u32 bit, start = 0; + u32 bit; u64 size = kgsl_memdesc_footprint(memdesc); + int start = 0; if (memdesc->gpuaddr != 0) return; -- cgit v1.2.3