Thread (23 messages) 23 messages, 5 authors, 2022-05-17

Re: [PATCH v8 2/8] hwtracing: hisi_ptt: Add trace function support for HiSilicon PCIe Tune and Trace device

From: Yicong Yang <hidden>
Date: 2022-05-17 09:16:51
Also in: linux-iommu, linux-pci, linux-perf-users, lkml

On 2022/5/17 16:21, John Garry wrote:
On 17/05/2022 09:09, Yicong Yang wrote:
quoted
quoted
quoted
+    target = cpumask_any(cpumask_of_node(dev_to_node(&hisi_ptt->pdev->dev)));
+    if (target < nr_cpumask_bits) {
the comment for cpumask_any() hints to check against nr_cpu_ids - any specific reason to check against nr_cpumask_bits?
here should be:
    if (target >= nr_cpumask_bits) {

will fix this up.
I am still not sure that using nr_cpumask_bits is correct.
Let's use nr_cpu_ids to match the comment of cpumask_any(). Actually we should have
nr_cpu_ids(possible cpus, init to NR_CPUS) <= nr_cpumask_bits (NR_CPUS) so it's ok here.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help