coresight: etb10: adjust read pointer only when needed
authorMathieu Poirier <mathieu.poirier@linaro.org>
Tue, 3 May 2016 17:34:01 +0000 (11:34 -0600)
committerMathieu Poirier <mathieu.poirier@linaro.org>
Wed, 1 Jun 2016 21:46:44 +0000 (15:46 -0600)
commit4a192f60855a84820d361ec58eda0d043faab6f6
tree96b6c286585ee79facdffd435fbbdf6fe746568a
parent6d1fcd0f0e7b17b4c9e4eaf0a61072b467110692
coresight: etb10: adjust read pointer only when needed

The read pointer (read_ptr) needs to be adjusted only if its value
has gone beyond the length of the memory buffer.

Reported-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit bedffda8cad46bedb6880bb98c23c51c715216c3)
drivers/hwtracing/coresight/coresight-etb10.c