Skip to content
Commit aee1bf15 authored by Yury Norov's avatar Yury Norov
Browse files

scsi: lpfc: rework lpfc_next_{online,present}_cpu()



lpfc_next_online_cpu() opencodes cpumask_next_and_wrap() by using
a for-loop. Use it and make the lpfc_next_online_cpu() a plain
one-liner.

While there, rework lpfc_next_present_cpu() similarly. Notice that
cpumask_next() followed by cpumask_first() in the worst case of an
empty mask may traverse the mask twice. Cpumask_next_wrap() takes
care of that correctly.

Reviewed-by: default avatarJustin Tee <justin.tee@broadcom.com>
Signed-off-by: default avatarYury Norov <yury.norov@gmail.com>
parent 6fef7ed1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment