Skip to content
This repository has been archived by the owner on Sep 18, 2022. It is now read-only.

Commit

Permalink
of/pdt: fix section mismatch warning
Browse files Browse the repository at this point in the history
Fix the following section mismatch warning - seen when building sparc32:

WARNING: vmlinux.o(.text+0x1ff9c0): Section mismatch in reference from the function kernel_tree_alloc() to the function .init.text:prom_early_alloc()
The function kernel_tree_alloc() references
the function __init prom_early_alloc().
This is often because kernel_tree_alloc lacks a __init
annotation or the annotation of prom_early_alloc is wrong.

prom_early_alloc() is annotated __init, and users of
kernel_tree_alloc() is also annotated __init.
So simply match the annoation of these to fix the warning.

Signed-off-by: Sam Ravnborg <[email protected]>
Cc: Grant Likely <[email protected]>
Acked-by: David S. Miller <[email protected]>
Signed-off-by: Rob Herring <[email protected]>
  • Loading branch information
sravnborg authored and Rob Herring committed Dec 27, 2011
1 parent af71100 commit 75c7184
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/of/pdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ static struct device_node * __init of_pdt_build_tree(struct device_node *parent,
return ret;
}

static void *kernel_tree_alloc(u64 size, u64 align)
static void * __init kernel_tree_alloc(u64 size, u64 align)
{
return prom_early_alloc(size);
}
Expand Down

0 comments on commit 75c7184

Please sign in to comment.