From: Ed L. Cashin Date: Tue, 20 Sep 2005 02:57:36 +0000 (-0700) Subject: [BYTEORDER]: Document alignment and byteorder macros X-Git-Tag: v3.12-rc1~41436^2~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e0487992ce1dd7ae7da9c6aabdb19570bb95432b;p=kernel%2Fkernel-generic.git [BYTEORDER]: Document alignment and byteorder macros 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 Signed-off-by: David S. Miller --- diff --git a/include/linux/byteorder/generic.h b/include/linux/byteorder/generic.h index 5fde6f4..04bd756 100644 --- a/include/linux/byteorder/generic.h +++ b/include/linux/byteorder/generic.h @@ -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 19970707 * gathered all the good ideas from all asm-foo/byteorder.h into one file, * cleaned them up.