public inbox for llvm@lists.linux.dev
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: David Woodhouse <dwmw@amazon.co.uk>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev
Subject: [dwmw2:parallel-6.2-rc6 13/15] arch/x86/kernel/smpboot.c:217:25: warning: mixing declarations and code is incompatible with standards before C99
Date: Sat, 4 Feb 2023 14:42:41 +0800	[thread overview]
Message-ID: <202302041423.jV11yeKa-lkp@intel.com> (raw)

tree:   git://git.infradead.org/users/dwmw2/linux parallel-6.2-rc6
head:   459d1c46dbd121ad460159a0fe313dd07e3951da
commit: b5cc1bb6bc7d1190dac971407a9c2b1f7fc387f1 [13/15] parallel part 2
config: x86_64-randconfig-a003 (https://download.01.org/0day-ci/archive/20230204/202302041423.jV11yeKa-lkp@intel.com/config)
compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project f28c006a5895fc0e329fe15fead81e37457cb1d1)
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
        git remote add dwmw2 git://git.infradead.org/users/dwmw2/linux
        git fetch --no-tags dwmw2 parallel-6.2-rc6
        git checkout b5cc1bb6bc7d1190dac971407a9c2b1f7fc387f1
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash arch/x86/kernel/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

>> arch/x86/kernel/smpboot.c:217:25: warning: mixing declarations and code is incompatible with standards before C99 [-Wdeclaration-after-statement]
           static arch_spinlock_t cpuhp_lock = __ARCH_SPIN_LOCK_UNLOCKED;
                                  ^
   1 warning generated.


vim +217 arch/x86/kernel/smpboot.c

   159	
   160	/*
   161	 * Report back to the Boot Processor during boot time or to the caller processor
   162	 * during CPU online.
   163	 */
   164	static void smp_callin(void)
   165	{
   166		int cpuid;
   167	
   168		/*
   169		 * If waken up by an INIT in an 82489DX configuration
   170		 * cpu_callout_mask guarantees we don't get here before
   171		 * an INIT_deassert IPI reaches our local APIC, so it is
   172		 * now safe to touch our local APIC.
   173		 */
   174		cpuid = smp_processor_id();
   175	
   176		/*
   177		 * the boot CPU has finished the init stage and is spinning
   178		 * on callin_map until we finish. We are free to set up this
   179		 * CPU, first the APIC. (this is probably redundant on most
   180		 * boards)
   181		 */
   182		apic_ap_setup();
   183	
   184		/*
   185		 * Save our processor parameters and update topology.
   186		 * Note: this information is needed for clock calibration.
   187		 * The topology information must be up to date before
   188		 * calibrate_delay() and notify_cpu_starting().
   189		 */
   190		smp_store_cpu_info(cpuid, false);
   191	
   192		ap_init_aperfmperf();
   193	
   194		/*
   195		 * Get our bogomips.
   196		 * Update loops_per_jiffy in cpu_data. Previous call to
   197		 * smp_store_cpu_info() stored a value that is close but not as
   198		 * accurate as the value just calculated.
   199		 */
   200		calibrate_delay();
   201		cpu_data(cpuid).loops_per_jiffy = loops_per_jiffy;
   202		pr_debug("Stack at about %p\n", &cpuid);
   203	
   204		wmb();
   205	
   206		/*
   207		 * Allow the master to continue.
   208		 */
   209		cpumask_set_cpu(cpuid, cpu_callin_mask);
   210		while (!cpumask_test_cpu(cpuid, cpu_finishup_mask))
   211			cpu_relax();
   212	
   213		/*
   214		 * This runs the AP through all the cpuhp states to its target
   215		 * state (CPUHP_ONLINE in the case of serial bringup).
   216		 */
 > 217		static arch_spinlock_t cpuhp_lock = __ARCH_SPIN_LOCK_UNLOCKED;
   218		arch_spin_lock(&cpuhp_lock);
   219		notify_cpu_starting(cpuid);
   220		arch_spin_unlock(&cpuhp_lock);
   221	}
   222	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests

                 reply	other threads:[~2023-02-04  6:43 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=202302041423.jV11yeKa-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=dwmw@amazon.co.uk \
    --cc=llvm@lists.linux.dev \
    --cc=oe-kbuild-all@lists.linux.dev \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox