login
Header Space

 
 

[PATCH] unify the macro get_u16 in the file tulip.h

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Grant Grundler <grundler@...>
Cc: <netdev@...>
Date: Wednesday, April 30, 2008 - 1:41 pm

Unify the macro get_u16 with le16_to_cpu.

Signed-off-by: Changli Gao <xiaosuo@gmail.com>
---

  tulip.h |    6 +-----
  1 file changed, 1 insertion(+), 5 deletions(-)

--- linux/drivers/net/tulip/tulip.h	2008-04-30 23:25:24.000000000 +0800
+++ linux-new/drivers/net/tulip/tulip.h	2008-04-30 23:28:04.000000000  
+0800
@@ -299,11 +299,7 @@

  #define RUN_AT(x) (jiffies + (x))

-#if defined(__i386__)			/* AKA get_unaligned() */
-#define get_u16(ptr) (*(u16 *)(ptr))
-#else
-#define get_u16(ptr) (((u8*)(ptr))[0] + (((u8*)(ptr))[1]<<8))
-#endif
+#define get_u16(ptr) le16_to_cpu(*(u16*)(ptr))

  struct medialeaf {
  	u8 type;
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] unify the macro get_u16 in the file tulip.h, gao changli, (Wed Apr 30, 1:41 pm)
speck-geostationary