diff mbox series

base:power:sysfs: Remove redundant attribute runtime_status in runtime_attrs

Message ID 1590053147-32207-1-git-send-email-chenxiang66@hisilicon.com (mailing list archive)
State Not Applicable, archived
Headers show
Series base:power:sysfs: Remove redundant attribute runtime_status in runtime_attrs | expand

Commit Message

chenxiang May 21, 2020, 9:25 a.m. UTC
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(-)

Comments

kernel test robot May 21, 2020, 1:05 p.m. UTC | #1
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
chenxiang May 22, 2020, 3:18 a.m. UTC | #2
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
diff mbox series

Patch

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,