OSDN Git Service

sparc64: Rework sparc_pmu_enable() so that the side effects are clearer.
authorDavid S. Miller <davem@davemloft.net>
Fri, 17 Aug 2012 10:09:39 +0000 (03:09 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sun, 19 Aug 2012 06:26:20 +0000 (23:26 -0700)
commit5ab968413515e17788003c522f7ca40a07fae900
tree8af29c455d3469ea6af3086a303962f92c65ef1f
parent3f1a20972239e3f66720c34d9009ae9cc9ddffba
sparc64: Rework sparc_pmu_enable() so that the side effects are clearer.

When cpuc->n_events is zero, we actually don't do anything and we just
write the cpuc->pcr[0] value as-is without any modifications.

The "pcr = 0;" assignment there was just useless and confusing.

Signed-off-by: David S. Miller <davem@davemloft.net>
arch/sparc/kernel/perf_event.c