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 <hdhatt@codeaurora.org>
This commit is contained in:
Harshdeep Dhatt 2019-07-09 02:09:58 -06:00
parent 7eaf07a05c
commit 82f7cba8a6

View file

@ -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;