[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080501001522.GB10542@colo.lackof.org>
Date: Wed, 30 Apr 2008 18:15:22 -0600
From: Grant Grundler <grundler@...isc-linux.org>
To: Jeff Garzik <jgarzik@...ox.com>
Cc: Grant Grundler <grundler@...isc-linux.org>, netdev@...r.kernel.org,
gao changli <xiaosuo@...il.com>
Subject: Re: [PATCH] unify the macro get_u16 in the file tulip.h
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 <xiaosuo@...il.com>
Acked-by: Grant Grundler <grundler@...isc-linux.org>
Jeff,
please apply. Depends on other patches that define le16_to_cpu().
grant
> ---
>
> 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;
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists