i40e: use cpumask_copy instead of direct assignment
authorJacob Keller <jacob.e.keller@intel.com>
Wed, 12 Jul 2017 09:46:05 +0000 (05:46 -0400)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Fri, 25 Aug 2017 21:52:42 +0000 (14:52 -0700)
According to the header file cpumask.h, we shouldn't be directly copying
a cpumask_t, since its a bitmap and might not be copied correctly. Lets
use the provided cpumask_copy() function instead.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/i40e/i40e_main.c
drivers/net/ethernet/intel/i40evf/i40evf_main.c

index 1b3b681a8b1d07b1773e6896288bdd0b375e78b1..b0ccd3c2eec6582de4e3652c5bb4796699b8b312 100644 (file)
@@ -3449,7 +3449,7 @@ static void i40e_irq_affinity_notify(struct irq_affinity_notify *notify,
        struct i40e_q_vector *q_vector =
                container_of(notify, struct i40e_q_vector, affinity_notify);
 
-       q_vector->affinity_mask = *mask;
+       cpumask_copy(&q_vector->affinity_mask, mask);
 }
 
 /**
index 4dccb67e9268029cbbc2d7e26133ff3050b0ff9e..0d87191b6baca8984bc1c5b995dace8f8d9499cb 100644 (file)
@@ -520,7 +520,7 @@ static void i40evf_irq_affinity_notify(struct irq_affinity_notify *notify,
        struct i40e_q_vector *q_vector =
                container_of(notify, struct i40e_q_vector, affinity_notify);
 
-       q_vector->affinity_mask = *mask;
+       cpumask_copy(&q_vector->affinity_mask, mask);
 }
 
 /**