All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Julien Grall <julien.grall@linaro.org>, xen-devel@lists.xenproject.org
Cc: tim@xen.org, stefano.stabellini@citrix.com, ian.campbell@citrix.com
Subject: Re: [PATCH 1/6] arm/setup: Add missing __init to add_boot_module
Date: Fri, 16 Jan 2015 16:28:59 +0000	[thread overview]
Message-ID: <54B93C4B.9050709@citrix.com> (raw)
In-Reply-To: <1421425248-8727-2-git-send-email-julien.grall@linaro.org>

On 16/01/15 16:20, Julien Grall wrote:
> add_boot_module is calling a function which lies in the init section.
> Furthermore, it's only used during Xen boot.
>
> Signed-off-by: Julien Grall <julien.grall@linaro.org>
> ---
>  xen/arch/arm/setup.c        | 6 +++---
>  xen/include/asm-arm/setup.h | 8 ++++----
>  2 files changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/xen/arch/arm/setup.c b/xen/arch/arm/setup.c
> index f49569d..5fc27ce0 100644
> --- a/xen/arch/arm/setup.c
> +++ b/xen/arch/arm/setup.c
> @@ -185,9 +185,9 @@ static void dt_unreserved_regions(paddr_t s, paddr_t e,
>      cb(s, e);
>  }
>  
> -struct bootmodule *add_boot_module(bootmodule_kind kind,
> -                                   paddr_t start, paddr_t size,
> -                                   const char *cmdline)
> +struct bootmodule __init *add_boot_module(bootmodule_kind kind,

__init should be after the type, rather than spliced into the middle of it.

"struct bootmodule * __init add_boot_module(...)" should work.

However, only static functions should be annotated at the definition. 
non-static functions can get their annotation from the declaration alone.

> +                                          paddr_t start, paddr_t size,
> +                                          const char *cmdline)
>  {
>      struct bootmodules *mods = &bootinfo.modules;
>      struct bootmodule *mod;
> diff --git a/xen/include/asm-arm/setup.h b/xen/include/asm-arm/setup.h
> index ba5a67d..ed2ba16 100644
> --- a/xen/include/asm-arm/setup.h
> +++ b/xen/include/asm-arm/setup.h
> @@ -60,10 +60,10 @@ void discard_initial_modules(void);
>  size_t __init boot_fdt_info(const void *fdt, paddr_t paddr);
>  const char __init *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);
> +struct bootmodule __init *add_boot_module(bootmodule_kind kind,
> +                                          paddr_t start, paddr_t size,
> +                                          const char *cmdline);
> +struct bootmodule __init *boot_module_find_by_kind(bootmodule_kind kind);
>  const char * __init boot_module_kind_as_string(bootmodule_kind kind);
>  
>  #endif

  reply	other threads:[~2015-01-16 16:29 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-16 16:20 [PATCH 0/6] xen/arm: Move in/out code to/from init section Julien Grall
2015-01-16 16:20 ` [PATCH 1/6] arm/setup: Add missing __init to add_boot_module Julien Grall
2015-01-16 16:28   ` Andrew Cooper [this message]
2015-01-16 16:33     ` Julien Grall
2015-01-16 16:20 ` [PATCH 2/6] xen/arm: domain_build: Move all DOM0 building code in init section Julien Grall
2015-01-16 16:20 ` [PATCH 3/6] xen/arm: kernel: Move kernel loading " Julien Grall
2015-01-16 17:33   ` Vitaly Kuznetsov
2015-01-16 17:49     ` Julien Grall
2015-01-19 10:31       ` Ian Campbell
2015-01-16 16:20 ` [PATCH 4/6] xen/arm: device: Move device_type " Julien Grall
2015-01-16 16:20 ` [PATCH 5/6] xen/arm: platforms: Move init_time and specific_mapping " Julien Grall
2015-01-16 16:20 ` [PATCH 6/6] xen/arm: SMP: Move out of the init section the code to bring up a CPU Julien Grall
2015-01-29 18:32 ` [PATCH 0/6] xen/arm: Move in/out code to/from init section Julien Grall
2015-01-30 11:30   ` Ian Campbell
2015-01-30 11:33     ` Julien Grall
2015-02-02 10:58       ` Ian Campbell
2015-02-02 11:15         ` Jan Beulich
2015-02-02 12:52           ` Julien Grall
2015-02-02 13:12             ` Jan Beulich
2015-02-02 13:34               ` Julien Grall
2015-02-02 12:48         ` Julien Grall
2015-02-02 13:03           ` Ian Campbell

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=54B93C4B.9050709@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=ian.campbell@citrix.com \
    --cc=julien.grall@linaro.org \
    --cc=stefano.stabellini@citrix.com \
    --cc=tim@xen.org \
    --cc=xen-devel@lists.xenproject.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.