lpfc: Fix lpfc_cpumask_of_node_init()
Subsystems (2)
PATCH v2 1/1 lpfc: Fix lpfc_cpumask_of_node_init()
From: Bart Van Assche <[email protected]>
Fix the following kernel warning:
cpumask_of_node(-1): (unsigned)node >= nr_node_ids(1)
Fixes dcaa21367938 ("scsi: lpfc: Change default IRQ model on AMD architectures")
Signed-off-by Bart Van Assche <[email protected]>
Signed-off-by James Smart <[email protected]>
---
Barts patch slightly reorged to clear the mask before exiting
--- drivers/scsi/lpfc/lpfc_init.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-)
drivers/scsi/lpfc/lpfc_init.c +3 -9
@@ -6005,19 +6005,13 @@ static void lpfc_cpumask_of_node_init(struct lpfc_hba *phba) {unsigned int cpu, numa_node; -struct cpumask *numa_mask =NULL ; - -#ifdef CONFIG_NUMA - numa_node = phba->pcidev->dev.numa_node; -#else - numa_node =NUMA_NO_NODE ; -#endif - numa_mask = &phba->sli4_hba.numa_mask; +struct cpumask *numa_mask = &phba->sli4_hba.numa_mask;cpumask_clear (numa_mask);/* Check if we're a NUMA architecture */ -if (!cpumask_of_node (numa_node)) + numa_node =dev_to_node (&phba->pcidev->dev); +if (numa_node ==NUMA_NO_NODE )return ;for_each_possible_cpu (cpu)
Signature · 1 line
2.13.7
Martin K. Petersen
AppliedJames,
Quoted 3 lines
Fix the following kernel warning:
cpumask_of_node(-1): (unsigned)node >=nr_node_ids(1)
Applied to 5.5/scsi-queue, thanks!
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering