coresight: tmc: Refactor loops in etb dump
authorLeo Yan <leo.yan@linaro.org>
Thu, 20 Sep 2018 19:18:01 +0000 (13:18 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 25 Sep 2018 18:09:18 +0000 (20:09 +0200)
commitb3bee19e93e7fe9df01e0a90cec025781b638ad4
treee46ea585b51020a293e848a0cf2287e47a64aa01
parentb860801e3237ec4c74cf8de0be4816996757ae5c
coresight: tmc: Refactor loops in etb dump

In ETB dump function tmc_etb_dump_hw() it has nested loops.  The second
level loop is to iterate index in the range [0 .. drvdata->memwidth);
but the index isn't really used in the code, thus the second level
loop is useless.

This patch is to remove the second level loop; the refactor also reduces
indentation and we can use 'break' to replace 'goto' tag.

Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
Signed-off-by: Leo Yan <leo.yan@linaro.org>
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/hwtracing/coresight/coresight-tmc-etf.c