Skip to content

Commit a8ffdfa

Browse files
jacob-kellerLinuxMinion
authored andcommitted
i40e: use cpumask_copy instead of direct assignment
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 <[email protected]> Tested-by: Andrew Bowers <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]> Orabug: 26822609 (cherry picked from commit 7e4d01e) Signed-off-by: Boris Ostrovsky <[email protected]> Tested-by: Dib Chatterjee <[email protected]> Reviewed-by: Konrad Rzeszutek Wilk <[email protected]>
1 parent 9cfe783 commit a8ffdfa

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

drivers/net/ethernet/intel/i40e/i40e_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3471,7 +3471,7 @@ static void i40e_irq_affinity_notify(struct irq_affinity_notify *notify,
34713471
struct i40e_q_vector *q_vector =
34723472
container_of(notify, struct i40e_q_vector, affinity_notify);
34733473

3474-
q_vector->affinity_mask = *mask;
3474+
cpumask_copy(&q_vector->affinity_mask, mask);
34753475
}
34763476

34773477
/**

drivers/net/ethernet/intel/i40evf/i40evf_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -513,7 +513,7 @@ static void i40evf_irq_affinity_notify(struct irq_affinity_notify *notify,
513513
struct i40e_q_vector *q_vector =
514514
container_of(notify, struct i40e_q_vector, affinity_notify);
515515

516-
q_vector->affinity_mask = *mask;
516+
cpumask_copy(&q_vector->affinity_mask, mask);
517517
}
518518

519519
/**

0 commit comments

Comments
 (0)