netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] unify the macro get_u16 in the file tulip.h
@ 2008-04-30 17:41 gao changli
  0 siblings, 0 replies; 4+ messages in thread
From: gao changli @ 2008-04-30 17:41 UTC (permalink / raw)
  To: Grant Grundler; +Cc: netdev

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;

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

end of thread, other threads:[~2008-05-02  3:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <93C271C5-550E-406B-AE43-C83419EA0BC6@gmail.com>
2008-05-01  0:15 ` [PATCH] unify the macro get_u16 in the file tulip.h Grant Grundler
2008-05-01  0:43   ` Joe Perches
2008-05-02  3:52     ` Grant Grundler
2008-04-30 17:41 gao changli

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).