Thread (7 messages) 7 messages, 4 authors, 2018-11-26

Re: [PATCH] mm: Replace all open encodings for NUMA_NO_NODE

From: Vinod Koul <vkoul@kernel.org>
Date: 2018-11-24 14:06:06
Also in: dmaengine, dri-devel, intel-wired-lan, linux-alpha, linux-block, linux-fbdev, linux-iommu, linux-media, linux-mm, linux-rdma, linuxppc-dev, lkml, sparclinux

On 23-11-18, 15:24, Anshuman Khandual wrote:
quoted hunk ↗ jump to hunk
--- a/drivers/dma/dmaengine.c
+++ b/drivers/dma/dmaengine.c
@@ -386,7 +386,8 @@ EXPORT_SYMBOL(dma_issue_pending_all);
 static bool dma_chan_is_local(struct dma_chan *chan, int cpu)
 {
 	int node = dev_to_node(chan->device->dev);
-	return node == -1 || cpumask_test_cpu(cpu, cpumask_of_node(node));
+	return node == NUMA_NO_NODE ||
+		cpumask_test_cpu(cpu, cpumask_of_node(node));
 }
I do not see dev_to_node being updated first, that returns -1 so I would
prefer to check for -1 unless it return NUMA_NO_NODE

-- 
~Vinod
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help