1 May 2008 02:15
Re: [PATCH] unify the macro get_u16 in the file tulip.h
Grant Grundler <grundler <at> parisc-linux.org>
2008-05-01 00:15:22 GMT
2008-05-01 00:15:22 GMT
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 <at> gmail.com> Acked-by: Grant Grundler <grundler <at> parisc-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 > <at> <at> -299,11 +299,7 <at> <at> > > #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)) >(Continue reading)
RSS Feed