Re: [PATCH] ACPI: power: Drop name from struct acpi_power_resource

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

 



Hi "Rafael,

I love your patch! Yet something to improve:

[auto build test ERROR on pm/linux-next]
[also build test ERROR on v5.14-rc7 next-20210825]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Rafael-J-Wysocki/ACPI-power-Drop-name-from-struct-acpi_power_resource/20210826-023528
base:   https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git linux-next
config: x86_64-randconfig-c022-20210825 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
        # https://github.com/0day-ci/linux/commit/f95f6be28951e9fbbe4b8945bf807660e8d4b388
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Rafael-J-Wysocki/ACPI-power-Drop-name-from-struct-acpi_power_resource/20210826-023528
        git checkout f95f6be28951e9fbbe4b8945bf807660e8d4b388
        # save the attached .config to linux build tree
        mkdir build_dir
        make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/

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

All errors (new ones prefixed by >>):

   In file included from include/linux/printk.h:456,
                    from include/linux/kernel.h:19,
                    from drivers/acpi/power.c:26:
   drivers/acpi/power.c: In function '__acpi_power_on':
>> drivers/acpi/power.c:375:54: error: 'struct acpi_power_resource' has no member named 'name'
     375 |  pr_debug("Power resource [%s] turned on\n", resource->name);
         |                                                      ^~
   include/linux/dynamic_debug.h:134:15: note: in definition of macro '__dynamic_func_call'
     134 |   func(&id, ##__VA_ARGS__);  \
         |               ^~~~~~~~~~~
   include/linux/dynamic_debug.h:162:2: note: in expansion of macro '_dynamic_func_call'
     162 |  _dynamic_func_call(fmt, __dynamic_pr_debug,  \
         |  ^~~~~~~~~~~~~~~~~~
   include/linux/printk.h:471:2: note: in expansion of macro 'dynamic_pr_debug'
     471 |  dynamic_pr_debug(fmt, ##__VA_ARGS__)
         |  ^~~~~~~~~~~~~~~~
   drivers/acpi/power.c:375:2: note: in expansion of macro 'pr_debug'
     375 |  pr_debug("Power resource [%s] turned on\n", resource->name);
         |  ^~~~~~~~
   drivers/acpi/power.c: In function 'acpi_power_on_unlocked':
   drivers/acpi/power.c:400:56: error: 'struct acpi_power_resource' has no member named 'name'
     400 |   pr_debug("Power resource [%s] already on\n", resource->name);
         |                                                        ^~
   include/linux/dynamic_debug.h:134:15: note: in definition of macro '__dynamic_func_call'
     134 |   func(&id, ##__VA_ARGS__);  \
         |               ^~~~~~~~~~~
   include/linux/dynamic_debug.h:162:2: note: in expansion of macro '_dynamic_func_call'
     162 |  _dynamic_func_call(fmt, __dynamic_pr_debug,  \
         |  ^~~~~~~~~~~~~~~~~~
   include/linux/printk.h:471:2: note: in expansion of macro 'dynamic_pr_debug'
     471 |  dynamic_pr_debug(fmt, ##__VA_ARGS__)
         |  ^~~~~~~~~~~~~~~~
   drivers/acpi/power.c:400:3: note: in expansion of macro 'pr_debug'
     400 |   pr_debug("Power resource [%s] already on\n", resource->name);
         |   ^~~~~~~~
   drivers/acpi/power.c: In function '__acpi_power_off':
   drivers/acpi/power.c:432:55: error: 'struct acpi_power_resource' has no member named 'name'
     432 |  pr_debug("Power resource [%s] turned off\n", resource->name);
         |                                                       ^~
   include/linux/dynamic_debug.h:134:15: note: in definition of macro '__dynamic_func_call'
     134 |   func(&id, ##__VA_ARGS__);  \
         |               ^~~~~~~~~~~
   include/linux/dynamic_debug.h:162:2: note: in expansion of macro '_dynamic_func_call'
     162 |  _dynamic_func_call(fmt, __dynamic_pr_debug,  \
         |  ^~~~~~~~~~~~~~~~~~
   include/linux/printk.h:471:2: note: in expansion of macro 'dynamic_pr_debug'
     471 |  dynamic_pr_debug(fmt, ##__VA_ARGS__)
         |  ^~~~~~~~~~~~~~~~
   drivers/acpi/power.c:432:2: note: in expansion of macro 'pr_debug'
     432 |  pr_debug("Power resource [%s] turned off\n", resource->name);
         |  ^~~~~~~~
   drivers/acpi/power.c: In function 'acpi_power_off_unlocked':
   drivers/acpi/power.c:442:57: error: 'struct acpi_power_resource' has no member named 'name'
     442 |   pr_debug("Power resource [%s] already off\n", resource->name);
         |                                                         ^~
   include/linux/dynamic_debug.h:134:15: note: in definition of macro '__dynamic_func_call'
     134 |   func(&id, ##__VA_ARGS__);  \
         |               ^~~~~~~~~~~
   include/linux/dynamic_debug.h:162:2: note: in expansion of macro '_dynamic_func_call'
     162 |  _dynamic_func_call(fmt, __dynamic_pr_debug,  \
         |  ^~~~~~~~~~~~~~~~~~
   include/linux/printk.h:471:2: note: in expansion of macro 'dynamic_pr_debug'
     471 |  dynamic_pr_debug(fmt, ##__VA_ARGS__)
         |  ^~~~~~~~~~~~~~~~
   drivers/acpi/power.c:442:3: note: in expansion of macro 'pr_debug'
     442 |   pr_debug("Power resource [%s] already off\n", resource->name);
         |   ^~~~~~~~
   drivers/acpi/power.c:447:58: error: 'struct acpi_power_resource' has no member named 'name'
     447 |   pr_debug("Power resource [%s] still in use\n", resource->name);
         |                                                          ^~
   include/linux/dynamic_debug.h:134:15: note: in definition of macro '__dynamic_func_call'
     134 |   func(&id, ##__VA_ARGS__);  \
         |               ^~~~~~~~~~~
   include/linux/dynamic_debug.h:162:2: note: in expansion of macro '_dynamic_func_call'
     162 |  _dynamic_func_call(fmt, __dynamic_pr_debug,  \
         |  ^~~~~~~~~~~~~~~~~~
   include/linux/printk.h:471:2: note: in expansion of macro 'dynamic_pr_debug'
     471 |  dynamic_pr_debug(fmt, ##__VA_ARGS__)
         |  ^~~~~~~~~~~~~~~~
   drivers/acpi/power.c:447:3: note: in expansion of macro 'pr_debug'
     447 |   pr_debug("Power resource [%s] still in use\n", resource->name);
         |   ^~~~~~~~


vim +375 drivers/acpi/power.c

4533771c1e53b9 Mika Westerberg   2019-06-25  361  
3e384ee6c687cb Rafael J. Wysocki 2010-10-22  362  static int __acpi_power_on(struct acpi_power_resource *resource)
^1da177e4c3f41 Linus Torvalds    2005-04-16  363  {
4533771c1e53b9 Mika Westerberg   2019-06-25  364  	struct acpi_power_dependent_device *dep;
^1da177e4c3f41 Linus Torvalds    2005-04-16  365  	acpi_status status = AE_OK;
^1da177e4c3f41 Linus Torvalds    2005-04-16  366  
82c7d5efaadf99 Rafael J. Wysocki 2013-01-17  367  	status = acpi_evaluate_object(resource->device.handle, "_ON", NULL, NULL);
ca84f18798a457 Rafael J. Wysocki 2021-05-24  368  	if (ACPI_FAILURE(status)) {
ca84f18798a457 Rafael J. Wysocki 2021-05-24  369  		resource->state = ACPI_POWER_RESOURCE_STATE_UNKNOWN;
3e384ee6c687cb Rafael J. Wysocki 2010-10-22  370  		return -ENODEV;
ca84f18798a457 Rafael J. Wysocki 2021-05-24  371  	}
ca84f18798a457 Rafael J. Wysocki 2021-05-24  372  
ca84f18798a457 Rafael J. Wysocki 2021-05-24  373  	resource->state = ACPI_POWER_RESOURCE_STATE_ON;
3e384ee6c687cb Rafael J. Wysocki 2010-10-22  374  
56ce8339d41bf6 Rafael J. Wysocki 2021-01-20 @375  	pr_debug("Power resource [%s] turned on\n", resource->name);
3e384ee6c687cb Rafael J. Wysocki 2010-10-22  376  
4533771c1e53b9 Mika Westerberg   2019-06-25  377  	/*
4533771c1e53b9 Mika Westerberg   2019-06-25  378  	 * If there are other dependents on this power resource we need to
4533771c1e53b9 Mika Westerberg   2019-06-25  379  	 * resume them now so that their drivers can re-initialize the
4533771c1e53b9 Mika Westerberg   2019-06-25  380  	 * hardware properly after it went back to D0.
4533771c1e53b9 Mika Westerberg   2019-06-25  381  	 */
4533771c1e53b9 Mika Westerberg   2019-06-25  382  	if (list_empty(&resource->dependents) ||
4533771c1e53b9 Mika Westerberg   2019-06-25  383  	    list_is_singular(&resource->dependents))
4533771c1e53b9 Mika Westerberg   2019-06-25  384  		return 0;
4533771c1e53b9 Mika Westerberg   2019-06-25  385  
4533771c1e53b9 Mika Westerberg   2019-06-25  386  	list_for_each_entry(dep, &resource->dependents, node) {
4533771c1e53b9 Mika Westerberg   2019-06-25  387  		dev_dbg(dep->dev, "runtime resuming because [%s] turned on\n",
f95f6be28951e9 Rafael J. Wysocki 2021-08-25  388  			resource_dev_name(resource));
4533771c1e53b9 Mika Westerberg   2019-06-25  389  		pm_request_resume(dep->dev);
4533771c1e53b9 Mika Westerberg   2019-06-25  390  	}
4533771c1e53b9 Mika Westerberg   2019-06-25  391  
3e384ee6c687cb Rafael J. Wysocki 2010-10-22  392  	return 0;
3e384ee6c687cb Rafael J. Wysocki 2010-10-22  393  }
3e384ee6c687cb Rafael J. Wysocki 2010-10-22  394  

---
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