diff options
author | Nick Child <nick.child@ibm.com> | 2021-12-17 01:00:26 +0300 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2021-12-23 14:33:15 +0300 |
commit | e5913db1ef22817e128f0a794752f7393205e00b (patch) | |
tree | bec2dbb62dbf968f3614006f3fc2919019ce34bd /arch/powerpc/platforms/powernv/opal-core.c | |
parent | b346f57100e9417f23ee9051f0efe621a492be96 (diff) | |
download | linux-e5913db1ef22817e128f0a794752f7393205e00b.tar.xz |
powerpc/powernv: Add __init attribute to eligible functions
Some functions defined in 'arch/powerpc/platforms/powernv' are
deserving of an `__init` macro attribute. These functions are only
called by other initialization functions and therefore should inherit
the attribute.
Also, change function declarations in header files to include `__init`.
Signed-off-by: Nick Child <nick.child@ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20211216220035.605465-12-nick.child@ibm.com
Diffstat (limited to 'arch/powerpc/platforms/powernv/opal-core.c')
-rw-r--r-- | arch/powerpc/platforms/powernv/opal-core.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/powerpc/platforms/powernv/opal-core.c b/arch/powerpc/platforms/powernv/opal-core.c index 5b9736bbc2aa..0331f1973f0e 100644 --- a/arch/powerpc/platforms/powernv/opal-core.c +++ b/arch/powerpc/platforms/powernv/opal-core.c @@ -89,7 +89,7 @@ static inline int is_opalcore_usable(void) return (oc_conf && oc_conf->opalcorebuf != NULL) ? 1 : 0; } -static Elf64_Word *append_elf64_note(Elf64_Word *buf, char *name, +static Elf64_Word *__init append_elf64_note(Elf64_Word *buf, char *name, u32 type, void *data, size_t data_len) { @@ -108,7 +108,7 @@ static Elf64_Word *append_elf64_note(Elf64_Word *buf, char *name, return buf; } -static void fill_prstatus(struct elf_prstatus *prstatus, int pir, +static void __init fill_prstatus(struct elf_prstatus *prstatus, int pir, struct pt_regs *regs) { memset(prstatus, 0, sizeof(struct elf_prstatus)); @@ -134,7 +134,7 @@ static void fill_prstatus(struct elf_prstatus *prstatus, int pir, } } -static Elf64_Word *auxv_to_elf64_notes(Elf64_Word *buf, +static Elf64_Word *__init auxv_to_elf64_notes(Elf64_Word *buf, u64 opal_boot_entry) { Elf64_Off *bufp = (Elf64_Off *)oc_conf->auxv_buf; |