[3.16.y-ckt stable] Patch "memory-hotplug: Remove "weak" from memory_block_size_bytes() declaration" has been added to staging queue

Luis Henriques luis.henriques at canonical.com
Mon Nov 24 15:07:21 UTC 2014


This is a note to let you know that I have just added a patch titled

    memory-hotplug: Remove "weak" from memory_block_size_bytes() declaration

to the linux-3.16.y-queue branch of the 3.16.y-ckt extended stable tree 
which can be found at:

 http://kernel.ubuntu.com/git?p=ubuntu/linux.git;a=shortlog;h=refs/heads/linux-3.16.y-queue

This patch is scheduled to be released in version 3.16.7-ckt2.

If you, or anyone else, feels it should not be added to this tree, please 
reply to this email.

For more information about the 3.16.y-ckt tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable

Thanks.
-Luis

------

>From f66a55f6d2da029a167072a6b219885a59ab60d2 Mon Sep 17 00:00:00 2001
From: Bjorn Helgaas <bhelgaas at google.com>
Date: Mon, 13 Oct 2014 19:00:47 -0600
Subject: memory-hotplug: Remove "weak" from memory_block_size_bytes()
 declaration

commit e0a8400c6923a163265d52798cdd4c33f3f8ab5a upstream.

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 10629d711ed7 ("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: 41f107266b19 ("drivers: base: Add prototype declaration to the header file")
Signed-off-by: Bjorn Helgaas <bhelgaas at google.com>
Acked-by: Andrew Morton <akpm at linux-foundation.org>
CC: Rashika Kheria <rashika.kheria at gmail.com>
CC: Nathan Fontenot <nfont at austin.ibm.com>
CC: Anton Blanchard <anton at au1.ibm.com>
CC: Heiko Carstens <heiko.carstens at de.ibm.com>
CC: Yinghai Lu <yinghai at kernel.org>
Signed-off-by: Luis Henriques <luis.henriques at canonical.com>
---
 include/linux/memory.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/memory.h b/include/linux/memory.h
index bb7384e3c3d8..8b8d8d12348e 100644
--- a/include/linux/memory.h
+++ b/include/linux/memory.h
@@ -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 */
--
2.1.0





More information about the kernel-team mailing list