Skip to contentSkip to conversation

net/tulip/dmfe.c: fix inline compile errors

PATCH New Adrian Bunk 1 participant 1 message Jul 14, 2004 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/tulip/dmfe.c: fix inline compile errors

Trying to compile drivers/net/tulip/dmfe.c in 2.6.8-rc1-mm1 using gcc 3.4 results in the following compile error:

<-- snip -->

...
CC drivers/net/tulip/dmfe.o
drivers/net/tulip/dmfe.c: In function `dmfe_rx_packet':
drivers/net/tulip/dmfe.c:323: sorry, unimplemented: inlining failed in call to 'cal_CRC': function body not available drivers/net/tulip/dmfe.c:936: sorry, unimplemented: called from here make[3]: *** [drivers/net/tulip/dmfe.o] Error 1

<-- snip -->

The patch below moves an inlined function above the place where it is called the first time.

diffstat output:

 drivers/net/tulip/dmfe.c |   30 +++++++++++++++---------------
 1 files changed, 15 insertions(+), 15 deletions(-)
drivers/net/tulip/dmfe.c renamed from drivers/net/tulip/dmfe.c.old +15 -15
@@ -314,13 +314,13 @@
 static u8 dmfe_sense_speed(struct dmfe_board_info *);
 static void dmfe_process_mode(struct dmfe_board_info *);
 static void dmfe_timer(unsigned long);
+static inline u32 cal_CRC(unsigned char *, unsigned int, u8);
 static void dmfe_rx_packet(struct DEVICE *, struct dmfe_board_info *);
 static void dmfe_free_tx_pkt(struct DEVICE *, struct dmfe_board_info *);
 static void dmfe_reuse_skb(struct dmfe_board_info *, struct sk_buff *);
 static void dmfe_dynamic_reset(struct DEVICE *);
 static void dmfe_free_rxbuffer(struct dmfe_board_info *);
 static void dmfe_init_dm910x(struct DEVICE *);
-static inline u32 cal_CRC(unsigned char *, unsigned int, u8);
 static void dmfe_parse_srom(struct dmfe_board_info *);
 static void dmfe_program_DM9801(struct dmfe_board_info *, int);
 static void dmfe_program_DM9802(struct dmfe_board_info *);
@@ -885,6 +885,20 @@
 
 
 /*
+ *	Calculate the CRC valude of the Rx packet
+ *	flag = 	1 : return the reverse CRC (for the received packet CRC)
+ *		0 : return the normal CRC (for Hash Table index)
+ */
+
+static inline u32 cal_CRC(unsigned char * Data, unsigned int Len, u8 flag)
+{
+	u32 crc = crc32(~0, Data, Len);
+	if (flag) crc = ~crc;
+	return crc;
+}
+
+
+/*
  *	Receive the come packet and pass to upper layer
  */
 
@@ -1774,20 +1788,6 @@
 
 
 /*
- *	Calculate the CRC valude of the Rx packet
- *	flag = 	1 : return the reverse CRC (for the received packet CRC)
- *		0 : return the normal CRC (for Hash Table index)
- */
-
-static inline u32 cal_CRC(unsigned char * Data, unsigned int Len, u8 flag)
-{
-	u32 crc = crc32(~0, Data, Len);
-	if (flag) crc = ~crc;
-	return crc;
-}
-
-
-/*
  *	Parser SROM and media mode
  */