From: Ravi Chandra Sadineni <ravisadineni@chromium.org>
To: tglx@linutronix.de, mingo@redhat.com, bp@alien8.de,
hpa@zytor.com, x86@kernel.org, rjw@rjwysocki.net, pavel@ucw.cz,
len.brown@intel.com, gregkh@linuxfoundation.org,
ravisadineni@chromium.org, bhe@redhat.com, dyoung@redhat.com,
linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org,
tbroch@chromium.org
Subject: [PATCH] power: sysfs: Remove wakeup_abort_count attribute.
Date: Mon, 22 Jul 2019 10:04:07 -0700 [thread overview]
Message-ID: <20190722170407.217178-1-ravisadineni@chromium.org> (raw)
wakeup_abort_count and wakeup_count sysfs entries print the
same (wakeup_count) attribute. This patch removes the duplicate
wakeup_abort_count sysfs entry.
Signed-off-by: Ravi Chandra Sadineni <ravisadineni@chromium.org>
---
Documentation/ABI/testing/sysfs-devices-power | 25 ++++++-------------
drivers/base/power/sysfs.c | 19 --------------
2 files changed, 7 insertions(+), 37 deletions(-)
diff --git a/Documentation/ABI/testing/sysfs-devices-power b/Documentation/ABI/testing/sysfs-devices-power
index 80a00f7b6667..1ca04b4f0489 100644
--- a/Documentation/ABI/testing/sysfs-devices-power
+++ b/Documentation/ABI/testing/sysfs-devices-power
@@ -81,12 +81,13 @@ What: /sys/devices/.../power/wakeup_count
Date: September 2010
Contact: Rafael J. Wysocki <rjw@rjwysocki.net>
Description:
- The /sys/devices/.../wakeup_count attribute contains the number
- of signaled wakeup events associated with the device. This
- attribute is read-only. If the device is not capable to wake up
- the system from sleep states, this attribute is not present.
- If the device is not enabled to wake up the system from sleep
- states, this attribute is empty.
+ The /sys/devices/.../wakeup_count attribute contains the
+ number of times the processing of a wakeup event associated with
+ the device might have aborted system transition into a sleep
+ state in progress. This attribute is read-only. If the device
+ is not capable to wake up the system from sleep states, this
+ attribute is not present. If the device is not enabled to wake
+ up the system from sleep states, this attribute is empty.
What: /sys/devices/.../power/wakeup_active_count
Date: September 2010
@@ -100,18 +101,6 @@ Description:
the device is not enabled to wake up the system from sleep
states, this attribute is empty.
-What: /sys/devices/.../power/wakeup_abort_count
-Date: February 2012
-Contact: Rafael J. Wysocki <rjw@rjwysocki.net>
-Description:
- The /sys/devices/.../wakeup_abort_count attribute contains the
- number of times the processing of a wakeup event associated with
- the device might have aborted system transition into a sleep
- state in progress. This attribute is read-only. If the device
- is not capable to wake up the system from sleep states, this
- attribute is not present. If the device is not enabled to wake
- up the system from sleep states, this attribute is empty.
-
What: /sys/devices/.../power/wakeup_expire_count
Date: February 2012
Contact: Rafael J. Wysocki <rjw@rjwysocki.net>
diff --git a/drivers/base/power/sysfs.c b/drivers/base/power/sysfs.c
index 1b9c281cbe41..f42044d9711c 100644
--- a/drivers/base/power/sysfs.c
+++ b/drivers/base/power/sysfs.c
@@ -375,24 +375,6 @@ static ssize_t wakeup_active_count_show(struct device *dev,
static DEVICE_ATTR_RO(wakeup_active_count);
-static ssize_t wakeup_abort_count_show(struct device *dev,
- struct device_attribute *attr,
- char *buf)
-{
- unsigned long count = 0;
- bool enabled = false;
-
- spin_lock_irq(&dev->power.lock);
- if (dev->power.wakeup) {
- count = dev->power.wakeup->wakeup_count;
- enabled = true;
- }
- spin_unlock_irq(&dev->power.lock);
- return enabled ? sprintf(buf, "%lu\n", count) : sprintf(buf, "\n");
-}
-
-static DEVICE_ATTR_RO(wakeup_abort_count);
-
static ssize_t wakeup_expire_count_show(struct device *dev,
struct device_attribute *attr,
char *buf)
@@ -580,7 +562,6 @@ static struct attribute *wakeup_attrs[] = {
&dev_attr_wakeup.attr,
&dev_attr_wakeup_count.attr,
&dev_attr_wakeup_active_count.attr,
- &dev_attr_wakeup_abort_count.attr,
&dev_attr_wakeup_expire_count.attr,
&dev_attr_wakeup_active.attr,
&dev_attr_wakeup_total_time_ms.attr,
--
2.20.1
next reply other threads:[~2019-07-22 17:04 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-22 17:04 Ravi Chandra Sadineni [this message]
2019-07-22 18:24 ` [PATCH] power: sysfs: Remove wakeup_abort_count attribute Greg KH
2019-07-22 22:33 ` [PATCH 0/2] power: Refactor device level sysfs Ravi Chandra Sadineni
2019-07-22 22:33 ` [PATCH 1/2 V2] power: sysfs: Remove wakeup_abort_count attribute Ravi Chandra Sadineni
2019-07-23 7:07 ` Greg KH
2019-07-22 22:33 ` [PATCH 2/2 V2] power:sysfs: Expose device wakeup_event_count Ravi Chandra Sadineni
2019-07-23 7:07 ` Greg KH
2019-07-23 7:44 ` [PATCH 0/2] power: Refactor device level sysfs Rafael J. Wysocki
2019-07-23 16:56 ` Ravi Chandra Sadineni
2019-07-23 17:02 ` Rafael J. Wysocki
2019-07-23 17:25 ` Ravi Chandra Sadineni
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=20190722170407.217178-1-ravisadineni@chromium.org \
--to=ravisadineni@chromium.org \
--cc=bhe@redhat.com \
--cc=bp@alien8.de \
--cc=dyoung@redhat.com \
--cc=gregkh@linuxfoundation.org \
--cc=hpa@zytor.com \
--cc=len.brown@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=pavel@ucw.cz \
--cc=rjw@rjwysocki.net \
--cc=tbroch@chromium.org \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).