arch/x86/platform/efi/quirks.c:609:5: warning: no previous declaration for 'efi_capsule_setup_info'

From: kernel test robot
Date: Thu Mar 03 2022 - 21:48:45 EST


Hi Jan,

FYI, the error/warning still remains.

tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: b08968f196d498b19e9d0841d76a03862258f2d8
commit: 2959c95d510cc45b246ba727eb8fdf8b601c6eec efi/capsule: Add support for Quark security header
date: 4 years, 9 months ago
config: i386-defconfig (https://download.01.org/0day-ci/archive/20220304/202203040947.9FLycm7z-lkp@xxxxxxxxx/config)
compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0
reproduce (this is a W=1 build):
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=2959c95d510cc45b246ba727eb8fdf8b601c6eec
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 2959c95d510cc45b246ba727eb8fdf8b601c6eec
# save the config file to linux build tree
mkdir build_dir
make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash arch/x86/platform/efi/ drivers/gpu/drm/i915/ kernel/power/

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

All warnings (new ones prefixed by >>):

arch/x86/platform/efi/quirks.c:242:13: warning: no previous declaration for 'efi_arch_mem_reserve' [-Wmissing-declarations]
void __init efi_arch_mem_reserve(phys_addr_t addr, u64 size)
^~~~~~~~~~~~~~~~~~~~
>> arch/x86/platform/efi/quirks.c:609:5: warning: no previous declaration for 'efi_capsule_setup_info' [-Wmissing-declarations]
int efi_capsule_setup_info(struct capsule_info *cap_info, void *kbuff,
^~~~~~~~~~~~~~~~~~~~~~


vim +/efi_capsule_setup_info +609 arch/x86/platform/efi/quirks.c

608
> 609 int efi_capsule_setup_info(struct capsule_info *cap_info, void *kbuff,
610 size_t hdr_bytes)
611 {
612 int (*quirk_handler)(struct capsule_info *, void **, size_t);
613 const struct x86_cpu_id *id;
614 int ret;
615
616 if (hdr_bytes < sizeof(efi_capsule_header_t))
617 return 0;
618
619 cap_info->total_size = 0;
620
621 id = x86_match_cpu(efi_capsule_quirk_ids);
622 if (id) {
623 /*
624 * The quirk handler is supposed to return
625 * - a value > 0 if the setup should continue, after advancing
626 * kbuff as needed
627 * - 0 if not enough hdr_bytes are available yet
628 * - a negative error code otherwise
629 */
630 quirk_handler = (typeof(quirk_handler))id->driver_data;
631 ret = quirk_handler(cap_info, &kbuff, hdr_bytes);
632 if (ret <= 0)
633 return ret;
634 }
635
636 memcpy(&cap_info->header, kbuff, sizeof(cap_info->header));
637
638 cap_info->total_size += cap_info->header.imagesize;
639
640 return __efi_capsule_setup_info(cap_info);
641 }
642

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