[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202212200704.zEnG72CU-lkp@intel.com>
Date: Tue, 20 Dec 2022 07:59:19 +0800
From: kernel test robot <lkp@...el.com>
To: "Gustavo A. R. Silva" <gustavoars@...nel.org>
Cc: llvm@...ts.linux.dev, oe-kbuild-all@...ts.linux.dev,
linux-kernel@...r.kernel.org, Kees Cook <keescook@...omium.org>
Subject: arch/arm/crypto/sha1_neon_glue.c:43:8: warning: cast from 'void
(*)(void *, const char *, unsigned int)' to 'sha1_block_fn *' (aka 'void
(*)(struct sha1_state *, const unsigned char *, int)') converts to
incompatible function type
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 6feb57c2fd7c787aecf2846a535248899e7b70fa
commit: 552a23a0e5d0a84cecd4687043d8030673981d30 Makefile: Enable -Wcast-function-type
date: 1 year, 1 month ago
config: arm-defconfig
compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project 98b13979fb05f3ed288a900deb843e7b27589e58)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install arm cross compiling tool for clang build
# apt-get install binutils-arm-linux-gnueabi
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=552a23a0e5d0a84cecd4687043d8030673981d30
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 552a23a0e5d0a84cecd4687043d8030673981d30
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm SHELL=/bin/bash arch/arm/crypto/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@...el.com>
All warnings (new ones prefixed by >>):
>> arch/arm/crypto/sha1_neon_glue.c:43:8: warning: cast from 'void (*)(void *, const char *, unsigned int)' to 'sha1_block_fn *' (aka 'void (*)(struct sha1_state *, const unsigned char *, int)') converts to incompatible function type [-Wcast-function-type-strict]
(sha1_block_fn *)sha1_transform_neon);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/arm/crypto/sha1_neon_glue.c:58:9: warning: cast from 'void (*)(void *, const char *, unsigned int)' to 'sha1_block_fn *' (aka 'void (*)(struct sha1_state *, const unsigned char *, int)') converts to incompatible function type [-Wcast-function-type-strict]
(sha1_block_fn *)sha1_transform_neon);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/arm/crypto/sha1_neon_glue.c:59:30: warning: cast from 'void (*)(void *, const char *, unsigned int)' to 'sha1_block_fn *' (aka 'void (*)(struct sha1_state *, const unsigned char *, int)') converts to incompatible function type [-Wcast-function-type-strict]
sha1_base_do_finalize(desc, (sha1_block_fn *)sha1_transform_neon);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3 warnings generated.
--
>> arch/arm/crypto/sha512-neon-glue.c:37:3: warning: cast from 'void (*)(u64 *, const u8 *, int)' (aka 'void (*)(unsigned long long *, const unsigned char *, int)') to 'sha512_block_fn *' (aka 'void (*)(struct sha512_state *, const unsigned char *, int)') converts to incompatible function type [-Wcast-function-type-strict]
(sha512_block_fn *)sha512_block_data_order_neon);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/arm/crypto/sha512-neon-glue.c:52:4: warning: cast from 'void (*)(u64 *, const u8 *, int)' (aka 'void (*)(unsigned long long *, const unsigned char *, int)') to 'sha512_block_fn *' (aka 'void (*)(struct sha512_state *, const unsigned char *, int)') converts to incompatible function type [-Wcast-function-type-strict]
(sha512_block_fn *)sha512_block_data_order_neon);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/arm/crypto/sha512-neon-glue.c:54:3: warning: cast from 'void (*)(u64 *, const u8 *, int)' (aka 'void (*)(unsigned long long *, const unsigned char *, int)') to 'sha512_block_fn *' (aka 'void (*)(struct sha512_state *, const unsigned char *, int)') converts to incompatible function type [-Wcast-function-type-strict]
(sha512_block_fn *)sha512_block_data_order_neon);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3 warnings generated.
vim +43 arch/arm/crypto/sha1_neon_glue.c
604682551aa511 Jussi Kivilinna 2014-07-29 28
604682551aa511 Jussi Kivilinna 2014-07-29 29 asmlinkage void sha1_transform_neon(void *state_h, const char *data,
604682551aa511 Jussi Kivilinna 2014-07-29 30 unsigned int rounds);
604682551aa511 Jussi Kivilinna 2014-07-29 31
604682551aa511 Jussi Kivilinna 2014-07-29 32 static int sha1_neon_update(struct shash_desc *desc, const u8 *data,
604682551aa511 Jussi Kivilinna 2014-07-29 33 unsigned int len)
604682551aa511 Jussi Kivilinna 2014-07-29 34 {
604682551aa511 Jussi Kivilinna 2014-07-29 35 struct sha1_state *sctx = shash_desc_ctx(desc);
604682551aa511 Jussi Kivilinna 2014-07-29 36
99680c5e918294 Eric Biggers 2019-03-12 37 if (!crypto_simd_usable() ||
51e515faa887e4 Ard Biesheuvel 2015-04-09 38 (sctx->count % SHA1_BLOCK_SIZE) + len < SHA1_BLOCK_SIZE)
51e515faa887e4 Ard Biesheuvel 2015-04-09 39 return sha1_update_arm(desc, data, len);
604682551aa511 Jussi Kivilinna 2014-07-29 40
604682551aa511 Jussi Kivilinna 2014-07-29 41 kernel_neon_begin();
51e515faa887e4 Ard Biesheuvel 2015-04-09 42 sha1_base_do_update(desc, data, len,
51e515faa887e4 Ard Biesheuvel 2015-04-09 @43 (sha1_block_fn *)sha1_transform_neon);
604682551aa511 Jussi Kivilinna 2014-07-29 44 kernel_neon_end();
604682551aa511 Jussi Kivilinna 2014-07-29 45
604682551aa511 Jussi Kivilinna 2014-07-29 46 return 0;
604682551aa511 Jussi Kivilinna 2014-07-29 47 }
604682551aa511 Jussi Kivilinna 2014-07-29 48
:::::: The code at line 43 was first introduced by commit
:::::: 51e515faa887e40e7e30a3e13607ea6be418e4c4 crypto: arm/sha1_neon - move SHA-1 NEON implementation to base layer
:::::: TO: Ard Biesheuvel <ard.biesheuvel@...aro.org>
:::::: CC: Herbert Xu <herbert@...dor.apana.org.au>
--
0-DAY CI Kernel Test Service
https://01.org/lkp
View attachment "config" of type "text/plain" (248926 bytes)
Powered by blists - more mailing lists