The following function shall be wrapped:
- scheduler_id

Signed-off-by: Penny Zheng <penny.zh...@amd.com>
Reviewed-by: Stefano Stabellini <sstabell...@kernel.org>
---
v2 -> v3:
- move #endif up ahead of the blank line
---
 xen/common/sched/core.c | 2 ++
 xen/common/sysctl.c     | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/xen/common/sched/core.c b/xen/common/sched/core.c
index 9043414290..13fdf57e57 100644
--- a/xen/common/sched/core.c
+++ b/xen/common/sched/core.c
@@ -2069,11 +2069,13 @@ long do_set_timer_op(s_time_t timeout)
     return 0;
 }
 
+#ifdef CONFIG_SYSCTL
 /* scheduler_id - fetch ID of current scheduler */
 int scheduler_id(void)
 {
     return operations.sched_id;
 }
+#endif
 
 /* Adjust scheduling parameter for a given domain. */
 long sched_adjust(struct domain *d, struct xen_domctl_scheduler_op *op)
diff --git a/xen/common/sysctl.c b/xen/common/sysctl.c
index 814f153a23..b644347b40 100644
--- a/xen/common/sysctl.c
+++ b/xen/common/sysctl.c
@@ -72,9 +72,11 @@ long do_sysctl(XEN_GUEST_HANDLE_PARAM(xen_sysctl_t) u_sysctl)
         ret = tb_control(&op->u.tbuf_op);
         break;
 
+#ifdef CONFIG_SYSCTL
     case XEN_SYSCTL_sched_id:
         op->u.sched_id.sched_id = scheduler_id();
         break;
+#endif /* CONFIG_SYSCTL */
 
     case XEN_SYSCTL_getdomaininfolist:
     { 
-- 
2.34.1


Reply via email to