Skip to content

Commit

Permalink
[BYTEORDER]: Document alignment and byteorder macros
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ed L. Cashin authored and David S. Miller committed Sep 20, 2005
1 parent ff171d8 commit e048799
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions include/linux/byteorder/generic.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit e048799

Please sign in to comment.