Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3e615c42 authored by Deepak Kumar's avatar Deepak Kumar
Browse files

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: default avatarDeepak Kumar <dkumar@codeaurora.org>
parent 7842578e
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (c) 2011-2020, The Linux Foundation. All rights reserved.
 * Copyright (c) 2011-2021, The Linux Foundation. All rights reserved.
 */

#include <linux/compat.h>
@@ -210,8 +210,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;