hw_breakpoint: Simplify the "weight" usage in toggle_bp_slot() paths
authorOleg Nesterov <oleg@redhat.com>
Thu, 20 Jun 2013 15:50:13 +0000 (17:50 +0200)
committerIngo Molnar <mingo@kernel.org>
Thu, 20 Jun 2013 15:58:55 +0000 (17:58 +0200)
commit7ab71f3244e9f970c29566c5a67e13d1fa38c387
treea6bbb7e9893dc54edcf445c5a2fc75d5e27b2550
parente1ebe86203e6532eb5a0ae8f26ccae47aca548ae
hw_breakpoint: Simplify the "weight" usage in toggle_bp_slot() paths

Change toggle_bp_slot() to make "weight" negative if !enable.
This way we can always use "+ weight" without additional "if
(enable)" check and toggle_bp_task_slot() no longer needs this
arg.

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/20130620155013.GA6337@redhat.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
kernel/events/hw_breakpoint.c