diff options
author | Mark Rutland <mark.rutland@arm.com> | 2015-07-28 10:31:06 +0100 |
---|---|---|
committer | Will Deacon <will.deacon@arm.com> | 2015-07-28 11:36:09 +0100 |
commit | c53e0baa6f34b7051790e0fba9d782ec4efe58bd (patch) | |
tree | 7ee36175192ad8ee5270665e856d9a0157d6d2ad /arch | |
parent | 6f883d10a18b971a3646303d12ef75138dfd31f9 (diff) | |
download | linux-stable-c53e0baa6f34b7051790e0fba9d782ec4efe58bd.tar.gz linux-stable-c53e0baa6f34b7051790e0fba9d782ec4efe58bd.tar.bz2 linux-stable-c53e0baa6f34b7051790e0fba9d782ec4efe58bd.zip |
arm64: mm: mark create_mapping as __init
Currently create_mapping is marked with __ref, apparently because it
refers to early_alloc. However, create_mapping has no logic to prevent
erroneous use of early_alloc after it has been freed, and is only ever
called by __init functions anyway. Thus the __ref marker is misleading
and unnecessary.
Instead, this patch marks create_mapping as __init, resulting in
warnings if it is used from a a non __init functions, and allowing its
memory to be reclaimed.
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm64/mm/mmu.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm64/mm/mmu.c b/arch/arm64/mm/mmu.c index 63012fed46fc..9211b8527f25 100644 --- a/arch/arm64/mm/mmu.c +++ b/arch/arm64/mm/mmu.c @@ -267,7 +267,7 @@ static void *late_alloc(unsigned long size) return ptr; } -static void __ref create_mapping(phys_addr_t phys, unsigned long virt, +static void __init create_mapping(phys_addr_t phys, unsigned long virt, phys_addr_t size, pgprot_t prot) { if (virt < VMALLOC_START) { |