hw_breakpoint: Simplify *register_wide_hw_breakpoint()
commite12cbc10cb27fcbe51b5f68e2015138dc451a2eb
authorOleg Nesterov <oleg@redhat.com>
Thu, 20 Jun 2013 15:50:18 +0000 (20 17:50 +0200)
committerIngo Molnar <mingo@kernel.org>
Thu, 20 Jun 2013 15:58:57 +0000 (20 17:58 +0200)
tree2c54ecd8253ead14a2ee63864b3a2a64a6e7cf69
parent1c10adbb929936316f71df089ace699fce037e24
hw_breakpoint: Simplify *register_wide_hw_breakpoint()

1. register_wide_hw_breakpoint() can use unregister_ if failure,
   no need to duplicate the code.

2. "struct perf_event **pevent" adds the unnecesary lever of
   indirection and complication, use per_cpu(*cpu_events, cpu).

Reported-by: Vince Weaver <vincent.weaver@maine.edu>
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Acked-by: Frederic Weisbecker <fweisbec@gmail.com>
Link: http://lkml.kernel.org/r/20130620155018.GA6347@redhat.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
kernel/events/hw_breakpoint.c