From: Mark Rutland Date: Fri, 18 Jan 2013 13:42:59 +0000 (+0000) Subject: ARM: perf: remove unnecessary checks for idx < 0 X-Git-Tag: v3.9-rc1~115^2~11^2~1 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8f3b90b585d3e879b03ce2a202da04d59dd5b699;p=pandora-kernel.git ARM: perf: remove unnecessary checks for idx < 0 We currently check for hwx->idx < 0 in armpmu_read and armpmu_del unnecessarily. The only case where hwc->idx < 0 is when armpmu_add fails, in which case the event's state is set to PERF_EVENT_STATE_INACTIVE. The perf core will not attempt to read from an event in PERF_EVENT_STATE_INACTIVE, and so the check in armpmu_read is unnecessary. Similarly, if perf core cannot add an event it will not attempt to delete it, so the WARN_ON in armpmu_del is unnecessary. This patch removes these two redundant checks. Signed-off-by: Mark Rutland Signed-off-by: Will Deacon --- Reading git-diff-tree failed