diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2015-03-05 01:18:49 +0100 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2015-03-05 04:07:01 +0100 |
commit | 51f7bd8590267011db7b632f53f3d32ec83ee8bb (patch) | |
tree | 6d97b272d5c809451938c520eba46e418346e5f0 /arch/ia64/kernel/msi_ia64.c | |
parent | cpumask: fix cpu-hotplug documentation (diff) | |
download | linux-51f7bd8590267011db7b632f53f3d32ec83ee8bb.tar.xz linux-51f7bd8590267011db7b632f53f3d32ec83ee8bb.zip |
ia64: Use for_each_cpu_and() and cpumask_any_and() instead of temp var.
Just a bit of manual neatening, before spatch cleans the rest.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Cc: linux-ia64@vger.kernel.org
Diffstat (limited to '')
-rw-r--r-- | arch/ia64/kernel/msi_ia64.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/arch/ia64/kernel/msi_ia64.c b/arch/ia64/kernel/msi_ia64.c index 8ae36ea177d3..9dd7464f8c17 100644 --- a/arch/ia64/kernel/msi_ia64.c +++ b/arch/ia64/kernel/msi_ia64.c @@ -47,15 +47,14 @@ int ia64_setup_msi_irq(struct pci_dev *pdev, struct msi_desc *desc) struct msi_msg msg; unsigned long dest_phys_id; int irq, vector; - cpumask_t mask; irq = create_irq(); if (irq < 0) return irq; irq_set_msi_desc(irq, desc); - cpumask_and(&mask, &(irq_to_domain(irq)), cpu_online_mask); - dest_phys_id = cpu_physical_id(first_cpu(mask)); + dest_phys_id = cpu_physical_id(cpumask_any_and(&(irq_to_domain(irq)), + cpu_online_mask)); vector = irq_to_vector(irq); msg.address_hi = 0; @@ -171,10 +170,9 @@ msi_compose_msg(struct pci_dev *pdev, unsigned int irq, struct msi_msg *msg) { struct irq_cfg *cfg = irq_cfg + irq; unsigned dest; - cpumask_t mask; - cpumask_and(&mask, &(irq_to_domain(irq)), cpu_online_mask); - dest = cpu_physical_id(first_cpu(mask)); + dest = cpu_physical_id(cpumask_first_and(&(irq_to_domain(irq)), + cpu_online_mask)); msg->address_hi = 0; msg->address_lo = |