summaryrefslogtreecommitdiff
path: root/firmware/target/hosted/cpufreq-linux.c
diff options
context:
space:
mode:
authorWilliam Wilgus <me.theuser@yahoo.com>2018-12-06 22:33:30 -0600
committerWilliam Wilgus <me.theuser@yahoo.com>2019-07-10 07:09:00 +0200
commit5264a6eac109b83b799dc45c7cc99729090075b6 (patch)
treefa3e5b2c274da3ab4eb118173f12b2feebc6ffe1 /firmware/target/hosted/cpufreq-linux.c
parentcf6584a483786992eb919b93eed0653f28208f9e (diff)
Fix Truncation warning cpufreq-linux.c->cpufreq_available_governors
limit cpu identifer to 0xFFFF Change-Id: I6fb170aa7ce32b7b5c0366bbd689878bb5069be8
Diffstat (limited to 'firmware/target/hosted/cpufreq-linux.c')
-rw-r--r--firmware/target/hosted/cpufreq-linux.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/firmware/target/hosted/cpufreq-linux.c b/firmware/target/hosted/cpufreq-linux.c
index 55a0bf3292..d622cf1d74 100644
--- a/firmware/target/hosted/cpufreq-linux.c
+++ b/firmware/target/hosted/cpufreq-linux.c
@@ -60,7 +60,7 @@ void cpufreq_available_governors(char* governors, int governors_size, int cpu)
snprintf(available_governors_interface,
sizeof(available_governors_interface),
"/sys/devices/system/cpu/cpu%d/cpufreq/scaling_available_governors",
- cpu);
+ cpu & 0xFFFF);
FILE *f = open_read(available_governors_interface);
if(f == NULL)