diff options
| author | Michal Simek <[email protected]> | 2018-06-13 08:56:31 +0200 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2018-06-19 07:31:45 -0400 |
| commit | 20b016a33665f7b3ff875b4b7063180eb955f092 (patch) | |
| tree | e2b5bc68ecd9b0da8cba3122a9ab9f5b6f0129f6 /include | |
| parent | 487b5fa6deb1f02843dbc9a9ac792bb38ef4d52a (diff) | |
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 <[email protected]>
Diffstat (limited to 'include')
| -rw-r--r-- | include/common.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/include/common.h b/include/common.h index 60c79137e21..940161f1758 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__ */ |
