]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[BYTEORDER]: Document alignment and byteorder macros
authorEd L. Cashin <ecashin@coraid.com>
Tue, 20 Sep 2005 02:57:36 +0000 (19:57 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 20 Sep 2005 02:57:36 +0000 (19:57 -0700)
This patch comments the fact that although passing le64_to_cpup et
al. is within the intended use of the byteorder macros, using
get_unaligned is the recommended way to go.

Signed-off-by: Ed L. Cashin <ecashin@coraid.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/byteorder/generic.h

index 5fde6f4d6c1e3692b0abd52945e48721f428410d..04bd756efc6740e2b16385d4047f2ebb7ec1a86b 100644 (file)
@@ -5,6 +5,10 @@
  * linux/byteorder_generic.h
  * Generic Byte-reordering support
  *
+ * The "... p" macros, like le64_to_cpup, can be used with pointers
+ * to unaligned data, but there will be a performance penalty on 
+ * some architectures.  Use get_unaligned for unaligned data.
+ *
  * Francois-Rene Rideau <fare@tunes.org> 19970707
  *    gathered all the good ideas from all asm-foo/byteorder.h into one file,
  *    cleaned them up.