]> git.baikalelectronics.ru Git - kernel.git/commit
byteorder: use generic C version for value byteswapping
authorHarvey Harrison <harvey.harrison@gmail.com>
Sun, 19 Oct 2008 03:28:36 +0000 (20:28 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 20 Oct 2008 15:52:40 +0000 (08:52 -0700)
commite8bad30a5c8fc6847fdc1f9b3b6b2539920b882d
treebfd93125ccff25c774c2e4d71a8ba537312950ab
parent0955c505139ab76141f64ec97f3ca692d9f224b2
byteorder: use generic C version for value byteswapping

This makes the new implementation of the byteorder helpers match the old
in how it degraded when an arch-defined version was not available:

1) swab()
- look for arch defined
- if not, use generic c version

2) swabp()
- look for arch-defined
- if not, deref pointer and use swab()

3) swabs()
- look for arch defined
- if not, use swabp

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/linux/swab.h