]> xenbits.xensource.com Git - people/sstabellini/xen-unstable.git/.git/commitdiff
xen/arm: Remove __init from prototype
authorJulien Grall <julien.grall@arm.com>
Wed, 31 Oct 2018 18:12:55 +0000 (18:12 +0000)
committerStefano Stabellini <sstabellini@kernel.org>
Fri, 9 Nov 2018 18:14:14 +0000 (10:14 -0800)
In Xen, it is common to add __init to the declaration and not the
prototype. Remove the few __init on some prototypes which allows to
avoid the inclusion of init.h in headers.

With these changes, init.h is now required to be included on some c
files. Also, add __init where it was missing in declaration.

Signed-off-by: Julien Grall <julien.grall@arm.com>
Reviewed-by: Andrii Anisov <andrii_anisov@epam.com>
Acked-by: Stefano Stabellini <sstabellini@kernel.org>
12 files changed:
xen/arch/arm/acpi/lib.c
xen/arch/arm/bootfdt.c
xen/arch/arm/cpuerrata.c
xen/arch/arm/device.c
xen/arch/arm/psci.c
xen/include/asm-arm/acpi.h
xen/include/asm-arm/alternative.h
xen/include/asm-arm/device.h
xen/include/asm-arm/iommu.h
xen/include/asm-arm/platform.h
xen/include/asm-arm/setup.h
xen/include/xen/device_tree.h

index ada5298a385ff80347ddc0382865e9c299ec3a6d..4fc6e17322c16d232c31fa4315d9d72a9d99d25e 100644 (file)
@@ -22,6 +22,7 @@
  */
 
 #include <xen/acpi.h>
+#include <xen/init.h>
 #include <xen/mm.h>
 
 char *__acpi_map_table(paddr_t phys, unsigned long size)
index 8eba42c7b95a854f0fb5f85932e5f52a40d52f78..44af11c0fdae425c7c1f23a09c3823744acd0aea 100644 (file)
@@ -349,7 +349,7 @@ size_t __init boot_fdt_info(const void *fdt, paddr_t paddr)
     return fdt_totalsize(fdt);
 }
 
-const char *boot_fdt_cmdline(const void *fdt)
+const __init char *boot_fdt_cmdline(const void *fdt)
 {
     int node;
     const struct fdt_property *prop;
index 97a118293bcb73899e5a28d4cd5b4e3898c28cb9..adf88e7bdcf8b025671f2fda31157f201ac8a9c2 100644 (file)
@@ -1,5 +1,6 @@
 #include <xen/cpu.h>
 #include <xen/cpumask.h>
+#include <xen/init.h>
 #include <xen/mm.h>
 #include <xen/sizes.h>
 #include <xen/smp.h>
index a0072c15637a08c179f83ca1a9272cd60e6d6de6..70cd6c1a19ca26efccb3d20c46788be19c03ae44 100644 (file)
@@ -19,6 +19,7 @@
 
 #include <asm/device.h>
 #include <xen/errno.h>
+#include <xen/init.h>
 #include <xen/lib.h>
 
 extern const struct device_desc _sdevice[], _edevice[];
index a93121f43bdecc6bc70e780d0987fe4fca10d88c..d23cb8e76e66303051b24476902c876d11f3f949 100644 (file)
@@ -19,6 +19,7 @@
 
 
 #include <xen/types.h>
+#include <xen/init.h>
 #include <xen/mm.h>
 #include <xen/smp.h>
 #include <asm/cpufeature.h>
index c183b6bb6e1d6927ace1f47e1e458cba50cbf6e1..feec4fb0ac4a44bcdcc182a00a7e8167df6030d8 100644 (file)
@@ -23,7 +23,6 @@
 #ifndef _ASM_ARM_ACPI_H
 #define _ASM_ARM_ACPI_H
 
-#include <xen/init.h>
 #include <asm/page.h>
 #include <asm/setup.h>
 
@@ -43,9 +42,9 @@ typedef enum {
     TBL_MMAX,
 } EFI_MEM_RES;
 
-bool __init acpi_psci_present(void);
-bool __init acpi_psci_hvc_present(void);
-void __init acpi_smp_init_cpus(void);
+bool acpi_psci_present(void);
+bool acpi_psci_hvc_present(void);
+void acpi_smp_init_cpus(void);
 
 /*
  * This function returns the offset of a given ACPI/EFI table in the allocated
index 9b4b02811b60dac96161cd9de5605c59832c8480..dedb6dd00166d6bec9c9f54a66e576dc18d50952 100644 (file)
@@ -7,7 +7,6 @@
 
 #ifndef __ASSEMBLY__
 
-#include <xen/init.h>
 #include <xen/types.h>
 #include <xen/stringify.h>
 
@@ -28,7 +27,7 @@ typedef void (*alternative_cb_t)(const struct alt_instr *alt,
                                 const uint32_t *origptr, uint32_t *updptr,
                                 int nr_inst);
 
-void __init apply_alternatives_all(void);
+void apply_alternatives_all(void);
 int apply_alternatives(const struct alt_instr *start, const struct alt_instr *end);
 
 #define ALTINSTR_ENTRY(feature, cb)                                          \
index 6734ae8efd35fce94df25cd37acd27729bb29024..63a0f3631d88302f0ed75de996679e4d01f473ba 100644 (file)
@@ -1,8 +1,6 @@
 #ifndef __ASM_ARM_DEVICE_H
 #define __ASM_ARM_DEVICE_H
 
-#include <xen/init.h>
-
 enum device_type
 {
     DEV_DT,
@@ -68,8 +66,8 @@ struct acpi_device_desc {
  *
  *  Return 0 on success.
  */
-int __init acpi_device_init(enum device_class class,
-                            const void *data, int class_type);
+int acpi_device_init(enum device_class class,
+                     const void *data, int class_type);
 
 /**
  *  device_init - Initialize a device
@@ -79,8 +77,8 @@ int __init acpi_device_init(enum device_class class,
  *
  *  Return 0 on success.
  */
-int __init device_init(struct dt_device_node *dev, enum device_class class,
-                       const void *data);
+int device_init(struct dt_device_node *dev, enum device_class class,
+                const void *data);
 
 /**
  * device_get_type - Get the type of the device
index f6df32f860fc94eb976fbb2d092b122315766a6a..90cd011d3537c1718cf954f82188ac46353110c0 100644 (file)
@@ -24,9 +24,9 @@ struct arch_iommu
 #define iommu_use_hap_pt(d) (has_iommu_pt(d))
 
 const struct iommu_ops *iommu_get_ops(void);
-void __init iommu_set_ops(const struct iommu_ops *ops);
+void iommu_set_ops(const struct iommu_ops *ops);
 
-int __init iommu_hardware_setup(void);
+int iommu_hardware_setup(void);
 
 #endif /* __ARCH_ARM_IOMMU_H__ */
 
index 2591d7bb03de655a0a8acd5ee100e0d6fd270b33..bf9258156c4324798aa96a26b49d8913ff72eb22 100644 (file)
@@ -1,7 +1,6 @@
 #ifndef __ASM_ARM_PLATFORM_H
 #define __ASM_ARM_PLATFORM_H
 
-#include <xen/init.h>
 #include <xen/sched.h>
 #include <xen/mm.h>
 #include <xen/device_tree.h>
@@ -46,9 +45,9 @@ struct platform_desc {
  */
 #define PLATFORM_QUIRK_GIC_64K_STRIDE (1 << 0)
 
-void __init platform_init(void);
-int __init platform_init_time(void);
-int __init platform_specific_mapping(struct domain *d);
+void platform_init(void);
+int platform_init_time(void);
+int platform_specific_mapping(struct domain *d);
 #ifdef CONFIG_ARM_32
 int platform_smp_init(void);
 int platform_cpu_up(int cpu);
index 0cc3330807bc0da0beafda484441a07258e24c5a..5f41ba0cbae01e3b3cc9017c737ffa50b01b6ebc 100644 (file)
@@ -74,14 +74,14 @@ void discard_initial_modules(void);
 void dt_unreserved_regions(paddr_t s, paddr_t e,
                            void (*cb)(paddr_t, paddr_t), int first);
 
-size_t __init boot_fdt_info(const void *fdt, paddr_t paddr);
-const char __init *boot_fdt_cmdline(const void *fdt);
+size_t boot_fdt_info(const void *fdt, paddr_t paddr);
+const char *boot_fdt_cmdline(const void *fdt);
 
 struct bootmodule *add_boot_module(bootmodule_kind kind,
                                    paddr_t start, paddr_t size,
                                    const char *cmdline);
 struct bootmodule *boot_module_find_by_kind(bootmodule_kind kind);
-const char * __init boot_module_kind_as_string(bootmodule_kind kind);
+const char *boot_module_kind_as_string(bootmodule_kind kind);
 
 #endif
 /*
index 91fa0b6f6185a9d8b70d1b4f808c22283654cdeb..7408a6c48ca92a3960cf40b0f5f99d9ae5baf118 100644 (file)
@@ -15,7 +15,6 @@
 #include <public/xen.h>
 #include <public/device_tree_defs.h>
 #include <xen/kernel.h>
-#include <xen/init.h>
 #include <xen/string.h>
 #include <xen/types.h>
 #include <xen/list.h>
@@ -169,7 +168,7 @@ int device_tree_for_each_node(const void *fdt,
  * Create a hierarchical device tree for the host DTB to be able
  * to retrieve parents.
  */
-void __init dt_unflatten_host_device_tree(void);
+void dt_unflatten_host_device_tree(void);
 
 /**
  * IRQ translation callback
@@ -204,7 +203,7 @@ extern const struct dt_device_node *dt_interrupt_controller;
  *
  * If found, return the interrupt controller device node.
  */
-struct dt_device_node * __init
+struct dt_device_node *
 dt_find_interrupt_controller(const struct dt_device_match *matches);
 
 #define dt_prop_cmp(s1, s2) strcmp((s1), (s2))