[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <6AE77A24-5AC5-47E4-8B9F-9BCDE0C6A8F9@gmail.com>
Date: Tue, 11 Aug 2015 00:14:06 +0800
From: yalin wang <yalin.wang2010@...il.com>
To: netdev@...r.kernel.org, open list <linux-kernel@...r.kernel.org>
Subject: [PATCH] net/fddi:change HWM_REVERSE() macro
change HWM_REVERSE() macro to generic le32_to_cpu()
Signed-off-by: yalin wang <yalin.wang2010@...il.com>
---
drivers/net/fddi/skfp/h/hwmtm.h | 11 ++---------
1 file changed, 2 insertions(+), 9 deletions(-)
diff --git a/drivers/net/fddi/skfp/h/hwmtm.h b/drivers/net/fddi/skfp/h/hwmtm.h
index 5924d42..72701ef 100644
--- a/drivers/net/fddi/skfp/h/hwmtm.h
+++ b/drivers/net/fddi/skfp/h/hwmtm.h
@@ -14,7 +14,7 @@
#ifndef _HWM_
#define _HWM_
-
+#include <linux/byteorder/generic.h>
#include "mbuf.h"
/*
@@ -74,14 +74,7 @@
#define NULL 0
#endif
-#ifdef LITTLE_ENDIAN
-#define HWM_REVERSE(x) (x)
-#else
-#define HWM_REVERSE(x) ((((x)<<24L)&0xff000000L) + \
- (((x)<< 8L)&0x00ff0000L) + \
- (((x)>> 8L)&0x0000ff00L) + \
- (((x)>>24L)&0x000000ffL))
-#endif
+#define HWM_REVERSE(x) le32_to_cpu(x)
#define C_INDIC (1L<<25)
#define A_INDIC (1L<<26)
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists