summaryrefslogtreecommitdiff
path: root/include/common.h
diff options
context:
space:
mode:
authorMichal Simek <michal.simek@xilinx.com>2018-06-13 09:56:31 +0300
committerTom Rini <trini@konsulko.com>2018-06-19 14:31:45 +0300
commit20b016a33665f7b3ff875b4b7063180eb955f092 (patch)
treee2b5bc68ecd9b0da8cba3122a9ab9f5b6f0129f6 /include/common.h
parent487b5fa6deb1f02843dbc9a9ac792bb38ef4d52a (diff)
downloadu-boot-20b016a33665f7b3ff875b4b7063180eb955f092.tar.xz
common: Fix cpu nr type which is always unsigned type
cpu_cmd() is reading cpu number via simple_strtoul() which is always unsigned type. Platform code implementations are not expecting that nr can be negative and there is not checking in the code for that too. This patch is using u32 type for cpu number to make sure that platform code get proper value range. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Diffstat (limited to 'include/common.h')
-rw-r--r--include/common.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/include/common.h b/include/common.h
index 60c79137e2..940161f175 100644
--- a/include/common.h
+++ b/include/common.h
@@ -536,10 +536,10 @@ void show_activity(int arg);
/* Multicore arch functions */
#ifdef CONFIG_MP
-int cpu_status(int nr);
-int cpu_reset(int nr);
-int cpu_disable(int nr);
-int cpu_release(int nr, int argc, char * const argv[]);
+int cpu_status(u32 nr);
+int cpu_reset(u32 nr);
+int cpu_disable(u32 nr);
+int cpu_release(u32 nr, int argc, char * const argv[]);
#endif
#else /* __ASSEMBLY__ */