* [PATCH v2] lpfc: Fix lpfc_cpumask_of_node_init()
@ 2019-11-08 22:59 James Smart
2019-11-09 2:32 ` Martin K. Petersen
0 siblings, 1 reply; 2+ messages in thread
From: James Smart @ 2019-11-08 22:59 UTC (permalink / raw)
To: bvanassche; +Cc: linux-scsi, jejb, martin.petersen, James Smart
From: Bart Van Assche <bvanassche@acm.org>
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 <bvanassche@acm.org>
Signed-off-by: James Smart <jsmart2021@gmail.com>
---
Barts patch slightly reorged to clear the mask before exiting
---
drivers/scsi/lpfc/lpfc_init.c | 12 +++---------
1 file changed, 3 insertions(+), 9 deletions(-)
diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
index 28e6a763f106..480d5a28c4f5 100644
--- a/drivers/scsi/lpfc/lpfc_init.c
+++ b/drivers/scsi/lpfc/lpfc_init.c
@@ -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)
--
2.13.7
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2] lpfc: Fix lpfc_cpumask_of_node_init()
2019-11-08 22:59 [PATCH v2] lpfc: Fix lpfc_cpumask_of_node_init() James Smart
@ 2019-11-09 2:32 ` Martin K. Petersen
0 siblings, 0 replies; 2+ messages in thread
From: Martin K. Petersen @ 2019-11-09 2:32 UTC (permalink / raw)
To: James Smart; +Cc: bvanassche, linux-scsi, jejb, martin.petersen
James,
> Fix the following kernel warning:
>
> cpumask_of_node(-1): (unsigned)node >= nr_node_ids(1)
Applied to 5.5/scsi-queue, thanks!
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-11-09 2:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-08 22:59 [PATCH v2] lpfc: Fix lpfc_cpumask_of_node_init() James Smart
2019-11-09 2:32 ` Martin K. Petersen
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.