[PATCH] net/fddi:change HWM_REVERSE() macro

Subsystems: networking drivers, the rest

STALE4013d

10 messages, 3 authors, 2015-08-11 · open the first message on its own page

[PATCH] net/fddi:change HWM_REVERSE() macro

From: yalin wang <hidden>
Date: 2015-08-10 16:14:52

change HWM_REVERSE() macro to generic le32_to_cpu()

Signed-off-by: yalin wang <redacted>
---
 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

Re: [PATCH] net/fddi:change HWM_REVERSE() macro

From: Joe Perches <joe@perches.com>
Date: 2015-08-10 16:36:34

On Tue, 2015-08-11 at 00:14 +0800, yalin wang wrote:
HWM_REVERSE
Is unused and it would be better if removed.

Re: [PATCH] net/fddi:change HWM_REVERSE() macro

From: yalin wang <hidden>
Date: 2015-08-11 01:40:53

On Aug 11, 2015, at 00:36, Joe Perches [off-list ref] wrote:

On Tue, 2015-08-11 at 00:14 +0800, yalin wang wrote:
quoted
HWM_REVERSE
Is unused and it would be better if removed.
ok,  i will send V2 patch .

[PATCH v2] net/fddi: remove HWM_REVERSE() macro

From: yalin wang <hidden>
Date: 2015-08-11 01:57:28

 HWM_REVERSE() macro is unused, remove it.

Signed-off-by: yalin wang <redacted>
---
 drivers/net/fddi/skfp/h/hwmtm.h | 10 ----------
 1 file changed, 10 deletions(-)
diff --git a/drivers/net/fddi/skfp/h/hwmtm.h b/drivers/net/fddi/skfp/h/hwmtm.h
index 5924d42..4ca2341 100644
--- a/drivers/net/fddi/skfp/h/hwmtm.h
+++ b/drivers/net/fddi/skfp/h/hwmtm.h
@@ -74,15 +74,6 @@
 #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 C_INDIC                (1L<<25)
 #define A_INDIC                (1L<<26)
 #define        RD_FS_LOCAL     0x80
-- 
1.9.1

Re: [PATCH v2] net/fddi: remove HWM_REVERSE() macro

From: David Miller <davem@davemloft.net>
Date: 2015-08-11 04:24:17

From: yalin wang <redacted>
Date: Tue, 11 Aug 2015 09:57:21 +0800
 HWM_REVERSE() macro is unused, remove it.

Signed-off-by: yalin wang <redacted>
Your email client has corrupted this patch.

Please read Documentation/email-clients.txt, send a test patch to yourself,
and only resubmit this change once you are able to successfully apply the
patch you receive in that test email.

Thanks.

Re: [PATCH v2] net/fddi: remove HWM_REVERSE() macro

From: yalin wang <hidden>
Date: 2015-08-11 05:06:31

On Aug 11, 2015, at 12:24, David Miller [off-list ref] wrote:

From: yalin wang <redacted>
Date: Tue, 11 Aug 2015 09:57:21 +0800
quoted
HWM_REVERSE() macro is unused, remove it.

Signed-off-by: yalin wang <redacted>
Your email client has corrupted this patch.

Please read Documentation/email-clients.txt, send a test patch to yourself,
and only resubmit this change once you are able to successfully apply the
patch you receive in that test email.

Thanks.
ok, Thanks.

[PATCH v2 Resend] net/fddi: remove HWM_REVERSE() macro

From: yalin wang <hidden>
Date: 2015-08-11 05:11:27

HWM_REVERSE() macro is unused, remove it.

Signed-off-by: yalin wang <redacted>
---
drivers/net/fddi/skfp/h/hwmtm.h | 10 ----------
1 file changed, 10 deletions(-)
diff --git a/drivers/net/fddi/skfp/h/hwmtm.h b/drivers/net/fddi/skfp/h/hwmtm.h
index 5924d42..4ca2341 100644
--- a/drivers/net/fddi/skfp/h/hwmtm.h
+++ b/drivers/net/fddi/skfp/h/hwmtm.h
@@ -74,15 +74,6 @@
#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 C_INDIC                (1L<<25)
#define A_INDIC                (1L<<26)
#define        RD_FS_LOCAL     0x80
-- 
1.9.1

Re: [PATCH v2 Resend] net/fddi: remove HWM_REVERSE() macro

From: David Miller <davem@davemloft.net>
Date: 2015-08-11 05:37:52

From: yalin wang <redacted>
Date: Tue, 11 Aug 2015 13:11:22 +0800
HWM_REVERSE() macro is unused, remove it.

Signed-off-by: yalin wang <redacted>
You did not do as I asked you to, this patch is still corrupted
and there is no way you successfully applied what is in this patch.
-#define        HWM_REVERSE(x)          ((((x)<<24L)&0xff000000L)       +       \
-                                (((x)<< 8L)&0x00ff0000L)       +       \
-                                (((x)>> 8L)&0x0000ff00L)       +       \
-                                (((x)>>24L)&0x000000ffL))
This indentation here is spaces, whereas in the source files they
are TABS.

Your email client did this.

If you fail to properly verify that your outgoing patches are not
corrupted before submitting them here, I will stop reviewing and
considering your changes.

Thank you.

Re: [PATCH v2 Resend] net/fddi: remove HWM_REVERSE() macro

From: yalin wang <hidden>
Date: 2015-08-11 05:51:01

On Aug 11, 2015, at 13:37, David Miller [off-list ref] wrote:

From: yalin wang <redacted>
Date: Tue, 11 Aug 2015 13:11:22 +0800
quoted
HWM_REVERSE() macro is unused, remove it.

Signed-off-by: yalin wang <redacted>
You did not do as I asked you to, this patch is still corrupted
and there is no way you successfully applied what is in this patch.
quoted
-#define        HWM_REVERSE(x)          ((((x)<<24L)&0xff000000L)       +       \
-                                (((x)<< 8L)&0x00ff0000L)       +       \
-                                (((x)>> 8L)&0x0000ff00L)       +       \
-                                (((x)>>24L)&0x000000ffL))
This indentation here is spaces, whereas in the source files they
are TABS.

Your email client did this.

If you fail to properly verify that your outgoing patches are not
corrupted before submitting them here, I will stop reviewing and
considering your changes.

Thank you.
ouch,  i am sorry that i am sending from windows PC,
let me check that .
Sorry for that .

Re: [PATCH v2 Resend] net/fddi: remove HWM_REVERSE() macro

From: yalin wang <hidden>
Date: 2015-08-11 06:57:15

HWM_REVERSE() macro is unused, remove it.

Signed-off-by: yalin wang <redacted>
---
 drivers/net/fddi/skfp/h/hwmtm.h | 9 ---------
 1 file changed, 9 deletions(-)
diff --git a/drivers/net/fddi/skfp/h/hwmtm.h b/drivers/net/fddi/skfp/h/hwmtm.h
index 5924d42..4ca2341 100644
--- a/drivers/net/fddi/skfp/h/hwmtm.h
+++ b/drivers/net/fddi/skfp/h/hwmtm.h
@@ -74,15 +74,6 @@
 #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 C_INDIC		(1L<<25)
 #define A_INDIC		(1L<<26)
 #define	RD_FS_LOCAL	0x80
-- 
1.9.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help