From: David Ahern Date: Wed, 18 Feb 2015 23:59:31 +0000 (-0500) Subject: perf tools: Compare JOBS to 0 after grep X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=c65568c5456e5216e5467e81d1e04c1f5bdd453f;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git perf tools: Compare JOBS to 0 after grep If JOBS is not by user perf tries to autodetect the number by grepping the number of CPUs from /proc/cpuinfo. 'grep -c' will always return an integer so after this command JOBS should be compared to 0, not "". Signed-off-by: David Ahern Link: http://lkml.kernel.org/r/1424303971-91904-1-git-send-email-david.ahern@oracle.com Signed-off-by: Arnaldo Carvalho de Melo --- diff --git a/tools/perf/Makefile b/tools/perf/Makefile index cb2e5868c8e8..d5020aeb5626 100644 --- a/tools/perf/Makefile +++ b/tools/perf/Makefile @@ -25,7 +25,7 @@ unexport MAKEFLAGS # ifeq ($(JOBS),) JOBS := $(shell grep -c ^processor /proc/cpuinfo 2>/dev/null) - ifeq ($(JOBS),) + ifeq ($(JOBS),0) JOBS := 1 endif endif