arch/arm/boot/compressed/../../../../lib/lz4/lz4_decompress.c:480:5: warning: no previous prototype for function 'LZ4_decompress_safe_withPrefix64k'

From: kernel test robot
Date: Fri Oct 02 2020 - 08:39:43 EST


Hi Nick,

First bad commit (maybe != root cause):

tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 472e5b056f000a778abb41f1e443de58eb259783
commit: 1e1b6d63d6340764e00356873e5794225a2a03ea lib/string.c: implement stpcpy
date: 6 days ago
config: arm-randconfig-r031-20201002 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project bcd05599d0e53977a963799d6ee4f6e0bc21331b)
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=1e1b6d63d6340764e00356873e5794225a2a03ea
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 1e1b6d63d6340764e00356873e5794225a2a03ea
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm

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

All warnings (new ones prefixed by >>):

In file included from arch/arm/boot/compressed/decompress.c:56:
In file included from arch/arm/boot/compressed/../../../../lib/decompress_unlz4.c:10:
>> arch/arm/boot/compressed/../../../../lib/lz4/lz4_decompress.c:480:5: warning: no previous prototype for function 'LZ4_decompress_safe_withPrefix64k' [-Wmissing-prototypes]
int LZ4_decompress_safe_withPrefix64k(const char *source, char *dest,
^
arch/arm/boot/compressed/../../../../lib/lz4/lz4_decompress.c:480:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int LZ4_decompress_safe_withPrefix64k(const char *source, char *dest,
^
static
>> arch/arm/boot/compressed/../../../../lib/lz4/lz4_decompress.c:502:5: warning: no previous prototype for function 'LZ4_decompress_safe_forceExtDict' [-Wmissing-prototypes]
int LZ4_decompress_safe_forceExtDict(const char *source, char *dest,
^
arch/arm/boot/compressed/../../../../lib/lz4/lz4_decompress.c:502:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int LZ4_decompress_safe_forceExtDict(const char *source, char *dest,
^
static
arch/arm/boot/compressed/decompress.c:59:5: warning: no previous prototype for function 'do_decompress' [-Wmissing-prototypes]
int do_decompress(u8 *input, int len, u8 *output, void (*error)(char *x))
^
arch/arm/boot/compressed/decompress.c:59:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int do_decompress(u8 *input, int len, u8 *output, void (*error)(char *x))
^
static
3 warnings generated.

vim +/LZ4_decompress_safe_withPrefix64k +480 arch/arm/boot/compressed/../../../../lib/lz4/lz4_decompress.c

2209fda323e2fd2 Gao Xiang 2018-10-30 479
2209fda323e2fd2 Gao Xiang 2018-10-30 @480 int LZ4_decompress_safe_withPrefix64k(const char *source, char *dest,
2209fda323e2fd2 Gao Xiang 2018-10-30 481 int compressedSize, int maxOutputSize)
2209fda323e2fd2 Gao Xiang 2018-10-30 482 {
2209fda323e2fd2 Gao Xiang 2018-10-30 483 return LZ4_decompress_generic(source, dest,
2209fda323e2fd2 Gao Xiang 2018-10-30 484 compressedSize, maxOutputSize,
2209fda323e2fd2 Gao Xiang 2018-10-30 485 endOnInputSize, decode_full_block,
2209fda323e2fd2 Gao Xiang 2018-10-30 486 withPrefix64k,
2209fda323e2fd2 Gao Xiang 2018-10-30 487 (BYTE *)dest - 64 * KB, NULL, 0);
2209fda323e2fd2 Gao Xiang 2018-10-30 488 }
2209fda323e2fd2 Gao Xiang 2018-10-30 489
2209fda323e2fd2 Gao Xiang 2018-10-30 490 static int LZ4_decompress_safe_withSmallPrefix(const char *source, char *dest,
2209fda323e2fd2 Gao Xiang 2018-10-30 491 int compressedSize,
2209fda323e2fd2 Gao Xiang 2018-10-30 492 int maxOutputSize,
2209fda323e2fd2 Gao Xiang 2018-10-30 493 size_t prefixSize)
2209fda323e2fd2 Gao Xiang 2018-10-30 494 {
2209fda323e2fd2 Gao Xiang 2018-10-30 495 return LZ4_decompress_generic(source, dest,
2209fda323e2fd2 Gao Xiang 2018-10-30 496 compressedSize, maxOutputSize,
2209fda323e2fd2 Gao Xiang 2018-10-30 497 endOnInputSize, decode_full_block,
2209fda323e2fd2 Gao Xiang 2018-10-30 498 noDict,
2209fda323e2fd2 Gao Xiang 2018-10-30 499 (BYTE *)dest - prefixSize, NULL, 0);
4e1a33b105ddf20 Sven Schmidt 2017-02-24 500 }
cffb78b0e0b3a30 Kyungsik Lee 2013-07-08 501
2209fda323e2fd2 Gao Xiang 2018-10-30 @502 int LZ4_decompress_safe_forceExtDict(const char *source, char *dest,
2209fda323e2fd2 Gao Xiang 2018-10-30 503 int compressedSize, int maxOutputSize,
2209fda323e2fd2 Gao Xiang 2018-10-30 504 const void *dictStart, size_t dictSize)
2209fda323e2fd2 Gao Xiang 2018-10-30 505 {
2209fda323e2fd2 Gao Xiang 2018-10-30 506 return LZ4_decompress_generic(source, dest,
2209fda323e2fd2 Gao Xiang 2018-10-30 507 compressedSize, maxOutputSize,
2209fda323e2fd2 Gao Xiang 2018-10-30 508 endOnInputSize, decode_full_block,
2209fda323e2fd2 Gao Xiang 2018-10-30 509 usingExtDict, (BYTE *)dest,
2209fda323e2fd2 Gao Xiang 2018-10-30 510 (const BYTE *)dictStart, dictSize);
2209fda323e2fd2 Gao Xiang 2018-10-30 511 }
2209fda323e2fd2 Gao Xiang 2018-10-30 512

:::::: The code at line 480 was first introduced by commit
:::::: 2209fda323e2fd2a2d0885595fd5097717f8d2aa lib/lz4: update LZ4 decompressor module

:::::: TO: Gao Xiang <gaoxiang25@xxxxxxxxxx>
:::::: CC: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip