mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
mm: avoid section mismatch warning for memblock_type_name
Following section mismatch warning is thrown during build;
WARNING: vmlinux.o(.text+0x32408f): Section mismatch in reference from the function memblock_type_name() to the variable .meminit.data:memblock
The function memblock_type_name() references
the variable __meminitdata memblock.
This is often because memblock_type_name lacks a __meminitdata
annotation or the annotation of memblock is wrong.
This is because memblock_type_name makes reference to memblock variable
with attribute __meminitdata. Hence, the warning (even if the function is
inline).
[[email protected]: remove inline]
Signed-off-by: Raghavendra D Prabhu <[email protected]>
Cc: Tejun Heo <[email protected]>
Cc: Benjamin Herrenschmidt <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
3e648ebe07
commit
c22331166b
1 changed files with 2 additions and 1 deletions
|
|
@ -41,7 +41,8 @@ static int memblock_memory_in_slab __initdata_memblock = 0;
|
|||
static int memblock_reserved_in_slab __initdata_memblock = 0;
|
||||
|
||||
/* inline so we don't get a warning when pr_debug is compiled out */
|
||||
static inline const char *memblock_type_name(struct memblock_type *type)
|
||||
static __init_memblock const char *
|
||||
memblock_type_name(struct memblock_type *type)
|
||||
{
|
||||
if (type == &memblock.memory)
|
||||
return "memory";
|
||||
|
|
|
|||
Loading…
Reference in a new issue