From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [PATCH 1/6] arm/setup: Add missing __init to add_boot_module Date: Fri, 16 Jan 2015 16:33:33 +0000 Message-ID: <54B93D5D.7070808@linaro.org> References: <1421425248-8727-1-git-send-email-julien.grall@linaro.org> <1421425248-8727-2-git-send-email-julien.grall@linaro.org> <54B93C4B.9050709@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1YC9qV-0000E2-79 for xen-devel@lists.xenproject.org; Fri, 16 Jan 2015 16:34:03 +0000 Received: by mail-wg0-f41.google.com with SMTP id l18so21514437wgh.0 for ; Fri, 16 Jan 2015 08:34:01 -0800 (PST) In-Reply-To: <54B93C4B.9050709@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Andrew Cooper , xen-devel@lists.xenproject.org Cc: tim@xen.org, stefano.stabellini@citrix.com, ian.campbell@citrix.com List-Id: xen-devel@lists.xenproject.org On 16/01/15 16:28, Andrew Cooper wrote: > 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 >> --- >> 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. Ok. > "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. It's useful for documentation purpose... You directly know this function should be only used during Xen boot time. Regards, -- Julien Grall