[PATCH 6/7] xen/sched: null: migrate to new sched_ops

Furkan Caliskan <[email protected]> Mon, 3 Aug 2026 08:06:13 +0300
Newsgroups org.xenproject.lists.xen-devel
Message-ID <[email protected]>
Declare sched_null_def as a struct sched_ops instead of a struct
scheduler, dropping the .sched_data field, and register it with
REGISTER_SCHED_OPS() so it is found through sched_ops_array[]
instead of schedulers[].

This moves the null scheduler onto the new sched_ops
registration path.

Signed-off-by: Furkan Caliskan <[email protected]>
---
 xen/common/sched/null.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/xen/common/sched/null.c b/xen/common/sched/null.c
index 952bb47444..5194c8216c 100644
--- a/xen/common/sched/null.c
+++ b/xen/common/sched/null.c
@@ -1037,11 +1037,10 @@ static void cf_check null_dump(const struct scheduler *ops)
     spin_unlock_irqrestore(&prv->lock, flags);
 }
 
-static const struct scheduler sched_null_def = {
+static const struct sched_ops sched_null_def = {
     .name           = "null Scheduler",
     .opt_name       = "null",
     .sched_id       = XEN_SCHEDULER_NULL,
-    .sched_data     = NULL,
 
     .init           = null_init,
     .deinit         = null_deinit,
@@ -1068,4 +1067,4 @@ static const struct scheduler sched_null_def = {
     .dump_settings  = null_dump,
 };
 
-REGISTER_SCHEDULER(sched_null_def);
+REGISTER_SCHED_OPS(sched_null_def);
-- 
2.34.1