Skip to content

Commit

Permalink
memory-hotplug: Remove "weak" from memory_block_size_bytes() declaration
Browse files Browse the repository at this point in the history
drivers/base/memory.c provides a default memory_block_size_bytes()
definition explicitly marked "weak".  Several architectures provide their
own definitions intended to override the default, but the "weak" attribute
on the declaration applied to the arch definitions as well, so the linker
chose one based on link order (see 10629d7 ("PCI: Remove __weak
annotation from pcibios_get_phb_of_node decl")).

Remove the "weak" attribute from the declaration so we always prefer a
non-weak definition over the weak one, independent of link order.

Fixes: 41f1072 ("drivers: base: Add prototype declaration to the header file")
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Andrew Morton <akpm@linux-foundation.org>
CC: Rashika Kheria <rashika.kheria@gmail.com>
CC: Nathan Fontenot <nfont@austin.ibm.com>
CC: Anton Blanchard <anton@au1.ibm.com>
CC: Heiko Carstens <heiko.carstens@de.ibm.com>
CC: Yinghai Lu <yinghai@kernel.org>
  • Loading branch information
Bjorn Helgaas committed Oct 22, 2014
1 parent 107bcc6 commit e0a8400
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/linux/memory.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ struct memory_block {
};

int arch_get_memory_phys_device(unsigned long start_pfn);
unsigned long __weak memory_block_size_bytes(void);
unsigned long memory_block_size_bytes(void);

/* These states are exposed to userspace as text strings in sysfs */
#define MEM_ONLINE (1<<0) /* exposed to userspace */
Expand Down

0 comments on commit e0a8400

Please sign in to comment.