[joro:x86-testing 39/45] arch/x86/kernel/sev.c:2027:26: warning: no previous prototype for 'snp_find_cc_blob'

From: kernel test robot
Date: Thu Nov 18 2021 - 23:36:44 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/joro/linux.git x86-testing
head: 139c88cae82e33dfd6e49ecc4b015a5c7d39c80a
commit: d35494e7aba4b3a2e7b1c9be9add9968be6d8ffd [39/45] x86/sev: add SEV-SNP feature detection/setup
config: x86_64-buildonly-randconfig-r005-20211115 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://git.kernel.org/pub/scm/linux/kernel/git/joro/linux.git/commit/?id=d35494e7aba4b3a2e7b1c9be9add9968be6d8ffd
git remote add joro https://git.kernel.org/pub/scm/linux/kernel/git/joro/linux.git
git fetch --no-tags joro x86-testing
git checkout d35494e7aba4b3a2e7b1c9be9add9968be6d8ffd
# save the attached .config to linux build tree
make W=1 ARCH=x86_64

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/kernel/sev.c:2027:26: warning: no previous prototype for 'snp_find_cc_blob' [-Wmissing-prototypes]
2027 | struct cc_blob_sev_info *snp_find_cc_blob(struct boot_params *bp)
| ^~~~~~~~~~~~~~~~


vim +/snp_find_cc_blob +2027 arch/x86/kernel/sev.c

2013
2014 /*
2015 * Initial set up of SEV-SNP relies on information provided by the
2016 * Confidential Computing blob, which can be passed to the kernel
2017 * in the following ways, depending on how it is booted:
2018 *
2019 * - when booted via the boot/decompress kernel:
2020 * - via boot_params
2021 *
2022 * - when booted directly by firmware/bootloader (e.g. CONFIG_PVH):
2023 * - via a setup_data entry, as defined by the Linux Boot Protocol
2024 *
2025 * Scan for the blob in that order.
2026 */
> 2027 struct cc_blob_sev_info *snp_find_cc_blob(struct boot_params *bp)
2028 {
2029 struct cc_blob_sev_info *cc_info;
2030
2031 /* Boot kernel would have passed the CC blob via boot_params. */
2032 if (bp->cc_blob_address) {
2033 cc_info = (struct cc_blob_sev_info *)
2034 (unsigned long)bp->cc_blob_address;
2035 goto found_cc_info;
2036 }
2037
2038 /*
2039 * If kernel was booted directly, without the use of the
2040 * boot/decompression kernel, the CC blob may have been passed via
2041 * setup_data instead.
2042 */
2043 cc_info = snp_find_cc_blob_setup_data(bp);
2044 if (!cc_info)
2045 return NULL;
2046
2047 found_cc_info:
2048 if (cc_info->magic != CC_BLOB_SEV_HDR_MAGIC)
2049 sev_es_terminate(1, GHCB_SNP_UNSUPPORTED);
2050
2051 return cc_info;
2052 }
2053

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

Attachment: .config.gz
Description: application/gzip