Skip to contentSkip to conversation

xen: fix null sched build with debug=n

PATCH In review Doug Goldstein 2 participants 2 messages Mar 19, 2018

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 xen: fix null sched build with debug=n

The null_dom() static inline is just used when debug=y so it results in a error with the default CFLAGS and debug=n. This function is used in only one place and it a one line helper so remove it until we actually need it.

---
environment: Debian stretch
compiler: clang
full log: https://gitlab.com/cardoe/xen/-/jobs/58011527
error:
sched_null.c:123:32: error: unused function 'null_dom' [-Werror,-Wunused-function]
---
change since v1:
- removed the helper function as per Dario

---
 xen/common/sched_null.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)
xen/common/sched_null.c +1 -6
index 58e306a7ea..58ddf7d889 100644
@@ -120,11 +120,6 @@ static inline struct null_vcpu *null_vcpu(const struct vcpu *v)
     return v->sched_priv;
 }
 
-static inline struct null_dom *null_dom(const struct domain *d)
-{
-    return d->sched_priv;
-}
-
 static inline bool vcpu_check_affinity(struct vcpu *v, unsigned int cpu,
                                        unsigned int balance_step)
 {
@@ -677,7 +672,7 @@ static void null_vcpu_migrate(const struct scheduler *ops, struct vcpu *v,
 static inline void null_vcpu_check(struct vcpu *v)
 {
     struct null_vcpu * const nvc = null_vcpu(v);
-    struct null_dom * const ndom = null_dom(v->domain);
+    struct null_dom * const ndom = v->domain->sched_priv;
 
     BUG_ON(nvc->vcpu != v);
 
Signature · 7 lines
2.16.1


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Acked-by on v2 1/1
#1 lore raw
Quoted 9 lines · Doug Goldstein

The null_dom() static inline is just used when debug=y so it results in
a error with the default CFLAGS and debug=n. This function is used in only one place and it a one line helper so remove it until we actually
need it.

Thanks,
Dario

Signature · 4 lines
<<This happens because I choose it to happen!>> (Raistlin Majere)
-----------------------------------------------------------------
Dario Faggioli, Ph.D, http://about.me/dario.faggioli
Software Engineer @ SUSE https://www.suse.com/

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel