On Thu, May 01, 2008 at 01:34:38AM +0800, gao changli wrote:
Unify the macro get_u16 with le16_to_cpu.
Signed-off-by: Changli Gao <redacted>
Acked-by: Grant Grundler <redacted>
Jeff,
please apply. Depends on other patches that define le16_to_cpu().
grant
quoted hunk
---
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;
On Wed, 2008-04-30 at 18:15 -0600, Grant Grundler wrote:
On Thu, May 01, 2008 at 01:34:38AM +0800, gao changli wrote:
quoted
Unify the macro get_u16 with le16_to_cpu.
Signed-off-by: Changli Gao <redacted>
Acked-by: Grant Grundler <redacted>
please apply. Depends on other patches that define le16_to_cpu().
Wouldn't it be better to remove get_u16 altogether
and use le16_to_cpu or __le16_to_cpup directly?
On Wed, Apr 30, 2008 at 05:43:49PM -0700, Joe Perches wrote:
On Wed, 2008-04-30 at 18:15 -0600, Grant Grundler wrote:
quoted
On Thu, May 01, 2008 at 01:34:38AM +0800, gao changli wrote:
quoted
Unify the macro get_u16 with le16_to_cpu.
Signed-off-by: Changli Gao <redacted>
Acked-by: Grant Grundler <redacted>
please apply. Depends on other patches that define le16_to_cpu().
Wouldn't it be better to remove get_u16 altogether
and use le16_to_cpu or __le16_to_cpup directly?
Yes, it would be. But Changli's patch was an improvement in reducing
nested macros across several drivers and he was trying to minimize
churn with that patchset.
Can you please submit a patch that removes get_u16()?
thanks,
grant