[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <1206376543.9265.5.camel@brick>
Date: Mon, 24 Mar 2008 09:35:43 -0700
From: Harvey Harrison <harvey.harrison@...il.com>
To: Pavel Machek <pavel@....cz>
Cc: Al Viro <viro@...IV.linux.org.uk>,
Andrew Morton <akpm@...ux-foundation.org>,
LKML <linux-kernel@...r.kernel.org>,
linux-netdev <netdev@...r.kernel.org>
Subject: Re: [RFC PATCH] kernel: add byteorder macros with alignment fixups
On Sun, 2008-03-23 at 14:59 +0100, Pavel Machek wrote:
> On Thu 2008-03-20 12:22:33, Harvey Harrison wrote:
> > +#ifdef __KERNEL__
> > +
> > +static inline u64 le64_to_cpu_unaligned(void *p)
> > +{
> > + return __le64_to_cpu(get_unaligned((__le64 *)p));
> > +}
>
> Why the cast? Should le64_to_cpu() take __le64 * parameter, so that normal
> typechecking still works?
> Pavel
Well, most places that would use this have a char *, or a u8 * so I was
avoiding a cast in most callers.
HPA made a good suggestion about this being in asm-generic allowing
arches to optimize this, so I'm reworking with that approach.
Harvey
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists