All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [intel-tdx:kvm 13/94] arch/x86/kvm/boot/seam/tdx_common.c:74:12: warning: no previous prototype for 'init_package_masters'
Date: Fri, 02 Jul 2021 13:26:48 +0800	[thread overview]
Message-ID: <202107021338.CxdqEhh5-lkp@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 2586 bytes --]

tree:   https://github.com/intel/tdx.git kvm
head:   a9119ab747d6880e39258627c6b6c693b803f794
commit: 8d0d0fd6a6dd39c141774d6b787bfdeeb00c58e3 [13/94] KVM: TDX: define and export helper functions for KVM TDX support
config: x86_64-allyesconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
        # https://github.com/intel/tdx/commit/8d0d0fd6a6dd39c141774d6b787bfdeeb00c58e3
        git remote add intel-tdx https://github.com/intel/tdx.git
        git fetch --no-tags intel-tdx kvm
        git checkout 8d0d0fd6a6dd39c141774d6b787bfdeeb00c58e3
        # 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@intel.com>

All warnings (new ones prefixed by >>):

>> arch/x86/kvm/boot/seam/tdx_common.c:74:12: warning: no previous prototype for 'init_package_masters' [-Wmissing-prototypes]
      74 | int __init init_package_masters(void)
         |            ^~~~~~~~~~~~~~~~~~~~


vim +/init_package_masters +74 arch/x86/kvm/boot/seam/tdx_common.c

    69	
    70	/*
    71	 * Setup one-cpu-per-pkg array to do package-scoped SEAMCALLs. The array is
    72	 * only necessary if there are multiple packages.
    73	 */
  > 74	int __init init_package_masters(void)
    75	{
    76		int cpu, pkg, nr_filled, nr_pkgs;
    77	
    78		nr_pkgs = topology_max_packages();
    79		if (nr_pkgs == 1)
    80			return 0;
    81	
    82		tdx_package_masters = kcalloc(nr_pkgs, sizeof(int), GFP_KERNEL);
    83		if (!tdx_package_masters)
    84			return -ENOMEM;
    85	
    86		memset(tdx_package_masters, -1, nr_pkgs * sizeof(int));
    87	
    88		nr_filled = 0;
    89		for_each_online_cpu(cpu) {
    90			pkg = topology_physical_package_id(cpu);
    91			if (tdx_package_masters[pkg] >= 0)
    92				continue;
    93	
    94			tdx_package_masters[pkg] = cpu;
    95			if (++nr_filled == topology_max_packages())
    96				break;
    97		}
    98	
    99		if (WARN_ON(nr_filled != topology_max_packages())) {
   100			kfree(tdx_package_masters);
   101			return -EIO;
   102		}
   103	
   104		if (cpuhp_setup_state_nocalls(CPUHP_AP_ONLINE_DYN, "tdx/cpu:starting",
   105					      tdx_starting_cpu, tdx_dying_cpu) < 0) {
   106			kfree(tdx_package_masters);
   107			return -EIO;
   108		}
   109	
   110		return 0;
   111	}
   112	

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

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 65609 bytes --]

                 reply	other threads:[~2021-07-02  5:26 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202107021338.CxdqEhh5-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.