[pm:pm-sleep-core 3/7] drivers/base/power/main.c:646:3: error: label 'skip' used but not defined

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git pm-sleep-core
head:   a10300155e14f5644294172cfda77106ee71e236
commit: c56010827abbc0b471d4af29f2e7d45c661ae1b3 [3/7] PM: sleep: core: Do not skip callbacks in the resume phase
config: nds32-defconfig (attached as .config)
compiler: nds32le-linux-gcc (GCC) 9.3.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        git checkout c56010827abbc0b471d4af29f2e7d45c661ae1b3
        # save the attached .config to linux build tree
        GCC_VERSION=9.3.0 make.cross ARCH=nds32 

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

All errors (new ones prefixed by >>):

   drivers/base/power/main.c: In function 'device_resume_noirq':
   drivers/base/power/main.c:656:1: warning: label 'Skip' defined but not used [-Wunused-label]
     656 | Skip:
         | ^~~~
>> drivers/base/power/main.c:646:3: error: label 'skip' used but not defined
     646 |   goto skip;
         |   ^~~~

vim +/skip +646 drivers/base/power/main.c

   584	
   585	/**
   586	 * device_resume_noirq - Execute a "noirq resume" callback for given device.
   587	 * @dev: Device to handle.
   588	 * @state: PM transition of the system being carried out.
   589	 * @async: If true, the device is being resumed asynchronously.
   590	 *
   591	 * The driver of @dev will not receive interrupts while this function is being
   592	 * executed.
   593	 */
   594	static int device_resume_noirq(struct device *dev, pm_message_t state, bool async)
   595	{
   596		pm_callback_t callback = NULL;
   597		const char *info = NULL;
   598		bool skip_resume;
   599		int error = 0;
   600	
   601		TRACE_DEVICE(dev);
   602		TRACE_RESUME(0);
   603	
   604		if (dev->power.syscore || dev->power.direct_complete)
   605			goto Out;
   606	
   607		if (!dev->power.is_noirq_suspended)
   608			goto Out;
   609	
   610		if (!dpm_wait_for_superior(dev, async))
   611			goto Out;
   612	
   613		skip_resume = dev_pm_may_skip_resume(dev);
   614		/*
   615		 * If the driver callback is skipped below or by the middle layer
   616		 * callback and device_resume_early() also skips the driver callback for
   617		 * this device later, it needs to appear as "suspended" to PM-runtime,
   618		 * so change its status accordingly.
   619		 *
   620		 * Otherwise, the device is going to be resumed, so set its PM-runtime
   621		 * status to "active", but do that only if DPM_FLAG_SMART_SUSPEND is set
   622		 * to avoid confusing drivers that don't use it.
   623		 */
   624		if (skip_resume)
   625			pm_runtime_set_suspended(dev);
   626		else if (dev_pm_smart_suspend_and_suspended(dev))
   627			pm_runtime_set_active(dev);
   628	
   629		if (dev->pm_domain) {
   630			info = "noirq power domain ";
   631			callback = pm_noirq_op(&dev->pm_domain->ops, state);
   632		} else if (dev->type && dev->type->pm) {
   633			info = "noirq type ";
   634			callback = pm_noirq_op(dev->type->pm, state);
   635		} else if (dev->class && dev->class->pm) {
   636			info = "noirq class ";
   637			callback = pm_noirq_op(dev->class->pm, state);
   638		} else if (dev->bus && dev->bus->pm) {
   639			info = "noirq bus ";
   640			callback = pm_noirq_op(dev->bus->pm, state);
   641		}
   642		if (callback)
   643			goto Run;
   644	
   645		if (skip_resume)
 > 646			goto skip;
   647	
   648		if (dev->driver && dev->driver->pm) {
   649			info = "noirq driver ";
   650			callback = pm_noirq_op(dev->driver->pm, state);
   651		}
   652	
   653	Run:
   654		error = dpm_run_callback(callback, dev, state, info);
   655	
   656	Skip:
   657		dev->power.is_noirq_suspended = false;
   658	
   659	Out:
   660		complete_all(&dev->power.completion);
   661		TRACE_RESUME(error);
   662		return error;
   663	}
   664	

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

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux