diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-10-15 07:30:52 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-10-15 07:30:52 +0200 |
commit | 6929c358972facf2999f8768815c40dd88514fc2 (patch) | |
tree | b7180709c0d16ef5f2e7344b94b1ca6cfa7461bb /fs | |
parent | 23971bdffff5f7c904131dfb41c186711dc2c418 (diff) | |
parent | 4c5c30249452aaebf258751ea4222eba3dd3da4c (diff) | |
download | linux-6929c358972facf2999f8768815c40dd88514fc2.tar.gz linux-6929c358972facf2999f8768815c40dd88514fc2.tar.bz2 linux-6929c358972facf2999f8768815c40dd88514fc2.zip |
Merge tag 'llvmlinux-for-v3.18' of git://git.linuxfoundation.org/llvmlinux/kernel
Pull LLVM updates from Behan Webster:
"These patches remove the use of VLAIS using a new SHASH_DESC_ON_STACK
macro.
Some of the previously accepted VLAIS removal patches haven't used
this macro. I will push new patches to consistently use this macro in
all those older cases for 3.19"
[ More LLVM patches coming in through subsystem trees, and LLVM itself
needs some fixes that are already in many distributions but not in
released versions of LLVM. Some day this will all "just work" - Linus ]
* tag 'llvmlinux-for-v3.18' of git://git.linuxfoundation.org/llvmlinux/kernel:
crypto: LLVMLinux: Remove VLAIS usage from crypto/testmgr.c
security, crypto: LLVMLinux: Remove VLAIS from ima_crypto.c
crypto: LLVMLinux: Remove VLAIS usage from libcrc32c.c
crypto: LLVMLinux: Remove VLAIS usage from crypto/hmac.c
crypto, dm: LLVMLinux: Remove VLAIS usage from dm-crypt
crypto: LLVMLinux: Remove VLAIS from crypto/.../qat_algs.c
crypto: LLVMLinux: Remove VLAIS from crypto/omap_sham.c
crypto: LLVMLinux: Remove VLAIS from crypto/n2_core.c
crypto: LLVMLinux: Remove VLAIS from crypto/mv_cesa.c
crypto: LLVMLinux: Remove VLAIS from crypto/ccp/ccp-crypto-sha.c
btrfs: LLVMLinux: Remove VLAIS
crypto: LLVMLinux: Add macro to remove use of VLAIS in crypto code
Diffstat (limited to 'fs')
-rw-r--r-- | fs/btrfs/hash.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/fs/btrfs/hash.c b/fs/btrfs/hash.c index 64f15bb30a81..aae520b2aee5 100644 --- a/fs/btrfs/hash.c +++ b/fs/btrfs/hash.c @@ -31,18 +31,16 @@ void btrfs_hash_exit(void) u32 btrfs_crc32c(u32 crc, const void *address, unsigned int length) { - struct { - struct shash_desc shash; - char ctx[crypto_shash_descsize(tfm)]; - } desc; + SHASH_DESC_ON_STACK(shash, tfm); + u32 *ctx = (u32 *)shash_desc_ctx(shash); int err; - desc.shash.tfm = tfm; - desc.shash.flags = 0; - *(u32 *)desc.ctx = crc; + shash->tfm = tfm; + shash->flags = 0; + *ctx = crc; - err = crypto_shash_update(&desc.shash, address, length); + err = crypto_shash_update(shash, address, length); BUG_ON(err); - return *(u32 *)desc.ctx; + return *ctx; } |