[PATCH v2] sched: topology: cleanup comments

Yury Norov posted 1 patch 1 month, 3 weeks ago
kernel/sched/topology.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
[PATCH v2] sched: topology: cleanup comments
Posted by Yury Norov 1 month, 3 weeks ago
sched_numa_find_closest() top comment is almost kernel-doc formatted,
but doesn't appear to be a valid kernel-doc. Fix that, and while there
reword NUMA-level comment, highlighting that 'NUMA level' is a synonym
to the number of hops.

Signed-off-by: Yury Norov <ynorov@nvidia.com>
---
v1: https://lore.kernel.org/all/20260401145654.16241-1-ynorov@nvidia.com/
v2: reword "Return" statement.

 kernel/sched/topology.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/kernel/sched/topology.c b/kernel/sched/topology.c
index 5847b83d9d55..3d7e3d5516dd 100644
--- a/kernel/sched/topology.c
+++ b/kernel/sched/topology.c
@@ -840,7 +840,7 @@ int group_balance_cpu(struct sched_group *sg)
  *
  * We want to construct domains and groups to represent this. The way we go
  * about doing this is to build the domains on 'hops'. For each NUMA level we
- * construct the mask of all nodes reachable in @level hops.
+ * construct the mask of all nodes reachable at that number of hops.
  *
  * For the above NUMA topology that gives 3 levels:
  *
@@ -2236,13 +2236,13 @@ void sched_domains_numa_masks_clear(unsigned int cpu)
 	}
 }
 
-/*
+/**
  * sched_numa_find_closest() - given the NUMA topology, find the cpu
  *                             closest to @cpu from @cpumask.
- * cpumask: cpumask to find a cpu from
- * cpu: cpu to be close to
+ * @cpus: cpumask to find a cpu from
+ * @cpu: cpu to be close to
  *
- * returns: cpu, or nr_cpu_ids when nothing found.
+ * Return: closest cpu, or nr_cpu_ids when nothing found.
  */
 int sched_numa_find_closest(const struct cpumask *cpus, int cpu)
 {
-- 
2.51.0
Re: [PATCH v2] sched: topology: cleanup comments
Posted by Valentin Schneider 1 month, 2 weeks ago
On 23/04/26 13:48, Yury Norov wrote:
> sched_numa_find_closest() top comment is almost kernel-doc formatted,
> but doesn't appear to be a valid kernel-doc. Fix that, and while there
> reword NUMA-level comment, highlighting that 'NUMA level' is a synonym
> to the number of hops.
>
> Signed-off-by: Yury Norov <ynorov@nvidia.com>

Reviewed-by: Valentin Schneider <vschneid@redhat.com>
Re: [PATCH v2] sched: topology: cleanup comments
Posted by K Prateek Nayak 1 month, 3 weeks ago
Hello Yury,

On 4/23/2026 11:18 PM, Yury Norov wrote:
> sched_numa_find_closest() top comment is almost kernel-doc formatted,
> but doesn't appear to be a valid kernel-doc. Fix that, and while there
> reword NUMA-level comment, highlighting that 'NUMA level' is a synonym
> to the number of hops.
> 
> Signed-off-by: Yury Norov <ynorov@nvidia.com>

I can see the doc being generated as expected now. Feel free to include:

Reviewed-and-tested-by: K Prateek Nayak <kprateek.nayak@amd.com>

-- 
Thanks and Regards,
Prateek