diff options
author | Ed L. Cashin <ecashin@coraid.com> | 2005-09-19 22:57:36 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2005-09-19 22:57:36 -0400 |
commit | e0487992ce1dd7ae7da9c6aabdb19570bb95432b (patch) | |
tree | a2d748df1ae99d8f9e6c8e6055e9ef9a3153d1cf /include/linux | |
parent | ff171d8f66a7fe1a000e610e9de11224749f9a22 (diff) |
[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 <ecashin@coraid.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/byteorder/generic.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/byteorder/generic.h b/include/linux/byteorder/generic.h index 5fde6f4d6c1e..04bd756efc67 100644 --- a/include/linux/byteorder/generic.h +++ b/include/linux/byteorder/generic.h | |||
@@ -5,6 +5,10 @@ | |||
5 | * linux/byteorder_generic.h | 5 | * linux/byteorder_generic.h |
6 | * Generic Byte-reordering support | 6 | * Generic Byte-reordering support |
7 | * | 7 | * |
8 | * The "... p" macros, like le64_to_cpup, can be used with pointers | ||
9 | * to unaligned data, but there will be a performance penalty on | ||
10 | * some architectures. Use get_unaligned for unaligned data. | ||
11 | * | ||
8 | * Francois-Rene Rideau <fare@tunes.org> 19970707 | 12 | * Francois-Rene Rideau <fare@tunes.org> 19970707 |
9 | * gathered all the good ideas from all asm-foo/byteorder.h into one file, | 13 | * gathered all the good ideas from all asm-foo/byteorder.h into one file, |
10 | * cleaned them up. | 14 | * cleaned them up. |