[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH 30/34] xen: Add missing includes on different files



There is a bunch of functions in xen code which are declared without the
prototypes defined before. This may lead to runtime issue if the propotype
doesn't match the declaration.

Add missing includes where the prototype of theses functions are defined.

This was spotted by -Wmissing-prototypes, which we can't enable because there
is exported function for assembly. I'm not sure if we need to add a prototype
for them.

Signed-off-by: Julien Grall <julien.grall@xxxxxxxxxx>
Cc: Ian Campbell <ian.campbell@xxxxxxxxxx>
Cc: Stefano Stabellini <stefano.stabellini@xxxxxxxxxx>
Cc: Tim Deegan <tim@xxxxxxx>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
Cc: Daniel De Graaf <dgdegra@xxxxxxxxxxxxx>
---
 xen/arch/arm/hvm.c             |    1 +
 xen/arch/arm/mm.c              |    1 +
 xen/arch/arm/shutdown.c        |    1 +
 xen/arch/arm/smp.c             |    1 +
 xen/arch/arm/time.c            |    1 +
 xen/arch/arm/vtimer.c          |    1 +
 xen/common/event_channel.c     |    1 +
 xen/common/grant_table.c       |    1 +
 xen/common/multicall.c         |    3 +++
 xen/common/sort.c              |    1 +
 xen/common/tmem.c              |    1 +
 xen/drivers/video/arm_hdlcd.c  |    1 +
 xen/xsm/flask/ss/conditional.h |    1 +
 13 files changed, 15 insertions(+)

diff --git a/xen/arch/arm/hvm.c b/xen/arch/arm/hvm.c
index 471c4cd..b695b26 100644
--- a/xen/arch/arm/hvm.c
+++ b/xen/arch/arm/hvm.c
@@ -4,6 +4,7 @@
 #include <xen/errno.h>
 #include <xen/guest_access.h>
 #include <xen/sched.h>
+#include <xen/hypercall.h>
 
 #include <xsm/xsm.h>
 
diff --git a/xen/arch/arm/mm.c b/xen/arch/arm/mm.c
index fc58fc6..84b6ccc 100644
--- a/xen/arch/arm/mm.c
+++ b/xen/arch/arm/mm.c
@@ -39,6 +39,7 @@
 #include <xen/vmap.h>
 #include <xsm/xsm.h>
 #include <xen/pfn.h>
+#include <asm/setup.h>
 
 struct domain *dom_xen, *dom_io, *dom_cow;
 
diff --git a/xen/arch/arm/shutdown.c b/xen/arch/arm/shutdown.c
index adc0529..43eaf47 100644
--- a/xen/arch/arm/shutdown.c
+++ b/xen/arch/arm/shutdown.c
@@ -4,6 +4,7 @@
 #include <xen/delay.h>
 #include <xen/lib.h>
 #include <xen/smp.h>
+#include <xen/shutdown.h>
 #include <asm/platform.h>
 
 static void raw_machine_reset(void)
diff --git a/xen/arch/arm/smp.c b/xen/arch/arm/smp.c
index 30203b8..7bb602d 100644
--- a/xen/arch/arm/smp.c
+++ b/xen/arch/arm/smp.c
@@ -1,4 +1,5 @@
 #include <xen/config.h>
+#include <xen/smp.h>
 #include <asm/system.h>
 #include <asm/smp.h>
 #include <asm/cpregs.h>
diff --git a/xen/arch/arm/time.c b/xen/arch/arm/time.c
index 7f4f2b4..3b0feec 100644
--- a/xen/arch/arm/time.c
+++ b/xen/arch/arm/time.c
@@ -29,6 +29,7 @@
 #include <xen/time.h>
 #include <xen/sched.h>
 #include <xen/event.h>
+#include <xen/delay.h>
 #include <asm/system.h>
 #include <asm/time.h>
 #include <asm/gic.h>
diff --git a/xen/arch/arm/vtimer.c b/xen/arch/arm/vtimer.c
index 83f4c0f..6aeae5d 100644
--- a/xen/arch/arm/vtimer.c
+++ b/xen/arch/arm/vtimer.c
@@ -25,6 +25,7 @@
 #include <asm/time.h>
 #include <asm/gic.h>
 #include <asm/regs.h>
+#include "vtimer.h"
 
 static void phys_timer_expired(void *data)
 {
diff --git a/xen/common/event_channel.c b/xen/common/event_channel.c
index db952af..e94e37e 100644
--- a/xen/common/event_channel.c
+++ b/xen/common/event_channel.c
@@ -28,6 +28,7 @@
 #include <xen/keyhandler.h>
 #include <xen/event_fifo.h>
 #include <asm/current.h>
+#include <xen/hypercall.h>
 
 #include <public/xen.h>
 #include <public/event_channel.h>
diff --git a/xen/common/grant_table.c b/xen/common/grant_table.c
index 107b000..386cdff 100644
--- a/xen/common/grant_table.c
+++ b/xen/common/grant_table.c
@@ -37,6 +37,7 @@
 #include <xen/iommu.h>
 #include <xen/paging.h>
 #include <xen/keyhandler.h>
+#include <xen/hypercall.h>
 #include <xsm/xsm.h>
 #include <asm/flushtlb.h>
 
diff --git a/xen/common/multicall.c b/xen/common/multicall.c
index e66c798..bb7550b 100644
--- a/xen/common/multicall.c
+++ b/xen/common/multicall.c
@@ -6,6 +6,9 @@
 #include <xen/types.h>
 #include <xen/lib.h>
 #include <xen/mm.h>
+#ifndef COMPAT
+#include <xen/hypercall.h>
+#endif
 #include <xen/sched.h>
 #include <xen/event.h>
 #include <xen/multicall.h>
diff --git a/xen/common/sort.c b/xen/common/sort.c
index d96fc2a..7069888 100644
--- a/xen/common/sort.c
+++ b/xen/common/sort.c
@@ -5,6 +5,7 @@
  */
 
 #include <xen/types.h>
+#include <xen/sort.h>
 
 static void u32_swap(void *a, void *b, int size)
 {
diff --git a/xen/common/tmem.c b/xen/common/tmem.c
index 5155114..865d154 100644
--- a/xen/common/tmem.c
+++ b/xen/common/tmem.c
@@ -23,6 +23,7 @@
 #include <xen/radix-tree.h>
 #include <xen/list.h>
 #include <xen/init.h>
+#include <xen/hypercall.h>
 
 #define TMEM_SPEC_VERSION 1
 
diff --git a/xen/drivers/video/arm_hdlcd.c b/xen/drivers/video/arm_hdlcd.c
index 841d0d0..04a3091 100644
--- a/xen/drivers/video/arm_hdlcd.c
+++ b/xen/drivers/video/arm_hdlcd.c
@@ -25,6 +25,7 @@
 #include <xen/libfdt/libfdt.h>
 #include <xen/init.h>
 #include <xen/mm.h>
+#include <xen/video.h>
 #include "font.h"
 #include "lfb.h"
 #include "modelines.h"
diff --git a/xen/xsm/flask/ss/conditional.h b/xen/xsm/flask/ss/conditional.h
index d389ecf..65af76b 100644
--- a/xen/xsm/flask/ss/conditional.h
+++ b/xen/xsm/flask/ss/conditional.h
@@ -13,6 +13,7 @@
 #include "avtab.h"
 #include "symtab.h"
 #include "policydb.h"
+#include "../include/conditional.h"
 
 #define COND_EXPR_MAXDEPTH 10
 
-- 
1.7.10.4


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.