Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

PCI: hv: Switch hv_compose_multi_msi_req_get_cpu() to using cpumask_next_wrap()

Calling cpumask_next_wrap_old() with starting CPU == nr_cpu_ids
is effectively the same as request to find first CPU, starting
from a given one and wrapping around if needed.

cpumask_next_wrap() is a proper replacement for that.

Acked-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Michael Kelley <mhklinux@outlook.com>
Signed-off-by: Yury Norov <yury.norov@gmail.com>

+1 -2
+1 -2
drivers/pci/controller/pci-hyperv.c
··· 1757 1757 1758 1758 spin_lock_irqsave(&multi_msi_cpu_lock, flags); 1759 1759 1760 - cpu_next = cpumask_next_wrap_old(cpu_next, cpu_online_mask, nr_cpu_ids, 1761 - false); 1760 + cpu_next = cpumask_next_wrap(cpu_next, cpu_online_mask); 1762 1761 cpu = cpu_next; 1763 1762 1764 1763 spin_unlock_irqrestore(&multi_msi_cpu_lock, flags);