Patchwork [U-Boot] LMB: Fix undefined lmb_reserve() on non-lmb platforms

login
register
mail settings
Submitter Marek Vasut
Date April 1, 2012, 1:59 p.m.
Message ID <1333288786-10296-1-git-send-email-marex@denx.de>
Download mbox | patch
Permalink /patch/149924/
State Accepted
Commit f4cdde40195078a9183a0e29f741dac31ea3d425
Delegated to: Marek Vasut
Headers show

Comments

Marek Vasut - April 1, 2012, 1:59 p.m.
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Mike Frysinger <vapier@gentoo.org>
Cc: Stephen Warren <swarren@nvidia.com>
Cc: Tom Warren <TWarren@nvidia.com>
Cc: Graeme Russ <graeme.russ@gmail.com>
---
 common/cmd_bootm.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
Marek Vasut - April 1, 2012, 2:03 p.m.
Dear Marek Vasut,

> Signed-off-by: Marek Vasut <marex@denx.de>
> Cc: Wolfgang Denk <wd@denx.de>
> Cc: Mike Frysinger <vapier@gentoo.org>
> Cc: Stephen Warren <swarren@nvidia.com>
> Cc: Tom Warren <TWarren@nvidia.com>
> Cc: Graeme Russ <graeme.russ@gmail.com>
> ---
>  common/cmd_bootm.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c
> index 9ad2535..5685232 100644
> --- a/common/cmd_bootm.c
> +++ b/common/cmd_bootm.c
> @@ -186,6 +186,7 @@ static void boot_start_lmb(bootm_headers_t *images)
>  	board_lmb_reserve(&images->lmb);
>  }
>  #else
> +#define lmb_reserve(lmb, base, size)

Though I have to admit, this is compiler-rape. It's again depending on the fact 
that preprocessor will remove this altogether and compiler then won't use any of 
the variables :-(

>  static inline void boot_start_lmb(bootm_headers_t *images) { }
>  #endif

Best regards,
Marek Vasut
Mike Frysinger - April 1, 2012, 7:24 p.m.
Acked-by: Mike Frysinger <vapier@gentoo.org>
-mike
Wolfgang Denk - April 9, 2012, 2:53 p.m.
Dear Marek Vasut,

In message <1333288786-10296-1-git-send-email-marex@denx.de> you wrote:
> Signed-off-by: Marek Vasut <marex@denx.de>
> Cc: Wolfgang Denk <wd@denx.de>
> Cc: Mike Frysinger <vapier@gentoo.org>
> Cc: Stephen Warren <swarren@nvidia.com>
> Cc: Tom Warren <TWarren@nvidia.com>
> Cc: Graeme Russ <graeme.russ@gmail.com>
> ---
>  common/cmd_bootm.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

Patch

diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c
index 9ad2535..5685232 100644
--- a/common/cmd_bootm.c
+++ b/common/cmd_bootm.c
@@ -186,6 +186,7 @@  static void boot_start_lmb(bootm_headers_t *images)
 	board_lmb_reserve(&images->lmb);
 }
 #else
+#define lmb_reserve(lmb, base, size)
 static inline void boot_start_lmb(bootm_headers_t *images) { }
 #endif