lkml.org 
[lkml]   [2022]   [Mar]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subject[zx2c4-wireguard:devel 1/2] lib/crypto/poly1305-selftest.c:1043:13: warning: no previous prototype for function 'poly1305_selftest'
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/zx2c4/wireguard-linux.git devel
head: 85edbe4cea2a4446b6425d67a00c04dce142b2f2
commit: 957612a1219877cad2e0fd43f89dea54575db069 [1/2] crypto: poly1305 - add library selftests
config: s390-randconfig-r044-20220320 (https://download.01.org/0day-ci/archive/20220322/202203221101.Vd8pIU2T-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 85e9b2687a13d1908aa86d1b89c5ce398a06cd39)
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 s390 cross compiling tool for clang build
# apt-get install binutils-s390x-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/zx2c4/wireguard-linux.git/commit/?id=957612a1219877cad2e0fd43f89dea54575db069
git remote add zx2c4-wireguard https://git.kernel.org/pub/scm/linux/kernel/git/zx2c4/wireguard-linux.git
git fetch --no-tags zx2c4-wireguard devel
git checkout 957612a1219877cad2e0fd43f89dea54575db069
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=s390 SHELL=/bin/bash lib/crypto/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

>> lib/crypto/poly1305-selftest.c:1043:13: warning: no previous prototype for function 'poly1305_selftest' [-Wmissing-prototypes]
bool __init poly1305_selftest(void)
^
lib/crypto/poly1305-selftest.c:1043:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
bool __init poly1305_selftest(void)
^
static
1 warning generated.


vim +/poly1305_selftest +1043 lib/crypto/poly1305-selftest.c

1042
> 1043 bool __init poly1305_selftest(void)
1044 {
1045 bool success = true;
1046 size_t i, j;
1047
1048 for (i = 0; i < ARRAY_SIZE(poly1305_testvecs); ++i) {
1049 struct poly1305_desc_ctx poly1305;
1050 u8 out[POLY1305_DIGEST_SIZE];
1051
1052 memset(out, 0, sizeof(out));
1053 memset(&poly1305, 0, sizeof(poly1305));
1054 poly1305_init(&poly1305, poly1305_testvecs[i].key);
1055 poly1305_update(&poly1305, poly1305_testvecs[i].input,
1056 poly1305_testvecs[i].ilen);
1057 poly1305_final(&poly1305, out);
1058 if (memcmp(out, poly1305_testvecs[i].output,
1059 POLY1305_DIGEST_SIZE)) {
1060 pr_err("poly1305 self-test %zu: FAIL\n", i + 1);
1061 success = false;
1062 }
1063
1064 if (poly1305_testvecs[i].ilen <= 1)
1065 continue;
1066
1067 for (j = 1; j < poly1305_testvecs[i].ilen - 1; ++j) {
1068 memset(out, 0, sizeof(out));
1069 memset(&poly1305, 0, sizeof(poly1305));
1070 poly1305_init(&poly1305, poly1305_testvecs[i].key);
1071 poly1305_update(&poly1305, poly1305_testvecs[i].input, j);
1072 poly1305_update(&poly1305,
1073 poly1305_testvecs[i].input + j,
1074 poly1305_testvecs[i].ilen - j);
1075 poly1305_final(&poly1305, out);
1076 if (memcmp(out, poly1305_testvecs[i].output,
1077 POLY1305_DIGEST_SIZE)) {
1078 pr_err("poly1305 self-test %zu (split %zu): FAIL\n",
1079 i + 1, j);
1080 success = false;
1081 }
1082

--
0-DAY CI Kernel Test Service
https://01.org/lkp

\
 
 \ /
  Last update: 2022-03-22 04:45    [W:0.036 / U:22.844 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site