2015-08-10 16:14:52

by yalin wang

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

change HWM_REVERSE() macro to generic le32_to_cpu()

Signed-off-by: yalin wang <[email protected]>
---
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



2015-08-10 16:36:34

by Joe Perches

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

On Tue, 2015-08-11 at 00:14 +0800, yalin wang wrote:
> HWM_REVERSE

Is unused and it would be better if removed.

2015-08-11 01:40:53

by yalin wang

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


> On Aug 11, 2015, at 00:36, Joe Perches <[email protected]> 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 .

2015-08-11 01:57:28

by yalin wang

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

HWM_REVERSE() macro is unused, remove it.

Signed-off-by: yalin wang <[email protected]>
---
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

2015-08-11 04:24:17

by David Miller

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

From: yalin wang <[email protected]>
Date: Tue, 11 Aug 2015 09:57:21 +0800

> HWM_REVERSE() macro is unused, remove it.
>
> Signed-off-by: yalin wang <[email protected]>

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.

2015-08-11 05:06:31

by yalin wang

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


> On Aug 11, 2015, at 12:24, David Miller <[email protected]> wrote:
>
> From: yalin wang <[email protected]>
> Date: Tue, 11 Aug 2015 09:57:21 +0800
>
>> HWM_REVERSE() macro is unused, remove it.
>>
>> Signed-off-by: yalin wang <[email protected]>
>
> 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.