Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

crypto: arm/sha1 - Fix clang function cast warnings

Instead of casting the function which upsets clang for some reason,
change the assembly function siganture instead.

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

+6 -8
+6 -8
arch/arm/crypto/sha1_glue.c
··· 21 21 22 22 #include "sha1.h" 23 23 24 - asmlinkage void sha1_block_data_order(u32 *digest, 25 - const unsigned char *data, unsigned int rounds); 24 + asmlinkage void sha1_block_data_order(struct sha1_state *digest, 25 + const u8 *data, int rounds); 26 26 27 27 int sha1_update_arm(struct shash_desc *desc, const u8 *data, 28 28 unsigned int len) 29 29 { 30 - /* make sure casting to sha1_block_fn() is safe */ 30 + /* make sure signature matches sha1_block_fn() */ 31 31 BUILD_BUG_ON(offsetof(struct sha1_state, state) != 0); 32 32 33 - return sha1_base_do_update(desc, data, len, 34 - (sha1_block_fn *)sha1_block_data_order); 33 + return sha1_base_do_update(desc, data, len, sha1_block_data_order); 35 34 } 36 35 EXPORT_SYMBOL_GPL(sha1_update_arm); 37 36 38 37 static int sha1_final(struct shash_desc *desc, u8 *out) 39 38 { 40 - sha1_base_do_finalize(desc, (sha1_block_fn *)sha1_block_data_order); 39 + sha1_base_do_finalize(desc, sha1_block_data_order); 41 40 return sha1_base_finish(desc, out); 42 41 } 43 42 44 43 int sha1_finup_arm(struct shash_desc *desc, const u8 *data, 45 44 unsigned int len, u8 *out) 46 45 { 47 - sha1_base_do_update(desc, data, len, 48 - (sha1_block_fn *)sha1_block_data_order); 46 + sha1_base_do_update(desc, data, len, sha1_block_data_order); 49 47 return sha1_final(desc, out); 50 48 } 51 49 EXPORT_SYMBOL_GPL(sha1_finup_arm);