Linux-PM Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] base:power:sysfs: Remove redundant attribute runtime_status in runtime_attrs
@ 2020-05-21  9:25 chenxiang
  2020-05-21 13:05 ` kbuild test robot
  0 siblings, 1 reply; 3+ messages in thread
From: chenxiang @ 2020-05-21  9:25 UTC (permalink / raw)
  To: rafael, pavel, sre; +Cc: john.garry, linux-pm, linuxarm, Xiang Chen

From: Xiang Chen <chenxiang66@hisilicon.com>

The attribute runtime_status is already defined in power_attrs, and
it is not necessary to define it again in runtime_attrs, so remove it.

Signed-off-by: Xiang Chen <chenxiang66@hisilicon.com>
---
 drivers/base/power/sysfs.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/base/power/sysfs.c b/drivers/base/power/sysfs.c
index 2b99fe1..3ef4adf 100644
--- a/drivers/base/power/sysfs.c
+++ b/drivers/base/power/sysfs.c
@@ -613,9 +613,6 @@ static const struct attribute_group pm_wakeup_attr_group = {
 };
 
 static struct attribute *runtime_attrs[] = {
-#ifndef CONFIG_PM_ADVANCED_DEBUG
-	&dev_attr_runtime_status.attr,
-#endif
 	&dev_attr_control.attr,
 	&dev_attr_runtime_suspended_time.attr,
 	&dev_attr_runtime_active_time.attr,
-- 
2.8.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] base:power:sysfs: Remove redundant attribute runtime_status in runtime_attrs
  2020-05-21  9:25 [PATCH] base:power:sysfs: Remove redundant attribute runtime_status in runtime_attrs chenxiang
@ 2020-05-21 13:05 ` kbuild test robot
  2020-05-22  3:18   ` chenxiang (M)
  0 siblings, 1 reply; 3+ messages in thread
From: kbuild test robot @ 2020-05-21 13:05 UTC (permalink / raw)
  To: chenxiang, rafael, pavel, sre
  Cc: kbuild-all, john.garry, linux-pm, linuxarm, Xiang Chen


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

Hi chenxiang,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on pm/linux-next]
[also build test WARNING on pavel-linux-leds/for-next v5.7-rc6 next-20200519]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/chenxiang/base-power-sysfs-Remove-redundant-attribute-runtime_status-in-runtime_attrs/20200521-173130
base:   https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git linux-next
config: arm-eseries_pxa_defconfig (attached as .config)
compiler: arm-linux-gnueabi-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
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm 

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

All warnings (new ones prefixed by >>, old ones prefixed by <<):

In file included from drivers/base/power/sysfs.c:3:
include/linux/device.h:132:26: warning: 'dev_attr_runtime_status' defined but not used [-Wunused-variable]
132 |  struct device_attribute dev_attr_##_name = __ATTR_RO(_name)
|                          ^~~~~~~~~
>> drivers/base/power/sysfs.c:177:8: note: in expansion of macro 'DEVICE_ATTR_RO'
177 | static DEVICE_ATTR_RO(runtime_status);
|        ^~~~~~~~~~~~~~

vim +/DEVICE_ATTR_RO +177 drivers/base/power/sysfs.c

0fcb4eef829449 Alan Stern      2010-07-08  176  
47acbd77e6e481 Andy Shevchenko 2017-11-10 @177  static DEVICE_ATTR_RO(runtime_status);
15bcb91d7e607d Alan Stern      2010-09-25  178  

:::::: The code at line 177 was first introduced by commit
:::::: 47acbd77e6e481abf2f41d3a99cb3762f296b2e6 PM / sysfs: Convert to use DEVICE_ATTR_RO / DEVICE_ATTR_RW

:::::: TO: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
:::::: CC: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

---
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: 15557 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] base:power:sysfs: Remove redundant attribute runtime_status in runtime_attrs
  2020-05-21 13:05 ` kbuild test robot
@ 2020-05-22  3:18   ` chenxiang (M)
  0 siblings, 0 replies; 3+ messages in thread
From: chenxiang (M) @ 2020-05-22  3:18 UTC (permalink / raw)
  To: kbuild test robot, rafael, pavel, sre
  Cc: kbuild-all, john.garry, linux-pm, linuxarm

OK, please ignore the patch.

在 2020/5/21 21:05, kbuild test robot 写道:
> Hi chenxiang,
>
> Thank you for the patch! Perhaps something to improve:
>
> [auto build test WARNING on pm/linux-next]
> [also build test WARNING on pavel-linux-leds/for-next v5.7-rc6 next-20200519]
> [if your patch is applied to the wrong git tree, please drop us a note to help
> improve the system. BTW, we also suggest to use '--base' option to specify the
> base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
>
> url:    https://github.com/0day-ci/linux/commits/chenxiang/base-power-sysfs-Remove-redundant-attribute-runtime_status-in-runtime_attrs/20200521-173130
> base:   https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git linux-next
> config: arm-eseries_pxa_defconfig (attached as .config)
> compiler: arm-linux-gnueabi-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
>          # save the attached .config to linux build tree
>          COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm
>
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kbuild test robot <lkp@intel.com>
>
> All warnings (new ones prefixed by >>, old ones prefixed by <<):
>
> In file included from drivers/base/power/sysfs.c:3:
> include/linux/device.h:132:26: warning: 'dev_attr_runtime_status' defined but not used [-Wunused-variable]
> 132 |  struct device_attribute dev_attr_##_name = __ATTR_RO(_name)
> |                          ^~~~~~~~~
>>> drivers/base/power/sysfs.c:177:8: note: in expansion of macro 'DEVICE_ATTR_RO'
> 177 | static DEVICE_ATTR_RO(runtime_status);
> |        ^~~~~~~~~~~~~~
>
> vim +/DEVICE_ATTR_RO +177 drivers/base/power/sysfs.c
>
> 0fcb4eef829449 Alan Stern      2010-07-08  176
> 47acbd77e6e481 Andy Shevchenko 2017-11-10 @177  static DEVICE_ATTR_RO(runtime_status);
> 15bcb91d7e607d Alan Stern      2010-09-25  178
>
> :::::: The code at line 177 was first introduced by commit
> :::::: 47acbd77e6e481abf2f41d3a99cb3762f296b2e6 PM / sysfs: Convert to use DEVICE_ATTR_RO / DEVICE_ATTR_RW
>
> :::::: TO: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> :::::: CC: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
>
> ---
> 0-DAY CI Kernel Test Service, Intel Corporation
> https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, back to index

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-21  9:25 [PATCH] base:power:sysfs: Remove redundant attribute runtime_status in runtime_attrs chenxiang
2020-05-21 13:05 ` kbuild test robot
2020-05-22  3:18   ` chenxiang (M)

Linux-PM Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-pm/0 linux-pm/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-pm linux-pm/ https://lore.kernel.org/linux-pm \
		linux-pm@vger.kernel.org
	public-inbox-index linux-pm

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-pm


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git