All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] xen: fix null sched build with debug=n
@ 2018-03-19 18:41 Doug Goldstein
  2018-03-19 22:39 ` Dario Faggioli
  0 siblings, 1 reply; 2+ messages in thread
From: Doug Goldstein @ 2018-03-19 18:41 UTC (permalink / raw)
  To: xen-devel; +Cc: George Dunlap, Doug Goldstein, Dario Faggioli

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.

Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
---
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(-)

diff --git a/xen/common/sched_null.c b/xen/common/sched_null.c
index 58e306a7ea..58ddf7d889 100644
--- a/xen/common/sched_null.c
+++ b/xen/common/sched_null.c
@@ -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);
 
-- 
2.16.1


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v2] xen: fix null sched build with debug=n
  2018-03-19 18:41 [PATCH v2] xen: fix null sched build with debug=n Doug Goldstein
@ 2018-03-19 22:39 ` Dario Faggioli
  0 siblings, 0 replies; 2+ messages in thread
From: Dario Faggioli @ 2018-03-19 22:39 UTC (permalink / raw)
  To: Doug Goldstein, xen-devel; +Cc: George Dunlap


[-- Attachment #1.1: Type: text/plain, Size: 662 bytes --]

On Mon, 2018-03-19 at 13:41 -0500, Doug Goldstein 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. This function is used in
> only one place and it a one line helper so remove it until we
> actually
> need it.
> 
> Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
>
Acked-by: Dario Faggioli <dfaggioli@suse.com>

Thanks,
Dario
-- 
<<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/

[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

[-- Attachment #2: Type: text/plain, Size: 157 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-03-19 22:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-19 18:41 [PATCH v2] xen: fix null sched build with debug=n Doug Goldstein
2018-03-19 22:39 ` Dario Faggioli

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.