Skip to contentSkip to conversation

common/sched: Fix ARM build following c/s 340edc3902

PATCH In review Andrew Cooper 4 participants 4 messages Mar 7, 2018 – Mar 8, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 common/sched: Fix ARM build following c/s 340edc3902

The OSSTest smoke tests reports:

sched_credit2.c: In function 'csched2_alloc_domdata':
sched_credit2.c:3015:9: error: implicit declaration of function 'ERR_PTR' [-Werror=implicit-function-declaration]

           return ERR_PTR(-ENOMEM);
           ^

sched_credit2.c:3015:9: error: nested extern declaration of 'ERR_PTR' [-Werror=nested-externs]

As the ERR infrastructure is part of the main scheduler interface now, include it from xen/sched-if.h

---
CC: George Dunlap <[email protected]>
CC: Dario Faggioli <[email protected]>
CC: Stefano Stabellini <[email protected]>
CC: Julien Grall <[email protected]>

---
 xen/include/xen/sched-if.h | 1 +
 1 file changed, 1 insertion(+)
xen/include/xen/sched-if.h +1 -0
index 4895242..c5dd43e 100644
@@ -9,6 +9,7 @@
 #define __XEN_SCHED_IF_H__
 
 #include <xen/percpu.h>
+#include <xen/err.h>
 
 /* A global pointer to the initial cpupool (POOL0). */
 extern struct cpupool *cpupool0;
Signature · 7 lines
2.1.4


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Reviewed-by on v1 1/1
#1 lore raw
Quoted 11 lines · Andrew Cooper

The OSSTest smoke tests reports:

sched_credit2.c: In function 'csched2_alloc_domdata':
sched_credit2.c:3015:9: error: implicit declaration of function 'ERR_PTR' [-Werror=implicit-function-declaration]

           return ERR_PTR(-ENOMEM);
           ^

sched_credit2.c:3015:9: error: nested extern declaration of 'ERR_PTR' [-Werror=nested-externs]

As the ERR infrastructure is part of the main scheduler interface now, include it from xen/sched-if.h

Quoted 24 lines

---
CC: George Dunlap <[email protected]>
CC: Dario Faggioli <[email protected]>
CC: Stefano Stabellini <[email protected]>
CC: Julien Grall <[email protected]>

---
 xen/include/xen/sched-if.h | 1 +
 1 file changed, 1 insertion(+)
xen/include/xen/sched-if.h +1 -0
index 4895242..c5dd43e 100644
@@ -9,6 +9,7 @@
 #define __XEN_SCHED_IF_H__
 
 #include <xen/percpu.h>
+#include <xen/err.h>
 
 /* A global pointer to the initial cpupool (POOL0). */
 extern struct cpupool *cpupool0;
Signature · 1 line
2.1.4

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

Reviewed-by
#2 lore raw
Quoted 9 lines · Stefano Stabellini
Quoted 4 lines · Andrew Cooper

The OSSTest smoke tests reports:

sched_credit2.c: In function 'csched2_alloc_domdata':
sched_credit2.c:3015:9: error: implicit declaration of function

'ERR_PTR' [-Werror=implicit-function-declaration]

Quoted 3 lines
           return ERR_PTR(-ENOMEM);
           ^

sched_credit2.c:3015:9: error: nested extern declaration of

Quoted 9 lines

'ERR_PTR' [-Werror=nested-externs]

Quoted 2 lines

As the ERR infrastructure is part of the main scheduler interface

now, include it from xen/sched-if.h

Quoted 2 lines

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

Acked-by on v1 1/1
#3 lore raw
In reply to Andrew Cooper
Quoted 11 lines · Andrew Cooper

The OSSTest smoke tests reports:

sched_credit2.c: In function 'csched2_alloc_domdata':
sched_credit2.c:3015:9: error: implicit declaration of function 'ERR_PTR' [-Werror=implicit-function-declaration]

           return ERR_PTR(-ENOMEM);
           ^

sched_credit2.c:3015:9: error: nested extern declaration of 'ERR_PTR' [-Werror=nested-externs]

As the ERR infrastructure is part of the main scheduler interface now, include it from xen/sched-if.h

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