scx_bpfland: Remove the usage of cast_mask in bpfland_enqueue

The usage of cast_mask() within bpfland_enqueue aims to cast the type of
"p->cpus_ptr" from "struct bpf_cpumask *" to "const struct cpumask *".
However, the type of "p->cpus_ptr" is already "const cpumask_t *" aka
"const struct cpumask *", so no conversion is needed.

Passing a value of type "struct cpumask *" into "struct bpf_cpumask *"
also leads to compiling error.

Signed-off-by: I Hsin Cheng <richard120310@gmail.com>
This commit is contained in:
I Hsin Cheng 2024-09-19 22:02:25 +08:00
parent 488f209c28
commit 5596d5e3fe

View File

@ -847,7 +847,7 @@ void BPF_STRUCT_OPS(bpfland_enqueue, struct task_struct *p, u64 enq_flags)
* task, wake them up to see whether they'd be able to steal the just
* queued task.
*/
cpu = scx_bpf_pick_idle_cpu(cast_mask(p->cpus_ptr), 0);
cpu = scx_bpf_pick_idle_cpu(p->cpus_ptr, 0);
if (cpu >= 0)
scx_bpf_kick_cpu(cpu, 0);
}