From 82f7cba8a633a1189ac837f961ec0c374a741dbb Mon Sep 17 00:00:00 2001 From: Harshdeep Dhatt Date: Tue, 9 Jul 2019 02:09:58 -0600 Subject: [PATCH] devfreq: Fix signedness of percentages array It is possible that this array may contain a negative value and if so, it is corrected using bounds checking. However, bounds are not properly applied because the negative value is seen as a very high unsigned integer. Change-Id: I546d1ecacace185427d6fbf78e95bf8cb67f92c9 Signed-off-by: Harshdeep Dhatt --- include/linux/msm_adreno_devfreq.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/linux/msm_adreno_devfreq.h b/include/linux/msm_adreno_devfreq.h index 0552599c9e08..af26a0b09621 100644 --- a/include/linux/msm_adreno_devfreq.h +++ b/include/linux/msm_adreno_devfreq.h @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0 */ /* - * Copyright (c) 2016-2017, The Linux Foundation. All rights reserved. + * Copyright (c) 2016-2019, The Linux Foundation. All rights reserved. */ #ifndef MSM_ADRENO_DEVFREQ_H @@ -52,8 +52,8 @@ struct devfreq_msm_adreno_tz_data { u32 width; u32 *up; u32 *down; - u32 *p_up; - u32 *p_down; + s32 *p_up; + s32 *p_down; unsigned int *index; uint64_t *ib; } bus;