Patchwork [U-Boot] lib:lmb: use __weak

login
register
mail settings
Submitter Jeroen Hofstee
Date June 26, 2014, 6:04 p.m.
Message ID <1403805877-1554-1-git-send-email-jeroen@myspectrum.nl>
Download mbox | patch
Permalink /patch/364630/
State Accepted
Delegated to: Tom Rini
Headers show

Comments

Jeroen Hofstee - June 26, 2014, 6:04 p.m.
This not only looks a bit better it also prevents a
warning with W=1 (no previous prototype).

Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
---
 lib/lmb.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
Tom Rini - July 21, 2014, 8:42 p.m.
On Thu, Jun 26, 2014 at 08:04:37PM +0200, Jeroen Hofstee wrote:

> This not only looks a bit better it also prevents a
> warning with W=1 (no previous prototype).
> 
> Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>

Applied to u-boot/master, thanks!

Patch

diff --git a/lib/lmb.c b/lib/lmb.c
index 081e418..49a3c9e 100644
--- a/lib/lmb.c
+++ b/lib/lmb.c
@@ -332,14 +332,12 @@  int lmb_is_reserved(struct lmb *lmb, phys_addr_t addr)
 	return 0;
 }
 
-void __board_lmb_reserve(struct lmb *lmb)
+__weak void board_lmb_reserve(struct lmb *lmb)
 {
 	/* please define platform specific board_lmb_reserve() */
 }
-void board_lmb_reserve(struct lmb *lmb) __attribute__((weak, alias("__board_lmb_reserve")));
 
-void __arch_lmb_reserve(struct lmb *lmb)
+__weak void arch_lmb_reserve(struct lmb *lmb)
 {
 	/* please define platform specific arch_lmb_reserve() */
 }
-void arch_lmb_reserve(struct lmb *lmb) __attribute__((weak, alias("__arch_lmb_reserve")));