On Fri, Aug 8, 2014 at 7:05 AM, Lisa Nguyen lisa.nguyen@linaro.org wrote:
Create a global variable that will look for number of cpus for a platform and use it in multiple functions to make the code simplier to read.
Agree with the patch.
Signed-off-by: Lisa Nguyen lisa.nguyen@linaro.org
diff --git a/cpuhotplug/cpuhotplug_sanity.sh b/cpuhotplug/cpuhotplug_sanity.sh index d9b6af8..2ad24ff 100755 --- a/cpuhotplug/cpuhotplug_sanity.sh +++ b/cpuhotplug/cpuhotplug_sanity.sh @@ -33,7 +33,6 @@ fi
check_cpuhotplug_sysfs_entry() {
cpus=$(ls $CPU_PATH | grep "cpu[0-9].*") cpunum=$(ls $CPU_PATH | grep "cpu[0-9].*" -c)
if [ $cpunum -eq 1 ]; then
diff --git a/include/functions.sh b/include/functions.sh index e0f08fb..74b2294 100644 --- a/include/functions.sh +++ b/include/functions.sh @@ -30,6 +30,7 @@ TEST_NAME=$(basename ${0%.sh}) PREFIX=$TEST_NAME INC=0 CPU= +cpus=$(ls $CPU_PATH | grep "cpu[0-9].*")
Let's fix this properly while we're at it. We already have boards with more than 10 cpus now - D01.
Regards, Amit