powerpc/selftests/perf-hwbreak: Coalesce event creation code

perf-hwbreak selftest opens hw-breakpoint event at multiple places for
which it has same code repeated. Coalesce that code into a function.

Signed-off-by: Ravi Bangoria <ravi.bangoria@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20210412112218.128183-3-ravi.bangoria@linux.ibm.com
This commit is contained in:
Ravi Bangoria 2021-04-12 16:52:16 +05:30 • committed by Michael Ellerman
commit c9cb0afb4e