perf cs-etm: Fix unsigned variable comparison to zero
authorLeo Yan <leo.yan@linaro.org>
Wed, 19 Feb 2020 02:18:11 +0000 (10:18 +0800)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 11 Mar 2020 13:48:44 +0000 (10:48 -0300)
commitbc010dd657ee0309276c88ab828b9ad156f75b31
treed3aa2d46fe0bec23ebeb4a3d201a015c7d3e33c4
parent695378b567df1fe6631c6684fcc9eeb4257df70f
perf cs-etm: Fix unsigned variable comparison to zero

The variable 'offset' in function cs_etm__sample() is u64 type, it's not
appropriate to check it with 'while (offset > 0)'; this patch changes to
'while (offset)'.

Signed-off-by: Leo Yan <leo.yan@linaro.org>
Reviewed-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Reviewed-by: Mike Leach <mike.leach@linaro.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Robert Walker <robert.walker@arm.com>
Cc: Suzuki Poulouse <suzuki.poulose@arm.com>
Cc: coresight ml <coresight@lists.linaro.org>
Cc: linux-arm-kernel@lists.infradead.org
Link: http://lore.kernel.org/lkml/20200219021811.20067-6-leo.yan@linaro.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/cs-etm.c