* [PATCH] net/fddi:change HWM_REVERSE() macro
@ 2015-08-10 16:14 yalin wang
2015-08-10 16:36 ` Joe Perches
0 siblings, 1 reply; 10+ messages in thread
From: yalin wang @ 2015-08-10 16:14 UTC (permalink / raw)
To: netdev, open list
change HWM_REVERSE() macro to generic le32_to_cpu()
Signed-off-by: yalin wang <yalin.wang2010@gmail.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
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH] net/fddi:change HWM_REVERSE() macro
2015-08-10 16:14 [PATCH] net/fddi:change HWM_REVERSE() macro yalin wang
@ 2015-08-10 16:36 ` Joe Perches
2015-08-11 1:40 ` yalin wang
0 siblings, 1 reply; 10+ messages in thread
From: Joe Perches @ 2015-08-10 16:36 UTC (permalink / raw)
To: yalin wang; +Cc: netdev, open list
On Tue, 2015-08-11 at 00:14 +0800, yalin wang wrote:
> HWM_REVERSE
Is unused and it would be better if removed.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] net/fddi:change HWM_REVERSE() macro
2015-08-10 16:36 ` Joe Perches
@ 2015-08-11 1:40 ` yalin wang
2015-08-11 1:57 ` [PATCH v2] net/fddi: remove " yalin wang
0 siblings, 1 reply; 10+ messages in thread
From: yalin wang @ 2015-08-11 1:40 UTC (permalink / raw)
To: Joe Perches; +Cc: netdev, open list
> On Aug 11, 2015, at 00:36, Joe Perches <joe@perches.com> wrote:
>
> On Tue, 2015-08-11 at 00:14 +0800, yalin wang wrote:
>> HWM_REVERSE
>
> Is unused and it would be better if removed.
>
ok, i will send V2 patch .
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH v2] net/fddi: remove HWM_REVERSE() macro
2015-08-11 1:40 ` yalin wang
@ 2015-08-11 1:57 ` yalin wang
2015-08-11 4:24 ` David Miller
2015-08-11 5:11 ` [PATCH v2 Resend] " yalin wang
0 siblings, 2 replies; 10+ messages in thread
From: yalin wang @ 2015-08-11 1:57 UTC (permalink / raw)
To: Joe Perches; +Cc: netdev, open list
HWM_REVERSE() macro is unused, remove it.
Signed-off-by: yalin wang <yalin.wang2010@gmail.com>
---
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
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH v2] net/fddi: remove HWM_REVERSE() macro
2015-08-11 1:57 ` [PATCH v2] net/fddi: remove " yalin wang
@ 2015-08-11 4:24 ` David Miller
2015-08-11 5:06 ` yalin wang
2015-08-11 5:11 ` [PATCH v2 Resend] " yalin wang
1 sibling, 1 reply; 10+ messages in thread
From: David Miller @ 2015-08-11 4:24 UTC (permalink / raw)
To: yalin.wang2010; +Cc: joe, netdev, linux-kernel
From: yalin wang <yalin.wang2010@gmail.com>
Date: Tue, 11 Aug 2015 09:57:21 +0800
> HWM_REVERSE() macro is unused, remove it.
>
> Signed-off-by: yalin wang <yalin.wang2010@gmail.com>
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.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v2] net/fddi: remove HWM_REVERSE() macro
2015-08-11 4:24 ` David Miller
@ 2015-08-11 5:06 ` yalin wang
0 siblings, 0 replies; 10+ messages in thread
From: yalin wang @ 2015-08-11 5:06 UTC (permalink / raw)
To: David Miller; +Cc: joe, netdev, linux-kernel
> On Aug 11, 2015, at 12:24, David Miller <davem@davemloft.net> wrote:
>
> From: yalin wang <yalin.wang2010@gmail.com>
> Date: Tue, 11 Aug 2015 09:57:21 +0800
>
>> HWM_REVERSE() macro is unused, remove it.
>>
>> Signed-off-by: yalin wang <yalin.wang2010@gmail.com>
>
> 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.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH v2 Resend] net/fddi: remove HWM_REVERSE() macro
2015-08-11 1:57 ` [PATCH v2] net/fddi: remove " yalin wang
2015-08-11 4:24 ` David Miller
@ 2015-08-11 5:11 ` yalin wang
2015-08-11 5:37 ` David Miller
1 sibling, 1 reply; 10+ messages in thread
From: yalin wang @ 2015-08-11 5:11 UTC (permalink / raw)
To: Joe Perches, netdev, open list, David Miller
HWM_REVERSE() macro is unused, remove it.
Signed-off-by: yalin wang <yalin.wang2010@gmail.com>
---
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
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH v2 Resend] net/fddi: remove HWM_REVERSE() macro
2015-08-11 5:11 ` [PATCH v2 Resend] " yalin wang
@ 2015-08-11 5:37 ` David Miller
2015-08-11 5:50 ` yalin wang
0 siblings, 1 reply; 10+ messages in thread
From: David Miller @ 2015-08-11 5:37 UTC (permalink / raw)
To: yalin.wang2010; +Cc: joe, netdev, linux-kernel
From: yalin wang <yalin.wang2010@gmail.com>
Date: Tue, 11 Aug 2015 13:11:22 +0800
> HWM_REVERSE() macro is unused, remove it.
>
> Signed-off-by: yalin wang <yalin.wang2010@gmail.com>
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.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v2 Resend] net/fddi: remove HWM_REVERSE() macro
2015-08-11 5:37 ` David Miller
@ 2015-08-11 5:50 ` yalin wang
2015-08-11 6:57 ` yalin wang
0 siblings, 1 reply; 10+ messages in thread
From: yalin wang @ 2015-08-11 5:50 UTC (permalink / raw)
To: David Miller; +Cc: joe, netdev, linux-kernel
> On Aug 11, 2015, at 13:37, David Miller <davem@davemloft.net> wrote:
>
> From: yalin wang <yalin.wang2010@gmail.com>
> Date: Tue, 11 Aug 2015 13:11:22 +0800
>
>> HWM_REVERSE() macro is unused, remove it.
>>
>> Signed-off-by: yalin wang <yalin.wang2010@gmail.com>
>
> 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.
ouch, i am sorry that i am sending from windows PC,
let me check that .
Sorry for that .
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v2 Resend] net/fddi: remove HWM_REVERSE() macro
2015-08-11 5:50 ` yalin wang
@ 2015-08-11 6:57 ` yalin wang
0 siblings, 0 replies; 10+ messages in thread
From: yalin wang @ 2015-08-11 6:57 UTC (permalink / raw)
To: David Miller; +Cc: joe, netdev, linux-kernel
HWM_REVERSE() macro is unused, remove it.
Signed-off-by: yalin wang <yalin.wang2010@gmail.com>
---
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
^ permalink raw reply related [flat|nested] 10+ messages in thread
end of thread, other threads:[~2015-08-11 6:57 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-10 16:14 [PATCH] net/fddi:change HWM_REVERSE() macro yalin wang
2015-08-10 16:36 ` Joe Perches
2015-08-11 1:40 ` yalin wang
2015-08-11 1:57 ` [PATCH v2] net/fddi: remove " yalin wang
2015-08-11 4:24 ` David Miller
2015-08-11 5:06 ` yalin wang
2015-08-11 5:11 ` [PATCH v2 Resend] " yalin wang
2015-08-11 5:37 ` David Miller
2015-08-11 5:50 ` yalin wang
2015-08-11 6:57 ` yalin wang
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).