Patchwork [U-Boot] tegra2: fix warning: "assert" redefined

login
register
mail settings
Submitter Wolfgang Denk
Date Sept. 10, 2011, 2:19 p.m.
Message ID <1315664363-3979-1-git-send-email-wd@denx.de>
Download mbox | patch
Permalink /patch/114166/
State Accepted
Commit 3aa7782ac4fa78a159479060495c469cbf0c5a84
Headers show

Comments

Wolfgang Denk - Sept. 10, 2011, 2:19 p.m.
Commit 21726a7 "Add assert() for debug assertions" caused build
warnings for all tegra2 based boards:

clock.c:36:1: warning: "assert" redefined
In file included from clock.c:29:
include/common.h:144:1: warning: this is the location of the previous definition

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Simon Glass <sjg@chromium.org>
---
 arch/arm/cpu/armv7/tegra2/clock.c |    8 --------
 1 files changed, 0 insertions(+), 8 deletions(-)
Wolfgang Denk - Sept. 10, 2011, 8:44 p.m.
Dear Wolfgang Denk,

In message <1315664363-3979-1-git-send-email-wd@denx.de> you wrote:
> Commit 21726a7 "Add assert() for debug assertions" caused build
> warnings for all tegra2 based boards:
> 
> clock.c:36:1: warning: "assert" redefined
> In file included from clock.c:29:
> include/common.h:144:1: warning: this is the location of the previous definition
> 
> Signed-off-by: Wolfgang Denk <wd@denx.de>
> Cc: Simon Glass <sjg@chromium.org>
> ---
>  arch/arm/cpu/armv7/tegra2/clock.c |    8 --------
>  1 files changed, 0 insertions(+), 8 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk
Simon Glass - Sept. 12, 2011, 4:39 a.m.
Hi Wolfgang,

On Sat, Sep 10, 2011 at 1:44 PM, Wolfgang Denk <wd@denx.de> wrote:
> Dear Wolfgang Denk,
>
> In message <1315664363-3979-1-git-send-email-wd@denx.de> you wrote:
>> Commit 21726a7 "Add assert() for debug assertions" caused build
>> warnings for all tegra2 based boards:
>>
>> clock.c:36:1: warning: "assert" redefined
>> In file included from clock.c:29:
>> include/common.h:144:1: warning: this is the location of the previous definition

Thanks again. The patch set I just sent out modifies the assert() in
this file, but I will remove it in V2.

Regards,
Simon

>>
>> Signed-off-by: Wolfgang Denk <wd@denx.de>
>> Cc: Simon Glass <sjg@chromium.org>
>> ---
>>  arch/arm/cpu/armv7/tegra2/clock.c |    8 --------
>>  1 files changed, 0 insertions(+), 8 deletions(-)
>
> Applied, thanks.
>
> Best regards,
>
> Wolfgang Denk
>
> --
> DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
> Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
> "More software projects have gone awry for lack of calendar time than
> for all other causes combined."
>                         - Fred Brooks, Jr., _The Mythical Man Month_
>

Patch

diff --git a/arch/arm/cpu/armv7/tegra2/clock.c b/arch/arm/cpu/armv7/tegra2/clock.c
index 67eed14..0aaed7d 100644
--- a/arch/arm/cpu/armv7/tegra2/clock.c
+++ b/arch/arm/cpu/armv7/tegra2/clock.c
@@ -28,14 +28,6 @@ 
 #include <asm/arch/tegra2.h>
 #include <common.h>
 
-#ifdef DEBUG
-#define assert(x)	\
-	({ if (!(x)) printf("Assertion failure '%s' %s line %d\n", \
-		#x, __FILE__, __LINE__); })
-#else
-#define assert(x)
-#endif
-
 /*
  * Get the oscillator frequency, from the corresponding hardware configuration
  * field.