public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot-Users] MPC8610HPCD build warnings
@ 2008-04-29 15:25 Wolfgang Denk
  2008-04-30 11:34 ` [U-Boot-Users] [PATCH] Fix warnings while compiling net/net.c for MPC8610HPCD board Anatolij Gustschin
  0 siblings, 1 reply; 9+ messages in thread
From: Wolfgang Denk @ 2008-04-29 15:25 UTC (permalink / raw)
  To: u-boot

To whom it may concern...

...the MPC8610HPCD board is throwing a couple of warnings for net.c -
note that this is the only (PowerPC) board  that  does  this,  so  it
seems to be some special feature of this board:

Configuring for MPC8610HPCD board...
net.c: In function 'PingHandler':
net.c:770: warning: passing argument 1 of 'NetReadIP' discards qualifiers from pointer target type
net.c: In function 'NetSetIP':
net.c:1694: warning: passing argument 1 of 'NetCopyIP' discards qualifiers from pointer target type
net.c:1695: warning: passing argument 1 of 'NetCopyIP' discards qualifiers from pointer target type
net.c: In function 'PingSend':
net.c:736: warning: passing argument 1 of 'NetCopyIP' discards qualifiers from pointer target type
net.c:737: warning: passing argument 1 of 'NetCopyIP' discards qualifiers from pointer target type


Unfortunately the board is not even listed in the  MAINTAINERS  file,
so I don't know who should take care of this...

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 at denx.de
A wise person makes his  own  decisions,  a  weak  one  obeys  public
opinion.                                           -- Chinese proverb

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot-Users] [PATCH] Fix warnings while compiling net/net.c for MPC8610HPCD board
  2008-04-29 15:25 [U-Boot-Users] MPC8610HPCD build warnings Wolfgang Denk
@ 2008-04-30 11:34 ` Anatolij Gustschin
  2008-04-30 14:24   ` Kumar Gala
                     ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Anatolij Gustschin @ 2008-04-30 11:34 UTC (permalink / raw)
  To: u-boot

MPC8610HPCD board adds -O2 gcc option to PLATFORM_CPPFLAGS
causing overriding default -Os option. New gcc (ver. 4.2.2)
produces warnings while compiling net/net.c file with -O2
option. The patch is an attempt to fix this.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
---
 include/net.h |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/include/net.h b/include/net.h
index f6decdc..9a2f03f 100644
--- a/include/net.h
+++ b/include/net.h
@@ -412,10 +412,10 @@ extern void	print_IPaddr (IPaddr_t);
  * footprint in our tests.
  */
 /* return IP *in network byteorder* */
-static inline IPaddr_t NetReadIP(void *from)
+static inline IPaddr_t NetReadIP(volatile void *from)
 {
 	IPaddr_t ip;
-	memcpy((void*)&ip, from, sizeof(ip));
+	memcpy((void*)&ip, (void*)from, sizeof(ip));
 	return ip;
 }
 
@@ -434,9 +434,9 @@ static inline void NetWriteIP(void *to, IPaddr_t ip)
 }
 
 /* copy IP */
-static inline void NetCopyIP(void *to, void *from)
+static inline void NetCopyIP(volatile void *to, void *from)
 {
-	memcpy(to, from, sizeof(IPaddr_t));
+	memcpy((void*)to, from, sizeof(IPaddr_t));
 }
 
 /* copy ulong */
-- 
1.5.3.3

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [U-Boot-Users] [PATCH] Fix warnings while compiling net/net.c for MPC8610HPCD board
  2008-04-30 11:34 ` [U-Boot-Users] [PATCH] Fix warnings while compiling net/net.c for MPC8610HPCD board Anatolij Gustschin
@ 2008-04-30 14:24   ` Kumar Gala
  2008-04-30 14:39     ` Anatolij Gustschin
  2008-04-30 15:13     ` Timur Tabi
  2008-04-30 15:38   ` Scott Wood
  2008-04-30 20:31   ` Wolfgang Denk
  2 siblings, 2 replies; 9+ messages in thread
From: Kumar Gala @ 2008-04-30 14:24 UTC (permalink / raw)
  To: u-boot


On Apr 30, 2008, at 6:34 AM, Anatolij Gustschin wrote:
> MPC8610HPCD board adds -O2 gcc option to PLATFORM_CPPFLAGS
> causing overriding default -Os option. New gcc (ver. 4.2.2)
> produces warnings while compiling net/net.c file with -O2
> option. The patch is an attempt to fix this.

nothing against this patch, but should we change MPC8610HPCD to use - 
Os like everyone else?

- k

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot-Users] [PATCH] Fix warnings while compiling net/net.c for MPC8610HPCD board
  2008-04-30 14:24   ` Kumar Gala
@ 2008-04-30 14:39     ` Anatolij Gustschin
  2008-04-30 15:13     ` Timur Tabi
  1 sibling, 0 replies; 9+ messages in thread
From: Anatolij Gustschin @ 2008-04-30 14:39 UTC (permalink / raw)
  To: u-boot

Kumar Gala wrote:
> 
> On Apr 30, 2008, at 6:34 AM, Anatolij Gustschin wrote:
>> MPC8610HPCD board adds -O2 gcc option to PLATFORM_CPPFLAGS
>> causing overriding default -Os option. New gcc (ver. 4.2.2)
>> produces warnings while compiling net/net.c file with -O2
>> option. The patch is an attempt to fix this.
> 
> nothing against this patch, but should we change MPC8610HPCD to use -Os
> like everyone else?

if there is no special reason for using -O2 with MPC8610HPCD,
then it should be changed to use -Os.

Anatolij

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot-Users] [PATCH] Fix warnings while compiling net/net.c for MPC8610HPCD board
  2008-04-30 14:24   ` Kumar Gala
  2008-04-30 14:39     ` Anatolij Gustschin
@ 2008-04-30 15:13     ` Timur Tabi
  2008-04-30 18:13       ` Jon Loeliger
  1 sibling, 1 reply; 9+ messages in thread
From: Timur Tabi @ 2008-04-30 15:13 UTC (permalink / raw)
  To: u-boot

Kumar Gala wrote:

> nothing against this patch, but should we change MPC8610HPCD to use - 
> Os like everyone else?

Beats me.  git-blame points to Jon, so he'll have to tell you where the original
config.mk came from.

I dropped the -O2 and it still builds fine, but we don't have any 8610's
currently to test it on.

-- 
Timur Tabi
Linux kernel developer at Freescale

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot-Users] [PATCH] Fix warnings while compiling net/net.c for MPC8610HPCD board
  2008-04-30 11:34 ` [U-Boot-Users] [PATCH] Fix warnings while compiling net/net.c for MPC8610HPCD board Anatolij Gustschin
  2008-04-30 14:24   ` Kumar Gala
@ 2008-04-30 15:38   ` Scott Wood
  2008-04-30 20:31   ` Wolfgang Denk
  2 siblings, 0 replies; 9+ messages in thread
From: Scott Wood @ 2008-04-30 15:38 UTC (permalink / raw)
  To: u-boot

On Wed, Apr 30, 2008 at 01:34:40PM +0200, Anatolij Gustschin wrote:
> diff --git a/include/net.h b/include/net.h
> index f6decdc..9a2f03f 100644
> --- a/include/net.h
> +++ b/include/net.h
> @@ -412,10 +412,10 @@ extern void	print_IPaddr (IPaddr_t);
>   * footprint in our tests.
>   */
>  /* return IP *in network byteorder* */
> -static inline IPaddr_t NetReadIP(void *from)
> +static inline IPaddr_t NetReadIP(volatile void *from)
>  {
>  	IPaddr_t ip;
> -	memcpy((void*)&ip, from, sizeof(ip));
> +	memcpy((void*)&ip, (void*)from, sizeof(ip));
>  	return ip;
>  }
>  

Maybe we should remove the volatile from the callers instead?

-Scott

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot-Users] [PATCH] Fix warnings while compiling net/net.c for MPC8610HPCD board
  2008-04-30 15:13     ` Timur Tabi
@ 2008-04-30 18:13       ` Jon Loeliger
  2008-04-30 19:19         ` Timur Tabi
  0 siblings, 1 reply; 9+ messages in thread
From: Jon Loeliger @ 2008-04-30 18:13 UTC (permalink / raw)
  To: u-boot

Timur Tabi wrote:
> Kumar Gala wrote:
> 
>> nothing against this patch, but should we change MPC8610HPCD to use - 
>> Os like everyone else?
> 
> Beats me.  git-blame points to Jon, so he'll have to tell you where the original
> config.mk came from.

Bah.  There is, let's see.... exactly one commit for that file:

    % git log board/freescale/mpc8610hpcd/config.mk
    commit 3dd2db53ceb0dff80f25c2a07f83f29b907b403e
    Author: Jon Loeliger <jdl@freescale.com>
    Date:   Tue Oct 16 13:54:01 2007 -0500

        Initial mpc8610hpcd board files.

        Signed-off-by: Ed Swarthout <Ed.Swarthout@freescale.com>
        Signed-off-by: Mahesh Jade <mahesh.jade@freescale.com>
        Signed-off-by: Jason Jin <Jason.jin@freescale.com>
        Signed-off-by: Jon Loeliger <jdl@freescale.com>

So, I'm guessing, it came from the Ed.  That is, it came that way
from the Day One.  So there.

jdl

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot-Users] [PATCH] Fix warnings while compiling net/net.c for MPC8610HPCD board
  2008-04-30 18:13       ` Jon Loeliger
@ 2008-04-30 19:19         ` Timur Tabi
  0 siblings, 0 replies; 9+ messages in thread
From: Timur Tabi @ 2008-04-30 19:19 UTC (permalink / raw)
  To: u-boot

Jon Loeliger wrote:

> So, I'm guessing, it came from the Ed.  That is, it came that way
> from the Day One.  So there.

I just tested it without -O2, and it works fine.  So the -O2 should be removed.

-- 
Timur Tabi
Linux kernel developer at Freescale

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot-Users] [PATCH] Fix warnings while compiling net/net.c for MPC8610HPCD board
  2008-04-30 11:34 ` [U-Boot-Users] [PATCH] Fix warnings while compiling net/net.c for MPC8610HPCD board Anatolij Gustschin
  2008-04-30 14:24   ` Kumar Gala
  2008-04-30 15:38   ` Scott Wood
@ 2008-04-30 20:31   ` Wolfgang Denk
  2 siblings, 0 replies; 9+ messages in thread
From: Wolfgang Denk @ 2008-04-30 20:31 UTC (permalink / raw)
  To: u-boot

In message <1209555280-23311-1-git-send-email-agust@denx.de> you wrote:
> MPC8610HPCD board adds -O2 gcc option to PLATFORM_CPPFLAGS
> causing overriding default -Os option. New gcc (ver. 4.2.2)
> produces warnings while compiling net/net.c file with -O2
> option. The patch is an attempt to fix this.
> 
> Signed-off-by: Anatolij Gustschin <agust@denx.de>
> ---
>  include/net.h |    8 ++++----
>  1 files changed, 4 insertions(+), 4 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 at denx.de
######## This message was made from 100% recycled electrons. ########

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2008-04-30 20:31 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-29 15:25 [U-Boot-Users] MPC8610HPCD build warnings Wolfgang Denk
2008-04-30 11:34 ` [U-Boot-Users] [PATCH] Fix warnings while compiling net/net.c for MPC8610HPCD board Anatolij Gustschin
2008-04-30 14:24   ` Kumar Gala
2008-04-30 14:39     ` Anatolij Gustschin
2008-04-30 15:13     ` Timur Tabi
2008-04-30 18:13       ` Jon Loeliger
2008-04-30 19:19         ` Timur Tabi
2008-04-30 15:38   ` Scott Wood
2008-04-30 20:31   ` Wolfgang Denk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox