]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit82b90f3b3b12c5d626e41b5f11e0512adbbb6fcf
treea6bbb7e9893dc54edcf445c5a2fc75d5e27b2550
parent2c148fd6711e1b1a3585c5193e8347c3b0da16ec
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