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:Justin Tee <justin.tee@broadcom.com> Signed-off-by:
Yury Norov <yury.norov@gmail.com>
Loading
Please register or sign in to comment