[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202111110058.7H6pZt9x-lkp@intel.com>
Date: Thu, 11 Nov 2021 00:56:07 +0800
From: kernel test robot <lkp@...el.com>
To: Guenter Roeck <linux@...ck-us.net>
Cc: kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
Palmer Dabbelt <palmerdabbelt@...gle.com>
Subject: drivers/firmware/efi/capsule-loader.c:91:12: warning: no previous
prototype for 'efi_capsule_setup_info'
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: cb690f5238d71f543f4ce874aa59237cf53a877c
commit: a18b14d8886614b3c7d290c4cfc33389822b0535 riscv: Disable STACKPROTECTOR_PER_TASK if GCC_PLUGIN_RANDSTRUCT is enabled
date: 3 months ago
config: riscv-randconfig-r022-20211109 (attached as .config)
compiler: riscv32-linux-gcc (GCC) 11.2.0
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
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=a18b14d8886614b3c7d290c4cfc33389822b0535
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout a18b14d8886614b3c7d290c4cfc33389822b0535
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=riscv
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>
All warnings (new ones prefixed by >>):
>> drivers/firmware/efi/capsule-loader.c:91:12: warning: no previous prototype for 'efi_capsule_setup_info' [-Wmissing-prototypes]
91 | int __weak efi_capsule_setup_info(struct capsule_info *cap_info, void *kbuff,
| ^~~~~~~~~~~~~~~~~~~~~~
--
lib/test_hexdump.c: In function 'test_hexdump_prepare_test.constprop':
>> lib/test_hexdump.c:116:17: warning: 'strncpy' output truncated copying between 0 and 32 bytes from a string of length 32 [-Wstringop-truncation]
116 | strncpy(p, data_a, l);
| ^~~~~~~~~~~~~~~~~~~~~
vim +/efi_capsule_setup_info +91 drivers/firmware/efi/capsule-loader.c
65117f1aa1b2d14 Kweh, Hock Leong 2016-04-25 79
3fabd628d5ea24b Ard Biesheuvel 2017-06-02 80 /**
3fabd628d5ea24b Ard Biesheuvel 2017-06-02 81 * efi_capsule_setup_info - obtain the efi capsule header in the binary and
3fabd628d5ea24b Ard Biesheuvel 2017-06-02 82 * setup capsule_info structure
3fabd628d5ea24b Ard Biesheuvel 2017-06-02 83 * @cap_info: pointer to current instance of capsule_info structure
3fabd628d5ea24b Ard Biesheuvel 2017-06-02 84 * @kbuff: a mapped first page buffer pointer
3fabd628d5ea24b Ard Biesheuvel 2017-06-02 85 * @hdr_bytes: the total received number of bytes for efi header
3fabd628d5ea24b Ard Biesheuvel 2017-06-02 86 *
3fabd628d5ea24b Ard Biesheuvel 2017-06-02 87 * Platforms with non-standard capsule update mechanisms can override
3fabd628d5ea24b Ard Biesheuvel 2017-06-02 88 * this __weak function so they can perform any required capsule
3fabd628d5ea24b Ard Biesheuvel 2017-06-02 89 * image munging. See quark_quirk_function() for an example.
3fabd628d5ea24b Ard Biesheuvel 2017-06-02 90 **/
3fabd628d5ea24b Ard Biesheuvel 2017-06-02 @91 int __weak efi_capsule_setup_info(struct capsule_info *cap_info, void *kbuff,
3fabd628d5ea24b Ard Biesheuvel 2017-06-02 92 size_t hdr_bytes)
3fabd628d5ea24b Ard Biesheuvel 2017-06-02 93 {
3fabd628d5ea24b Ard Biesheuvel 2017-06-02 94 /* Only process data block that is larger than efi header size */
3fabd628d5ea24b Ard Biesheuvel 2017-06-02 95 if (hdr_bytes < sizeof(efi_capsule_header_t))
3fabd628d5ea24b Ard Biesheuvel 2017-06-02 96 return 0;
3fabd628d5ea24b Ard Biesheuvel 2017-06-02 97
3fabd628d5ea24b Ard Biesheuvel 2017-06-02 98 memcpy(&cap_info->header, kbuff, sizeof(cap_info->header));
3fabd628d5ea24b Ard Biesheuvel 2017-06-02 99 cap_info->total_size = cap_info->header.imagesize;
3fabd628d5ea24b Ard Biesheuvel 2017-06-02 100
3fabd628d5ea24b Ard Biesheuvel 2017-06-02 101 return __efi_capsule_setup_info(cap_info);
3fabd628d5ea24b Ard Biesheuvel 2017-06-02 102 }
3fabd628d5ea24b Ard Biesheuvel 2017-06-02 103
:::::: The code at line 91 was first introduced by commit
:::::: 3fabd628d5ea24b02ddb1230ffca1df0f779f84e efi/capsule-loader: Redirect calls to efi_capsule_setup_info() via weak alias
:::::: TO: Ard Biesheuvel <ard.biesheuvel@...aro.org>
:::::: CC: Ingo Molnar <mingo@...nel.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Download attachment ".config.gz" of type "application/gzip" (36286 bytes)
Powered by blists - more mailing lists