xen: fix null sched build with debug=n
PATCH 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.
---
sched_null.c:123:32: error: unused function 'null_dom' [-Werror,-Wunused-function]
Feel free to fix this better.
--- xen/common/sched_null.c | 2 ++ 1 file changed, 2 insertions(+)
xen/common/sched_null.c +2 -0
@@ -120,10 +120,12 @@ static inline struct null_vcpu *null_vcpu(const struct vcpu *v)return v->sched_priv; } +#ifndef NDEBUG static inline struct null_dom *null_dom (const struct domain *d) {return d->sched_priv; } +#endif static inline bool vcpu_check_affinity (struct vcpu *v,unsigned int cpu,unsigned int balance_step)
Signature · 7 lines
2.16.1 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 8 lines
Quoted 1 line
Quoted 1 line · On 19.03.18 at 03:20, <[email protected]> wrote:
The
null_dom()static inline is just used when debug=y so it results in a error with the default CFLAGS and debug=n.Signed-off-by Doug Goldstein <[email protected]>---
sched_null.c:123:32: error: unused function 'null_dom' [-Werror,-Wunused-function]
Since generally only non-inline functions get warned about by gcc (afaik), I'm wondering: Is this with clang? Or with some specific, non-standard version of gcc? Adding such specifics to the commit message would generally be advisable (and indeed I'm not really happy to see such an #ifdef added, but then again I'm not the maintainer of that code).
Jan
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 11 lines · Jan Beulich
Quoted 10 lines
Quoted 1 line
Quoted 1 line · On 19.03.18 at 03:20, <[email protected]> wrote:
The
null_dom()static inline is just used when debug=y so it results in
a error with the default CFLAGS and debug=n.Signed-off-by Doug Goldstein <[email protected]>---
sched_null.c:123:32: error: unused function 'null_dom' [-Werror,-Wunused-function]
Quoted 7 lines
Since generally only non-inline functions get warned about by gcc (afaik), I'm wondering: Is this with clang? Or with some specific, non-standard version of gcc? Adding such specifics to the commit message would generally be advisable (and indeed I'm not really happy to see such an #ifdef added, but then again I'm not the maintainer of that code).
I don't like that either.
Since it's used only once, it can well be killed, and v->domain->sched_priv be used in null_vcpu_check().
We'll reintroduce the helper if/when actually necessary.
Regards,
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
Quoted 9 lines · Jan Beulich
Quoted 8 lines
Quoted 1 line
Quoted 1 line · On 19.03.18 at 03:20, <[email protected]> wrote:
The
null_dom()static inline is just used when debug=y so it results in a error with the default CFLAGS and debug=n.Signed-off-by Doug Goldstein <[email protected]>---
sched_null.c:123:32: error: unused function 'null_dom' [-Werror,-Wunused-function]
Quoted 9 lines
Since generally only non-inline functions get warned about by gcc (afaik), I'm wondering: Is this with clang? Or with some specific, non-standard version of gcc? Adding such specifics to the commit message would generally be advisable (and indeed I'm not really happy to see such an #ifdef added, but then again I'm not the maintainer of that code).
Jan
The full log is here: https://gitlab.com/cardoe/xen/-/jobs/58011527
It's a Debian Stretch instance using clang and debug=n. Should have included all that, sorry.
Signature · 6 lines
Doug Goldstein _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel