[PATCH] sched_ext: Return NULL in llc_span

Cheng-Yang Chou posted 1 patch 3 months, 3 weeks ago
kernel/sched/ext_idle.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] sched_ext: Return NULL in llc_span
Posted by Cheng-Yang Chou 3 months, 3 weeks ago
Use NULL instead of 0 to signal no LLC domain, matching numa_span() and
the function comment.

No functional change.

Signed-off-by: Cheng-Yang Chou <yphbchou0911@gmail.com>
---
 kernel/sched/ext_idle.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/sched/ext_idle.c b/kernel/sched/ext_idle.c
index b79cbdb7999a..dfacb0ad9b6f 100644
--- a/kernel/sched/ext_idle.c
+++ b/kernel/sched/ext_idle.c
@@ -249,7 +249,7 @@ static struct cpumask *llc_span(s32 cpu)
 
 	sd = rcu_dereference(per_cpu(sd_llc, cpu));
 	if (!sd)
-		return 0;
+		return NULL;
 
 	return sched_domain_span(sd);
 }
-- 
2.48.1
Re: [PATCH] sched_ext: Return NULL in llc_span
Posted by Tejun Heo 3 months, 3 weeks ago
On Mon, Jun 16, 2025 at 04:04:14AM +0800, Cheng-Yang Chou wrote:
> Use NULL instead of 0 to signal no LLC domain, matching numa_span() and
> the function comment.
> 
> No functional change.
> 
> Signed-off-by: Cheng-Yang Chou <yphbchou0911@gmail.com>

Applied to sched_ext/for-6.17.

Thanks.

-- 
tejun