All of lore.kernel.org
 help / color / mirror / Atom feed
From: Julien Grall <julien.grall@arm.com>
To: xen-devel@lists.xen.org
Cc: Julien Grall <julien.grall@arm.com>, sstabellini@kernel.org
Subject: [PATCH 03/22] xen/arm: Remove __init from prototype
Date: Thu, 18 Oct 2018 14:20:50 +0100	[thread overview]
Message-ID: <20181018132109.31192-4-julien.grall@arm.com> (raw)
In-Reply-To: <20181018132109.31192-1-julien.grall@arm.com>

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>
---
 xen/arch/arm/acpi/lib.c           |  1 +
 xen/arch/arm/bootfdt.c            |  2 +-
 xen/arch/arm/cpuerrata.c          |  1 +
 xen/arch/arm/device.c             |  1 +
 xen/arch/arm/psci.c               |  1 +
 xen/include/asm-arm/acpi.h        |  7 +++----
 xen/include/asm-arm/alternative.h |  3 +--
 xen/include/asm-arm/device.h      | 10 ++++------
 xen/include/asm-arm/platform.h    |  7 +++----
 xen/include/asm-arm/setup.h       |  6 +++---
 xen/include/xen/device_tree.h     |  5 ++---
 11 files changed, 21 insertions(+), 23 deletions(-)

diff --git a/xen/arch/arm/acpi/lib.c b/xen/arch/arm/acpi/lib.c
index ada5298a38..4fc6e17322 100644
--- a/xen/arch/arm/acpi/lib.c
+++ b/xen/arch/arm/acpi/lib.c
@@ -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)
diff --git a/xen/arch/arm/bootfdt.c b/xen/arch/arm/bootfdt.c
index 8eba42c7b9..44af11c0fd 100644
--- a/xen/arch/arm/bootfdt.c
+++ b/xen/arch/arm/bootfdt.c
@@ -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;
diff --git a/xen/arch/arm/cpuerrata.c b/xen/arch/arm/cpuerrata.c
index 97a118293b..adf88e7bdc 100644
--- a/xen/arch/arm/cpuerrata.c
+++ b/xen/arch/arm/cpuerrata.c
@@ -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>
diff --git a/xen/arch/arm/device.c b/xen/arch/arm/device.c
index a0072c1563..70cd6c1a19 100644
--- a/xen/arch/arm/device.c
+++ b/xen/arch/arm/device.c
@@ -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[];
diff --git a/xen/arch/arm/psci.c b/xen/arch/arm/psci.c
index a93121f43b..d23cb8e76e 100644
--- a/xen/arch/arm/psci.c
+++ b/xen/arch/arm/psci.c
@@ -19,6 +19,7 @@
 
 
 #include <xen/types.h>
+#include <xen/init.h>
 #include <xen/mm.h>
 #include <xen/smp.h>
 #include <asm/cpufeature.h>
diff --git a/xen/include/asm-arm/acpi.h b/xen/include/asm-arm/acpi.h
index c183b6bb6e..feec4fb0ac 100644
--- a/xen/include/asm-arm/acpi.h
+++ b/xen/include/asm-arm/acpi.h
@@ -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
diff --git a/xen/include/asm-arm/alternative.h b/xen/include/asm-arm/alternative.h
index 9b4b02811b..dedb6dd001 100644
--- a/xen/include/asm-arm/alternative.h
+++ b/xen/include/asm-arm/alternative.h
@@ -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)					      \
diff --git a/xen/include/asm-arm/device.h b/xen/include/asm-arm/device.h
index 6734ae8efd..63a0f3631d 100644
--- a/xen/include/asm-arm/device.h
+++ b/xen/include/asm-arm/device.h
@@ -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
diff --git a/xen/include/asm-arm/platform.h b/xen/include/asm-arm/platform.h
index 2591d7bb03..bf9258156c 100644
--- a/xen/include/asm-arm/platform.h
+++ b/xen/include/asm-arm/platform.h
@@ -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);
diff --git a/xen/include/asm-arm/setup.h b/xen/include/asm-arm/setup.h
index 0cc3330807..5f41ba0cba 100644
--- a/xen/include/asm-arm/setup.h
+++ b/xen/include/asm-arm/setup.h
@@ -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
 /*
diff --git a/xen/include/xen/device_tree.h b/xen/include/xen/device_tree.h
index 91fa0b6f61..7408a6c48c 100644
--- a/xen/include/xen/device_tree.h
+++ b/xen/include/xen/device_tree.h
@@ -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))
-- 
2.11.0


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

  parent reply	other threads:[~2018-10-18 13:20 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-18 13:20 [PATCH 00/22] xen/arm: Bunch of clean-ups Julien Grall
2018-10-18 13:20 ` [PATCH 01/22] xen/arm: traps: Constify show_registers parameters Julien Grall
2018-10-24 14:03   ` Andrii Anisov
2018-10-24 14:12     ` Julien Grall
2018-10-18 13:20 ` [PATCH 02/22] xen/arm: regs: Convert guest_mode to a static inline helper Julien Grall
2018-10-24 14:14   ` Andrii Anisov
2018-10-18 13:20 ` Julien Grall [this message]
2018-10-24 14:34   ` [PATCH 03/22] xen/arm: Remove __init from prototype Andrii Anisov
2018-10-18 13:20 ` [PATCH 04/22] xen/arm: bugs: Move do_bug_frame to traps.h Julien Grall
2018-10-24 14:44   ` Andrii Anisov
2018-10-18 13:20 ` [PATCH 05/22] xen/arm: Consolidate CPU identification in cpufeature.{c, h} Julien Grall
2018-10-25 15:16   ` Andrii Anisov
2018-10-18 13:20 ` [PATCH 06/22] xen/arm: Move VABORT_GEN_BY_GUEST to traps.h and turned into inline Julien Grall
2018-10-25 15:32   ` Andrii Anisov
2018-10-18 13:20 ` [PATCH 07/22] xen/arm: gic-3: Remove unused includes Julien Grall
2018-10-25 15:41   ` Andrii Anisov
2018-10-18 13:20 ` [PATCH 08/22] xen/arm: gic-v3: Re-order includes in alphabetical order Julien Grall
2018-10-23 12:52   ` Andrii Anisov
2018-10-23 13:26     ` Julien Grall
2018-10-24  8:34       ` Andrii Anisov
2018-10-25 15:33   ` Andrii Anisov
2018-10-25 16:39   ` Andrii Anisov
2018-10-18 13:20 ` [PATCH 09/22] xen/arm: Move HSR defines in a new header hsr.h Julien Grall
2018-10-25 16:58   ` Andrii Anisov
2018-10-18 13:20 ` [PATCH 10/22] xen/arm: Move SYSREG accessors in sysregs.h Julien Grall
2018-10-25 17:00   ` Andrii Anisov
2018-10-18 13:20 ` [PATCH 11/22] xen/arm: Move out of processor.h traps related variable/function Julien Grall
2018-10-25 17:56   ` Andrii Anisov
2018-10-18 13:20 ` [PATCH 12/22] xen/arm: Only include stringify.h when necessary Julien Grall
2018-10-25 17:01   ` Andrii Anisov
2018-10-18 13:21 ` [PATCH 13/22] xen/arm: Only include vreg.h " Julien Grall
2018-10-25 17:01   ` Andrii Anisov
2018-10-18 13:21 ` [PATCH 14/22] xen/arm: Remove unnecessary includes in asm/vgic.h Julien Grall
2018-10-25 17:02   ` Andrii Anisov
2018-10-18 13:21 ` [PATCH 15/22] xen/arm: Remove unnecessary includes in asm/mmio.h Julien Grall
2018-10-25 17:50   ` Andrii Anisov
2018-10-18 13:21 ` [PATCH 16/22] xen/arm: Remove unnecessary includes in traps.c Julien Grall
2018-10-25 17:50   ` Andrii Anisov
2018-10-18 13:21 ` [PATCH 17/22] xen/arm: Remove unnecessary includes in asm/p2m.h Julien Grall
2018-10-25 17:52   ` Andrii Anisov
2018-10-18 13:21 ` [PATCH 18/22] xen/arm: Remove unnecessary includes in asm-arm/acpi.h Julien Grall
2018-10-25 17:52   ` Andrii Anisov
2018-10-18 13:21 ` [PATCH 19/22] xen/arm: Remove unnecessary include in asm-arm/atomic.h Julien Grall
2018-10-25 17:53   ` Andrii Anisov
2018-10-18 13:21 ` [PATCH 20/22] xen/arm: Remove unnecessary includes in asm/current.h Julien Grall
2018-10-25 17:53   ` Andrii Anisov
2018-10-18 13:21 ` [PATCH 21/22] xen/arm: platform: Don't include p2m.h in exynos5 and omap5 Julien Grall
2018-10-25 17:55   ` Andrii Anisov
2018-10-18 13:21 ` [PATCH 22/22] xen/arm: Move vgic_* helpers from gic.h to vgic.h Julien Grall
2018-10-25 16:55   ` Andrii Anisov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181018132109.31192-4-julien.grall@arm.com \
    --to=julien.grall@arm.com \
    --cc=sstabellini@kernel.org \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.