All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] davinci_emac.c:*: warning: duplicate `volatile'
@ 2009-08-15 22:42 Wolfgang Denk
  2009-08-16  5:23 ` ksi at koi8.net
  2009-08-17 18:08 ` ksi at koi8.net
  0 siblings, 2 replies; 6+ messages in thread
From: Wolfgang Denk @ 2009-08-15 22:42 UTC (permalink / raw)
  To: u-boot

Dear Sergey,

in include/asm-arm/arch-davinci/emac_defs.h you declare emac_desc with
the "volatile" attribute, but when using it, "volatile" is frequently
added again, resulting in complier warnings like these:

Configuring for davinci_sffsdr board...
davinci_emac.c:82: warning: duplicate `volatile'
davinci_emac.c:83: warning: duplicate `volatile'
davinci_emac.c:84: warning: duplicate `volatile'
davinci_emac.c:85: warning: duplicate `volatile'
davinci_emac.c: In function `davinci_eth_open':
davinci_emac.c:257: warning: duplicate `volatile'
davinci_emac.c: In function `davinci_eth_rcv_packet':
davinci_emac.c:475: warning: duplicate `volatile'
davinci_emac.c:476: warning: duplicate `volatile'
davinci_emac.c:477: warning: duplicate `volatile'
davinci_emac.c:496: warning: duplicate `volatile'


Can you please provide a fix? Thanks in advance.

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
Drawing on my fine command of language, I said nothing.

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

* [U-Boot] davinci_emac.c:*: warning: duplicate `volatile'
  2009-08-15 22:42 [U-Boot] davinci_emac.c:*: warning: duplicate `volatile' Wolfgang Denk
@ 2009-08-16  5:23 ` ksi at koi8.net
  2009-08-17 18:08 ` ksi at koi8.net
  1 sibling, 0 replies; 6+ messages in thread
From: ksi at koi8.net @ 2009-08-16  5:23 UTC (permalink / raw)
  To: u-boot

On Sun, 16 Aug 2009, Wolfgang Denk wrote:

OK, I'll try to fix it tomorrow or Monday, very busy right now...

> Dear Sergey,
> 
> in include/asm-arm/arch-davinci/emac_defs.h you declare emac_desc with
> the "volatile" attribute, but when using it, "volatile" is frequently
> added again, resulting in complier warnings like these:
> 
> Configuring for davinci_sffsdr board...
> davinci_emac.c:82: warning: duplicate `volatile'
> davinci_emac.c:83: warning: duplicate `volatile'
> davinci_emac.c:84: warning: duplicate `volatile'
> davinci_emac.c:85: warning: duplicate `volatile'
> davinci_emac.c: In function `davinci_eth_open':
> davinci_emac.c:257: warning: duplicate `volatile'
> davinci_emac.c: In function `davinci_eth_rcv_packet':
> davinci_emac.c:475: warning: duplicate `volatile'
> davinci_emac.c:476: warning: duplicate `volatile'
> davinci_emac.c:477: warning: duplicate `volatile'
> davinci_emac.c:496: warning: duplicate `volatile'
> 
> 
> Can you please provide a fix? Thanks in advance.
> 
> 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
> Drawing on my fine command of language, I said nothing.
> 

---
******************************************************************
*  KSI at home    KOI8 Net  < >  The impossible we do immediately.  *
*  Las Vegas   NV, USA   < >  Miracles require 24-hour notice.   *
******************************************************************

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

* [U-Boot] davinci_emac.c:*: warning: duplicate `volatile'
  2009-08-15 22:42 [U-Boot] davinci_emac.c:*: warning: duplicate `volatile' Wolfgang Denk
  2009-08-16  5:23 ` ksi at koi8.net
@ 2009-08-17 18:08 ` ksi at koi8.net
  2009-08-17 19:13   ` Wolfgang Denk
  1 sibling, 1 reply; 6+ messages in thread
From: ksi at koi8.net @ 2009-08-17 18:08 UTC (permalink / raw)
  To: u-boot

On Sun, 16 Aug 2009, Wolfgang Denk wrote:

> Dear Sergey,
> 
> in include/asm-arm/arch-davinci/emac_defs.h you declare emac_desc with
> the "volatile" attribute, but when using it, "volatile" is frequently
> added again, resulting in complier warnings like these:
> 
> Configuring for davinci_sffsdr board...
> davinci_emac.c:82: warning: duplicate `volatile'
> davinci_emac.c:83: warning: duplicate `volatile'
> davinci_emac.c:84: warning: duplicate `volatile'
> davinci_emac.c:85: warning: duplicate `volatile'
> davinci_emac.c: In function `davinci_eth_open':
> davinci_emac.c:257: warning: duplicate `volatile'
> davinci_emac.c: In function `davinci_eth_rcv_packet':
> davinci_emac.c:475: warning: duplicate `volatile'
> davinci_emac.c:476: warning: duplicate `volatile'
> davinci_emac.c:477: warning: duplicate `volatile'
> davinci_emac.c:496: warning: duplicate `volatile'
> 
> 
> Can you please provide a fix? Thanks in advance.

Hey,

what compiler do you use? I just compiled all the davinci boards with
GNUEABI GCC 4.4.1 (binutils ver.2.19.1) and I didn't get a single compiler
warning.

There are 2 separate issues but they are not related to the above
description.

First is that it fails to compile with GNUEABI GCC but that is addressed in
your recent arm build patch that works OK.

The second one is that GCC 4.4.1 (don't know about the older ones, don't
have those on my machine now) generates an error for inline weak functions
in lib_arm/board.c (and I think it is totally correct -- what is an inline
weak function?) Here is the failed build log excertpt:

=== Cut ===
board.c:127: error: inline function 'coloured_LED_init' cannot be declared
weak
board.c:129: error: inline function 'red_LED_on' cannot be declared weak
board.c:131: error: inline function 'red_LED_off' cannot be declared weak
board.c:133: error: inline function 'green_LED_on' cannot be declared weak
board.c:135: error: inline function 'green_LED_off' cannot be declared weak
board.c:137: error: inline function 'yellow_LED_on' cannot be declared weak
board.c:139: error: inline function 'yellow_LED_off' cannot be declared weak
board.c:141: error: inline function 'blue_LED_on' cannot be declared weak
board.c:143: error: inline function 'blue_LED_off' cannot be declared weak
make[1]: *** [board.o] Error 1
make[1]: Leaving directory /usr/src/U-Boot/Davinci/u-boot/lib_arm'
make: *** [lib_arm/libarm.a] Error 2
=== Cut ===

Do you want me to send a fix for those? It hardly makes sense, you can do it
yourself by removing "inline" qualifier at those 9 lines but I can send a
patch if you want me to.

As for those "duplicate `volatile'" warnings I don't see them (and have
never seen them before) so I don't know what to fix.

I can send you my build logs off the list if you want.

---
******************************************************************
*  KSI at home    KOI8 Net  < >  The impossible we do immediately.  *
*  Las Vegas   NV, USA   < >  Miracles require 24-hour notice.   *
******************************************************************

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

* [U-Boot] davinci_emac.c:*: warning: duplicate `volatile'
  2009-08-17 18:08 ` ksi at koi8.net
@ 2009-08-17 19:13   ` Wolfgang Denk
  2009-08-17 19:39     ` ksi at koi8.net
  0 siblings, 1 reply; 6+ messages in thread
From: Wolfgang Denk @ 2009-08-17 19:13 UTC (permalink / raw)
  To: u-boot

Dear ksi at koi8.net,

In message <Pine.LNX.4.64ksi.0908171053160.9943@home-gw.koi8.net> you wrote:
> 
> what compiler do you use? I just compiled all the davinci boards with
> GNUEABI GCC 4.4.1 (binutils ver.2.19.1) and I didn't get a single compiler
> warning.

I was playing with old tool chains actually. That was with gcc 3.3.x.

> There are 2 separate issues but they are not related to the above
> description.
> 
> First is that it fails to compile with GNUEABI GCC but that is addressed in
> your recent arm build patch that works OK.

Thanks for the confirmation! Much appreciated. Could you please send
an Ack-by or Tested-by for that patch? Thanks in advance.

> The second one is that GCC 4.4.1 (don't know about the older ones, don't
> have those on my machine now) generates an error for inline weak functions
> in lib_arm/board.c (and I think it is totally correct -- what is an inline
> weak function?) Here is the failed build log excertpt:

A patch for this has been posted some time ago. See
http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/65397/focus=65559

we're just waiting for the ARM custodian to take appropriate action.

> As for those "duplicate `volatile'" warnings I don't see them (and have
> never seen them before) so I don't know what to fix.
> 
> I can send you my build logs off the list if you want.

Well, here is an example - building davinci_schmoogie using ELDK 3.1.1
(gcc version 3.3.3):

davinci_emac.c:82: warning: duplicate `volatile'
davinci_emac.c:83: warning: duplicate `volatile'
davinci_emac.c:84: warning: duplicate `volatile'
davinci_emac.c:85: warning: duplicate `volatile'
davinci_emac.c: In function `davinci_eth_open':
davinci_emac.c:257: warning: duplicate `volatile'
davinci_emac.c: In function `davinci_eth_rcv_packet':
davinci_emac.c:475: warning: duplicate `volatile'
davinci_emac.c:476: warning: duplicate `volatile'
davinci_emac.c:477: warning: duplicate `volatile'
davinci_emac.c:496: warning: duplicate `volatile'



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
Our business is run on trust.  We trust you will pay in advance.

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

* [U-Boot] davinci_emac.c:*: warning: duplicate `volatile'
  2009-08-17 19:13   ` Wolfgang Denk
@ 2009-08-17 19:39     ` ksi at koi8.net
  2009-08-17 20:03       ` Wolfgang Denk
  0 siblings, 1 reply; 6+ messages in thread
From: ksi at koi8.net @ 2009-08-17 19:39 UTC (permalink / raw)
  To: u-boot

On Mon, 17 Aug 2009, Wolfgang Denk wrote:

> Dear ksi at koi8.net,
> 
> In message <Pine.LNX.4.64ksi.0908171053160.9943@home-gw.koi8.net> you wrote:
> > 
> > what compiler do you use? I just compiled all the davinci boards with
> > GNUEABI GCC 4.4.1 (binutils ver.2.19.1) and I didn't get a single compiler
> > warning.
> 
> I was playing with old tool chains actually. That was with gcc 3.3.x.

Ah, that's ancient... I don't think we need to something for this. I betcha
it won't compile at all with something like 2.x.x but who cares? :)

> > There are 2 separate issues but they are not related to the above
> > description.
> > 
> > First is that it fails to compile with GNUEABI GCC but that is addressed in
> > your recent arm build patch that works OK.
> 
> Thanks for the confirmation! Much appreciated. Could you please send
> an Ack-by or Tested-by for that patch? Thanks in advance.

Sure I will.

> > The second one is that GCC 4.4.1 (don't know about the older ones, don't
> > have those on my machine now) generates an error for inline weak functions
> > in lib_arm/board.c (and I think it is totally correct -- what is an inline
> > weak function?) Here is the failed build log excertpt:
> 
> A patch for this has been posted some time ago. See
> http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/65397/focus=65559
> 
> we're just waiting for the ARM custodian to take appropriate action.

OK.

> > As for those "duplicate `volatile'" warnings I don't see them (and have
> > never seen them before) so I don't know what to fix.
> > 
> > I can send you my build logs off the list if you want.
> 
> Well, here is an example - building davinci_schmoogie using ELDK 3.1.1
> (gcc version 3.3.3):
> 
> davinci_emac.c:82: warning: duplicate `volatile'
> davinci_emac.c:83: warning: duplicate `volatile'
> davinci_emac.c:84: warning: duplicate `volatile'
> davinci_emac.c:85: warning: duplicate `volatile'
> davinci_emac.c: In function `davinci_eth_open':
> davinci_emac.c:257: warning: duplicate `volatile'
> davinci_emac.c: In function `davinci_eth_rcv_packet':
> davinci_emac.c:475: warning: duplicate `volatile'
> davinci_emac.c:476: warning: duplicate `volatile'
> davinci_emac.c:477: warning: duplicate `volatile'
> davinci_emac.c:496: warning: duplicate `volatile'

Once again -- I don't think it requires any action. It builds without a
single warning with newer compilers, even with 4.2.x less for 4.4.1...

---
******************************************************************
*  KSI at home    KOI8 Net  < >  The impossible we do immediately.  *
*  Las Vegas   NV, USA   < >  Miracles require 24-hour notice.   *
******************************************************************

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

* [U-Boot] davinci_emac.c:*: warning: duplicate `volatile'
  2009-08-17 19:39     ` ksi at koi8.net
@ 2009-08-17 20:03       ` Wolfgang Denk
  0 siblings, 0 replies; 6+ messages in thread
From: Wolfgang Denk @ 2009-08-17 20:03 UTC (permalink / raw)
  To: u-boot

Dear ksi at koi8.net,

In message <Pine.LNX.4.64ksi.0908171235440.10312@home-gw.koi8.net> you wrote:
>
> > I was playing with old tool chains actually. That was with gcc 3.3.x.
> 
> Ah, that's ancient... I don't think we need to something for this. I betcha
> it won't compile at all with something like 2.x.x but who cares? :)

Indeed gcc 2.95 dies with a "unrecognized option `-MQ'" error message
when attempting to generate the dependencies...

> > Thanks for the confirmation! Much appreciated. Could you please send
> > an Ack-by or Tested-by for that patch? Thanks in advance.
> 
> Sure I will.

Thanks a lot.

...
> > davinci_emac.c:496: warning: duplicate `volatile'
> 
> Once again -- I don't think it requires any action. It builds without a
> single warning with newer compilers, even with 4.2.x less for 4.4.1...

Yes, I know. But I still would like to hush up this gcc 3.x warning,
if possible.

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
You can observe a lot just by watching.                  - Yogi Berra

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

end of thread, other threads:[~2009-08-17 20:03 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-15 22:42 [U-Boot] davinci_emac.c:*: warning: duplicate `volatile' Wolfgang Denk
2009-08-16  5:23 ` ksi at koi8.net
2009-08-17 18:08 ` ksi at koi8.net
2009-08-17 19:13   ` Wolfgang Denk
2009-08-17 19:39     ` ksi at koi8.net
2009-08-17 20:03       ` Wolfgang Denk

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.