cs-etm: avoid casting variable
authorMathieu Poirier <mathieu.poirier@linaro.org>
Mon, 16 May 2016 22:55:55 +0000 (16:55 -0600)
committerMathieu Poirier <mathieu.poirier@linaro.org>
Mon, 20 Jun 2016 17:16:07 +0000 (11:16 -0600)
commitc14318faac87ba59c2ec8279e6328c774af3b723
treeec304711315ffeebea9ca7d2e37a16cca2a35077
parent0951a97ed934668b87371c2d3d0c3d21659da4df
cs-etm: avoid casting variable

Because of two's complement reprensentation, casting an int to
and unsigned value doesn't simply get rid of the negative sign.
As such a value of -1 becomes 0xFFFFFFFF, which is clearly not
the desired effect.

This patch deals with cases when @cpu has the value of -1.  In
those cases queue '0' is initially selected.

Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
tools/perf/util/cs-etm.c