ANDROID: sched: pelt: Fix the PELT arrays

Commit 8d420888a4 ("ANDROID: sched: Add PELT cmdline arg") removed the
'__maybe_unused' and 'const' qualifiers from the declaration of the PELT
arrays for no apparent reason.

Re-introduce both of them to silence the 'Maybe unused' warnings and
align as much as possible with upstream.

Bug: 177593580
Fixes: 8d420888a4 ("ANDROID: sched: Add PELT cmdline arg")
Signed-off-by: Quentin Perret <qperret@google.com>
Change-Id: I5416726a285eff881ba7bc5188f8a69ee40b1f99
This commit is contained in:
Quentin Perret 2021-03-03 17:11:19 +00:00
parent 0fc8633bd6
commit 9e07b3467a
2 changed files with 4 additions and 4 deletions

View File

@ -30,7 +30,7 @@
int pelt_load_avg_period = PELT32_LOAD_AVG_PERIOD;
int pelt_load_avg_max = PELT32_LOAD_AVG_MAX;
u32 *pelt_runnable_avg_yN_inv = pelt32_runnable_avg_yN_inv;
const u32 *pelt_runnable_avg_yN_inv = pelt32_runnable_avg_yN_inv;
static int __init set_pelt(char *str)
{

View File

@ -1,7 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0 */
/* Generated by Documentation/scheduler/sched-pelt; do not modify. */
static u32 pelt32_runnable_avg_yN_inv[] = {
static const u32 pelt32_runnable_avg_yN_inv[] __maybe_unused = {
0xffffffff, 0xfa83b2da, 0xf5257d14, 0xefe4b99a, 0xeac0c6e6, 0xe5b906e6,
0xe0ccdeeb, 0xdbfbb796, 0xd744fcc9, 0xd2a81d91, 0xce248c14, 0xc9b9bd85,
0xc5672a10, 0xc12c4cc9, 0xbd08a39e, 0xb8fbaf46, 0xb504f333, 0xb123f581,
@ -13,7 +13,7 @@ static u32 pelt32_runnable_avg_yN_inv[] = {
#define PELT32_LOAD_AVG_PERIOD 32
#define PELT32_LOAD_AVG_MAX 47742
static u32 pelt8_runnable_avg_yN_inv[] = {
static const u32 pelt8_runnable_avg_yN_inv[] __maybe_unused = {
0xffffffff, 0xeac0c6e6, 0xd744fcc9, 0xc5672a10,
0xb504f333, 0xa5fed6a9, 0x9837f050, 0x8b95c1e3,
};
@ -21,7 +21,7 @@ static u32 pelt8_runnable_avg_yN_inv[] = {
#define PELT8_LOAD_AVG_PERIOD 8
#define PELT8_LOAD_AVG_MAX 12336
extern u32 *pelt_runnable_avg_yN_inv;
extern const u32 *pelt_runnable_avg_yN_inv;
extern int pelt_load_avg_period;
extern int pelt_load_avg_max;