Skip to contentSkip to conversation

net: Fix faulty definition of uec_initialize()

PATCH New Joakim Tjernlund 3 participants 8 messages Aug 9, 2010 – Aug 31, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: Fix faulty definition of uec_initialize()

The correct definition is in drivers/qe/uec.h so just include that one instead.

---

This is only compile tested on my board but hopefully it will do. If not, I urge Freescale to clean up this mess.

 include/netdev.h |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)
include/netdev.h +1 -3
index 882642a..0873baf 100644
@@ -83,12 +83,10 @@ int skge_initialize(bd_t *bis);
 int smc911x_initialize(u8 dev_num, int base_addr);
 int smc91111_initialize(u8 dev_num, int base_addr);
 int tsi108_eth_initialize(bd_t *bis);
-int uec_initialize(int index);
-int uec_standard_init(bd_t *bis);
 int uli526x_initialize(bd_t *bis);
 int sh_eth_initialize(bd_t *bis);
 int dm9000_initialize(bd_t *bis);
-
+#include "../drivers/qe/uec.h"
 /* Boards with PCI network controllers can call this from their board_eth_init()
  * function to initialize whatever's on board.
  * Return value is total # of devices found */
Signature · 1 line
1.7.1
#1 lore raw

PATCH 1/1 net: Fix faulty definition of uec_initialize()

Quoted 2 lines · Joakim Tjernlund

The correct definition is in drivers/qe/uec.h so just include that one instead.

... except that bleeds a ton of crap from uec.h into the global namespace for everyone. better would be to move the prototype out of uec.h and into netdev.h and make sure uec.h includes netdev.h. -mike

#2 lore raw

PATCH 1/1 net: Fix faulty definition of uec_initialize()

Quoted 8 lines · Mike Frysinger
Quoted 2 lines · Joakim Tjernlund

The correct definition is in drivers/qe/uec.h so just include that one instead.

... except that bleeds a ton of crap from uec.h into the global namespace for everyone. better would be to move the prototype out of uec.h and into netdev.h and make sure uec.h includes netdev.h. -mike
_______

Agreed. Please find a way to have UEC-related stuff only on boards that care about it.

regards,
Ben

#3 lore raw

PATCH 1/1 net: Fix faulty definition of uec_initialize()

Ben Warren <[email protected]> wrote on 2010/08/09 22:54:10:

Quoted 8 lines · Mike Frysinger
Quoted 6 lines · Joakim Tjernlund
Quoted 2 lines

The correct definition is in drivers/qe/uec.h so just include that one instead.

... except that bleeds a ton of crap from uec.h into the global namespace for everyone. better would be to move the prototype out of uec.h and into netdev.h and make sure uec.h includes netdev.h.

hmm, then the public include file for UEC users become "../drivers/uec.h" while every one else uses netdev.h, doesn't seem the right way go

BTW, UEC users needs the macro STD_UEC_INFO() too.

Quoted 4 lines
Quoted 2 lines

-mike
_______

Agreed. Please find a way to have UEC-related stuff only on boards that care about it.

OK, but I will let Freescale sort this out. I just wanted to fix the compile breakage I noticed while upgrading my board to latest u-boot(still in progress)

#4 lore raw

PATCH 1/1 net: Fix faulty definition of uec_initialize()

Quoted 11 lines · Joakim Tjernlund

Ben Warren wrote on 2010/08/09 22:54:10:

Quoted 7 lines
Quoted 6 lines · Mike Frysinger
Quoted 2 lines · Joakim Tjernlund

The correct definition is in drivers/qe/uec.h so just include that one instead.

... except that bleeds a ton of crap from uec.h into the global namespace for everyone. ?better would be to move the prototype out of uec.h and into netdev.h and make sure uec.h includes netdev.h.

hmm, then the public include file for UEC users become "../drivers/uec.h" while every one else uses netdev.h, doesn't seem the right way go

which isnt uncommon today. simply grep the tree for "include.*drivers/net/". while i agree it isnt exactly a great idea, there is no clean standard today in u-boot for drivers to expose their internals to random consumers. some drivers dump their header files into include/, so personally, i prefer the include ../driver/net/.. style over that.

Quoted 1 line

BTW, UEC users needs the macro STD_UEC_INFO() too.

emphasis on "UEC users" and not "everyone".
-mike

#5 lore raw

PATCH 1/1 net: Fix faulty definition of uec_initialize()

vapierfilter at gmail.com wrote on 2010/08/10 08:04:02:

Quoted 14 lines · Joakim Tjernlund
Quoted 11 lines

Ben Warren wrote on 2010/08/09 22:54:10:

Quoted 7 lines
Quoted 6 lines · Mike Frysinger
Quoted 2 lines · Joakim Tjernlund

The correct definition is in drivers/qe/uec.h so just include that one instead.

... except that bleeds a ton of crap from uec.h into the global namespace for everyone. ?better would be to move the prototype out of uec.h and into netdev.h and make sure uec.h includes netdev.h.

hmm, then the public include file for UEC users become "../drivers/uec.h" while every one else uses netdev.h, doesn't seem the right way go

Quoted 6 lines

which isnt uncommon today. simply grep the tree for "include.*drivers/net/". while i agree it isnt exactly a great idea, there is no clean standard today in u-boot for drivers to expose their internals to random consumers. some drivers dump their header files into include/, so personally, i prefer the include ../driver/net/.. style over that.

I see, but that defeats the purpose of netdev.h I think. Oh well, just gonna have to live with that then.

Jocke

#6 lore raw

PATCH v2 1/1 net: Fix faulty definition of uec_initialize()

In reply to Ben Warren

The correct definition is in drivers/qe/uec.h so just remove this one.

---
 include/netdev.h |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)
include/netdev.h +0 -1
index 882642a..65833e2 100644
@@ -83,7 +83,6 @@ int skge_initialize(bd_t *bis);
 int smc911x_initialize(u8 dev_num, int base_addr);
 int smc91111_initialize(u8 dev_num, int base_addr);
 int tsi108_eth_initialize(bd_t *bis);
-int uec_initialize(int index);
 int uec_standard_init(bd_t *bis);
 int uli526x_initialize(bd_t *bis);
 int sh_eth_initialize(bd_t *bis);
Signature · 1 line
1.7.1
Applied
#7 lore raw

PATCH v2 1/1 net: Fix faulty definition of uec_initialize()

Hi Jocke,

Quoted 13 lines · Joakim Tjernlund

The correct definition is in drivers/qe/uec.h so just remove this one.

---
  include/netdev.h |    1 -
  1 files changed, 0 insertions(+), 1 deletions(-)
include/netdev.h +0 -0
index 882642a..65833e2 100644

include/netdev.h int skge_initialize(bd_t *bis); · line 88

Quoted 7 lines
include/netdev.h +0 -1
@@ -83,7 +83,6 @@ int skge_initialize(bd_t *bis);
  int smc911x_initialize(u8 dev_num, int base_addr);
  int smc91111_initialize(u8 dev_num, int base_addr);
  int tsi108_eth_initialize(bd_t *bis);
-int uec_initialize(int index);
  int uec_standard_init(bd_t *bis);
  int uli526x_initialize(bd_t *bis);
  int sh_eth_initialize(bd_t *bis);

Applied to net/next

regards,
Ben