]> git.sur5r.net Git - u-boot/commit
common: Fix cpu nr type which is always unsigned type
authorMichal Simek <michal.simek@xilinx.com>
Wed, 13 Jun 2018 06:56:31 +0000 (08:56 +0200)
committerTom Rini <trini@konsulko.com>
Tue, 19 Jun 2018 11:31:45 +0000 (07:31 -0400)
commit20b016a33665f7b3ff875b4b7063180eb955f092
treee2b5bc68ecd9b0da8cba3122a9ab9f5b6f0129f6
parent487b5fa6deb1f02843dbc9a9ac792bb38ef4d52a
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>
arch/arm/cpu/armv8/fsl-layerscape/mp.c
arch/arm/cpu/armv8/zynqmp/mp.c
arch/arm/mach-imx/mx6/mp.c
arch/powerpc/cpu/mpc85xx/mp.c
arch/powerpc/cpu/mpc86xx/mp.c
include/common.h