aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-02-17 14:22:59 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2009-02-17 14:22:59 -0800
commit23beafbe3abd3f622931e83ef4e6b17642cf408e (patch)
tree142283fe372f1527b82662e00c360ae47cca87a0
parentMerge git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable (diff)
parentcrypto: lrw - Fix big endian support (diff)
downloadlinux-dev-23beafbe3abd3f622931e83ef4e6b17642cf408e.tar.xz
linux-dev-23beafbe3abd3f622931e83ef4e6b17642cf408e.zip
Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: crypto: lrw - Fix big endian support
-rw-r--r--crypto/lrw.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/crypto/lrw.c b/crypto/lrw.c
index 8ef664e3bcd9..358f80be2bf9 100644
--- a/crypto/lrw.c
+++ b/crypto/lrw.c
@@ -45,7 +45,13 @@ struct priv {
static inline void setbit128_bbe(void *b, int bit)
{
- __set_bit(bit ^ 0x78, b);
+ __set_bit(bit ^ (0x80 -
+#ifdef __BIG_ENDIAN
+ BITS_PER_LONG
+#else
+ BITS_PER_BYTE
+#endif
+ ), b);
}
static int setkey(struct crypto_tfm *parent, const u8 *key,