aboutsummaryrefslogtreecommitdiff
path: root/drivers/scsi/mpt2sas/mpi/mpi2_raid.h
diff options
context:
space:
mode:
authorOleg Nesterov <[email protected]>2013-06-20 17:50:11 +0200
committerIngo Molnar <[email protected]>2013-06-20 17:58:55 +0200
commite1ebe86203e6532eb5a0ae8f26ccae47aca548ae (patch)
treedc9464fa0779f4d45d79f360192a8cf533bb90aa /drivers/scsi/mpt2sas/mpi/mpi2_raid.h
parentf070a4dba984975f6353c6f1d966da1a6ce4b86f (diff)
hw_breakpoint: Simplify list/idx mess in toggle_bp_slot() paths
The enable/disable logic in toggle_bp_slot() is not symmetrical and imho very confusing. "old_count" in toggle_bp_task_slot() is actually new_count because this bp was already removed from the list. Change toggle_bp_slot() to always call list_add/list_del after toggle_bp_task_slot(). This way old_idx is task_bp_pinned() and this entry should be decremented, new_idx is +/-weight and we need to increment this element. The code/logic looks obvious. Reported-by: Vince Weaver <[email protected]> Signed-off-by: Oleg Nesterov <[email protected]> Acked-by: Frederic Weisbecker <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
Diffstat (limited to 'drivers/scsi/mpt2sas/mpi/mpi2_raid.h')
0 files changed, 0 insertions, 0 deletions