[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 1/6] arm/setup: Add missing __init to add_boot_module
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@xxxxxxxxxx> > --- > 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 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |