2014-02-09 10:59:37

by Rashika Kheria

[permalink] [raw]
Subject: [PATCH 1/4] drivers: xen: Mark function as static in platform-pci.c

Mark function as static in xen/platform-pci.c because it is not used
outside this file.

This eliminates the following warning in xen/platform-pci.c:
drivers/xen/platform-pci.c:48:15: warning: no previous prototype for ‘alloc_xen_mmio’ [-Wmissing-prototypes]

Signed-off-by: Rashika Kheria <[email protected]>
Reviewed-by: Josh Triplett <[email protected]>
---
drivers/xen/platform-pci.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/xen/platform-pci.c b/drivers/xen/platform-pci.c
index a1361c3..3454973 100644
--- a/drivers/xen/platform-pci.c
+++ b/drivers/xen/platform-pci.c
@@ -45,7 +45,7 @@ static unsigned long platform_mmio_alloc;
static unsigned long platform_mmiolen;
static uint64_t callback_via;

-unsigned long alloc_xen_mmio(unsigned long len)
+static unsigned long alloc_xen_mmio(unsigned long len)
{
unsigned long addr;

--
1.7.9.5


2014-02-09 11:01:52

by Rashika Kheria

[permalink] [raw]
Subject: [PATCH 2/4] drivers: xen: Include appropriate header file in pcpu.c

Include appropriate header file in xen/pcpu.c because include/xen/acpi.h
contains prototype declaration of functions defined in the file.

This eliminates the following warning in xen/pcpu.c:
drivers/xen/pcpu.c:336:6: warning: no previous prototype for ‘xen_pcpu_hotplug_sync’ [-Wmissing-prototypes]
drivers/xen/pcpu.c:346:5: warning: no previous prototype for ‘xen_pcpu_id’ [-Wmissing-prototypes]

Signed-off-by: Rashika Kheria <[email protected]>
Reviewed-by: Josh Triplett <[email protected]>
---
drivers/xen/pcpu.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/xen/pcpu.c b/drivers/xen/pcpu.c
index 79e1dff..0aac403 100644
--- a/drivers/xen/pcpu.c
+++ b/drivers/xen/pcpu.c
@@ -40,6 +40,7 @@
#include <linux/capability.h>

#include <xen/xen.h>
+#include <xen/acpi.h>
#include <xen/xenbus.h>
#include <xen/events.h>
#include <xen/interface/platform.h>
--
1.7.9.5

2014-02-09 11:09:04

by Rashika Kheria

[permalink] [raw]
Subject: [PATCH 3/4] drivers: xen: Move prototype declaration to appropriate header file from arch/x86/xen/xen-ops.h

Move prototype declaration to header file include/xen/xen-ops.h from
arch/x86/xen/xen-ops.h because they are used by more than one file.

This eliminates the following warning in drivers/xen/events/:
drivers/xen/events_2l.c:1231:13: warning: no previous prototype for ‘xen_debug_interrupt’ [-Wmissing-prototypes]

Signed-off-by: Rashika Kheria <[email protected]>
Reviewed-by: Josh Triplett <[email protected]>
---
arch/x86/xen/xen-ops.h | 2 --
include/xen/xen-ops.h | 3 +++
2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/arch/x86/xen/xen-ops.h b/arch/x86/xen/xen-ops.h
index 1cb6f4c..e5edc7f 100644
--- a/arch/x86/xen/xen-ops.h
+++ b/arch/x86/xen/xen-ops.h
@@ -55,8 +55,6 @@ void xen_setup_cpu_clockevents(void);
void __init xen_init_time_ops(void);
void __init xen_hvm_init_time_ops(void);

-irqreturn_t xen_debug_interrupt(int irq, void *dev_id);
-
bool xen_vcpu_stolen(int vcpu);

void xen_setup_vcpu_info_placement(void);
diff --git a/include/xen/xen-ops.h b/include/xen/xen-ops.h
index fb2ea8f..9a86337 100644
--- a/include/xen/xen-ops.h
+++ b/include/xen/xen-ops.h
@@ -2,6 +2,7 @@
#define INCLUDE_XEN_OPS_H

#include <linux/percpu.h>
+#include <linux/interrupt.h>
#include <asm/xen/interface.h>

DECLARE_PER_CPU(struct vcpu_info *, xen_vcpu);
@@ -35,4 +36,6 @@ int xen_unmap_domain_mfn_range(struct vm_area_struct *vma,
int numpgs, struct page **pages);

bool xen_running_on_version_or_later(unsigned int major, unsigned int minor);
+
+irqreturn_t xen_debug_interrupt(int irq, void *dev_id);
#endif /* INCLUDE_XEN_OPS_H */
--
1.7.9.5

2014-02-09 11:12:39

by Rashika Kheria

[permalink] [raw]
Subject: [PATCH 4/4] drivers: xen: Move prototype declaration to header file include/xen/xen-ops.h from arch/x86/xen/xen-ops.h

Move prototype declaration to header file include/xen/xen-ops.h from
arch/x86/xen/xen-ops.h because it is used by more than one file. Also,
remove else condition from xen/events/events_base.c to eliminate
conflicting definitions when CONFIG_XEN_PVHVM is not defined.

This eliminates the following warning in xen/events/events_base.c:
drivers/xen/events/events_base.c:1640:6: warning: no previous prototype for ‘xen_callback_vector’ [-Wmissing-prototypes]

Signed-off-by: Rashika Kheria <[email protected]>
---
arch/x86/xen/xen-ops.h | 1 -
drivers/xen/events/events_base.c | 2 --
include/xen/xen-ops.h | 7 +++++++
3 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/arch/x86/xen/xen-ops.h b/arch/x86/xen/xen-ops.h
index e5edc7f..aa8a979 100644
--- a/arch/x86/xen/xen-ops.h
+++ b/arch/x86/xen/xen-ops.h
@@ -39,7 +39,6 @@ void xen_enable_sysenter(void);
void xen_enable_syscall(void);
void xen_vcpu_restore(void);

-void xen_callback_vector(void);
void xen_hvm_init_shared_info(void);
void xen_unplug_emulated_devices(void);

diff --git a/drivers/xen/events/events_base.c b/drivers/xen/events/events_base.c
index 4672e00..5466543 100644
--- a/drivers/xen/events/events_base.c
+++ b/drivers/xen/events/events_base.c
@@ -1656,8 +1656,6 @@ void xen_callback_vector(void)
xen_hvm_callback_vector);
}
}
-#else
-void xen_callback_vector(void) {}
#endif

#undef MODULE_PARAM_PREFIX
diff --git a/include/xen/xen-ops.h b/include/xen/xen-ops.h
index 9a86337..cdea45b 100644
--- a/include/xen/xen-ops.h
+++ b/include/xen/xen-ops.h
@@ -38,4 +38,11 @@ int xen_unmap_domain_mfn_range(struct vm_area_struct *vma,
bool xen_running_on_version_or_later(unsigned int major, unsigned int minor);

irqreturn_t xen_debug_interrupt(int irq, void *dev_id);
+
+#ifdef CONFIG_XEN_PVHVM
+void xen_callback_vector(void);
+#else
+static inline void xen_callback_vector(void) {}
+#endif
+
#endif /* INCLUDE_XEN_OPS_H */
--
1.7.9.5

2014-02-09 12:20:46

by Josh Triplett

[permalink] [raw]
Subject: Re: [PATCH 4/4] drivers: xen: Move prototype declaration to header file include/xen/xen-ops.h from arch/x86/xen/xen-ops.h

On Sun, Feb 09, 2014 at 04:42:33PM +0530, Rashika Kheria wrote:
> Move prototype declaration to header file include/xen/xen-ops.h from
> arch/x86/xen/xen-ops.h because it is used by more than one file. Also,
> remove else condition from xen/events/events_base.c to eliminate
> conflicting definitions when CONFIG_XEN_PVHVM is not defined.
>
> This eliminates the following warning in xen/events/events_base.c:
> drivers/xen/events/events_base.c:1640:6: warning: no previous prototype for ‘xen_callback_vector’ [-Wmissing-prototypes]
>
> Signed-off-by: Rashika Kheria <[email protected]>

Reviewed-by: Josh Triplett <[email protected]>

> arch/x86/xen/xen-ops.h | 1 -
> drivers/xen/events/events_base.c | 2 --
> include/xen/xen-ops.h | 7 +++++++
> 3 files changed, 7 insertions(+), 3 deletions(-)
>
> diff --git a/arch/x86/xen/xen-ops.h b/arch/x86/xen/xen-ops.h
> index e5edc7f..aa8a979 100644
> --- a/arch/x86/xen/xen-ops.h
> +++ b/arch/x86/xen/xen-ops.h
> @@ -39,7 +39,6 @@ void xen_enable_sysenter(void);
> void xen_enable_syscall(void);
> void xen_vcpu_restore(void);
>
> -void xen_callback_vector(void);
> void xen_hvm_init_shared_info(void);
> void xen_unplug_emulated_devices(void);
>
> diff --git a/drivers/xen/events/events_base.c b/drivers/xen/events/events_base.c
> index 4672e00..5466543 100644
> --- a/drivers/xen/events/events_base.c
> +++ b/drivers/xen/events/events_base.c
> @@ -1656,8 +1656,6 @@ void xen_callback_vector(void)
> xen_hvm_callback_vector);
> }
> }
> -#else
> -void xen_callback_vector(void) {}
> #endif
>
> #undef MODULE_PARAM_PREFIX
> diff --git a/include/xen/xen-ops.h b/include/xen/xen-ops.h
> index 9a86337..cdea45b 100644
> --- a/include/xen/xen-ops.h
> +++ b/include/xen/xen-ops.h
> @@ -38,4 +38,11 @@ int xen_unmap_domain_mfn_range(struct vm_area_struct *vma,
> bool xen_running_on_version_or_later(unsigned int major, unsigned int minor);
>
> irqreturn_t xen_debug_interrupt(int irq, void *dev_id);
> +
> +#ifdef CONFIG_XEN_PVHVM
> +void xen_callback_vector(void);
> +#else
> +static inline void xen_callback_vector(void) {}
> +#endif
> +
> #endif /* INCLUDE_XEN_OPS_H */
> --
> 1.7.9.5
>

2014-02-10 10:31:52

by David Vrabel

[permalink] [raw]
Subject: Re: [PATCH 1/4] drivers: xen: Mark function as static in platform-pci.c

On 09/02/14 10:59, Rashika Kheria wrote:
> Mark function as static in xen/platform-pci.c because it is not used
> outside this file.
>
> This eliminates the following warning in xen/platform-pci.c:
> drivers/xen/platform-pci.c:48:15: warning: no previous prototype for ‘alloc_xen_mmio’ [-Wmissing-prototypes]
>
> Signed-off-by: Rashika Kheria <[email protected]>
> Reviewed-by: Josh Triplett <[email protected]>

Reviewed-by: David Vrabel <david,[email protected]>

David

2014-02-10 10:32:33

by David Vrabel

[permalink] [raw]
Subject: Re: [PATCH 3/4] drivers: xen: Move prototype declaration to appropriate header file from arch/x86/xen/xen-ops.h

On 09/02/14 11:08, Rashika Kheria wrote:
> Move prototype declaration to header file include/xen/xen-ops.h from
> arch/x86/xen/xen-ops.h because they are used by more than one file.
>
> This eliminates the following warning in drivers/xen/events/:
> drivers/xen/events_2l.c:1231:13: warning: no previous prototype for ‘xen_debug_interrupt’ [-Wmissing-prototypes]
>
> Signed-off-by: Rashika Kheria <[email protected]>
> Reviewed-by: Josh Triplett <[email protected]>
[...]
> --- a/include/xen/xen-ops.h
> +++ b/include/xen/xen-ops.h
> @@ -2,6 +2,7 @@
> #define INCLUDE_XEN_OPS_H
>
> #include <linux/percpu.h>
> +#include <linux/interrupt.h>
> #include <asm/xen/interface.h>
>
> DECLARE_PER_CPU(struct vcpu_info *, xen_vcpu);
> @@ -35,4 +36,6 @@ int xen_unmap_domain_mfn_range(struct vm_area_struct *vma,
> int numpgs, struct page **pages);
>
> bool xen_running_on_version_or_later(unsigned int major, unsigned int minor);
> +
> +irqreturn_t xen_debug_interrupt(int irq, void *dev_id);

This should be moved to include/xen/events.h instead.

David

2014-02-10 11:23:43

by David Vrabel

[permalink] [raw]
Subject: Re: [PATCH 2/4] drivers: xen: Include appropriate header file in pcpu.c

On 09/02/14 11:01, Rashika Kheria wrote:
> Include appropriate header file in xen/pcpu.c because include/xen/acpi.h
> contains prototype declaration of functions defined in the file.
>
> This eliminates the following warning in xen/pcpu.c:
> drivers/xen/pcpu.c:336:6: warning: no previous prototype for ‘xen_pcpu_hotplug_sync’ [-Wmissing-prototypes]
> drivers/xen/pcpu.c:346:5: warning: no previous prototype for ‘xen_pcpu_id’ [-Wmissing-prototypes]
>
> Signed-off-by: Rashika Kheria <[email protected]>
> Reviewed-by: Josh Triplett <[email protected]>

Reviewed-by: David Vrabel <[email protected]>

David

2014-02-10 11:26:07

by David Vrabel

[permalink] [raw]
Subject: Re: [PATCH 4/4] drivers: xen: Move prototype declaration to header file include/xen/xen-ops.h from arch/x86/xen/xen-ops.h

On 09/02/14 11:12, Rashika Kheria wrote:
> Move prototype declaration to header file include/xen/xen-ops.h from
> arch/x86/xen/xen-ops.h because it is used by more than one file. Also,
> remove else condition from xen/events/events_base.c to eliminate
> conflicting definitions when CONFIG_XEN_PVHVM is not defined.
>
> This eliminates the following warning in xen/events/events_base.c:
> drivers/xen/events/events_base.c:1640:6: warning: no previous prototype for ‘xen_callback_vector’ [-Wmissing-prototypes]
[...]
> --- a/include/xen/xen-ops.h
> +++ b/include/xen/xen-ops.h
> @@ -38,4 +38,11 @@ int xen_unmap_domain_mfn_range(struct vm_area_struct *vma,
> bool xen_running_on_version_or_later(unsigned int major, unsigned int minor);
>
> irqreturn_t xen_debug_interrupt(int irq, void *dev_id);
> +
> +#ifdef CONFIG_XEN_PVHVM
> +void xen_callback_vector(void);
> +#else
> +static inline void xen_callback_vector(void) {}
> +#endif
> +

This should be in include/xen/events.h

David

2014-02-10 13:27:19

by Stefano Stabellini

[permalink] [raw]
Subject: Re: [PATCH 4/4] drivers: xen: Move prototype declaration to header file include/xen/xen-ops.h from arch/x86/xen/xen-ops.h

On Sun, 9 Feb 2014, Rashika Kheria wrote:
> Move prototype declaration to header file include/xen/xen-ops.h from
> arch/x86/xen/xen-ops.h because it is used by more than one file. Also,
> remove else condition from xen/events/events_base.c to eliminate
> conflicting definitions when CONFIG_XEN_PVHVM is not defined.
>
> This eliminates the following warning in xen/events/events_base.c:
> drivers/xen/events/events_base.c:1640:6: warning: no previous prototype for ‘xen_callback_vector’ [-Wmissing-prototypes]
>
> Signed-off-by: Rashika Kheria <[email protected]>

Acked-by: Stefano Stabellini <[email protected]>


> arch/x86/xen/xen-ops.h | 1 -
> drivers/xen/events/events_base.c | 2 --
> include/xen/xen-ops.h | 7 +++++++
> 3 files changed, 7 insertions(+), 3 deletions(-)
>
> diff --git a/arch/x86/xen/xen-ops.h b/arch/x86/xen/xen-ops.h
> index e5edc7f..aa8a979 100644
> --- a/arch/x86/xen/xen-ops.h
> +++ b/arch/x86/xen/xen-ops.h
> @@ -39,7 +39,6 @@ void xen_enable_sysenter(void);
> void xen_enable_syscall(void);
> void xen_vcpu_restore(void);
>
> -void xen_callback_vector(void);
> void xen_hvm_init_shared_info(void);
> void xen_unplug_emulated_devices(void);
>
> diff --git a/drivers/xen/events/events_base.c b/drivers/xen/events/events_base.c
> index 4672e00..5466543 100644
> --- a/drivers/xen/events/events_base.c
> +++ b/drivers/xen/events/events_base.c
> @@ -1656,8 +1656,6 @@ void xen_callback_vector(void)
> xen_hvm_callback_vector);
> }
> }
> -#else
> -void xen_callback_vector(void) {}
> #endif
>
> #undef MODULE_PARAM_PREFIX
> diff --git a/include/xen/xen-ops.h b/include/xen/xen-ops.h
> index 9a86337..cdea45b 100644
> --- a/include/xen/xen-ops.h
> +++ b/include/xen/xen-ops.h
> @@ -38,4 +38,11 @@ int xen_unmap_domain_mfn_range(struct vm_area_struct *vma,
> bool xen_running_on_version_or_later(unsigned int major, unsigned int minor);
>
> irqreturn_t xen_debug_interrupt(int irq, void *dev_id);
> +
> +#ifdef CONFIG_XEN_PVHVM
> +void xen_callback_vector(void);
> +#else
> +static inline void xen_callback_vector(void) {}
> +#endif
> +
> #endif /* INCLUDE_XEN_OPS_H */
> --
> 1.7.9.5
>