Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp7998409ybi; Tue, 23 Jul 2019 01:00:27 -0700 (PDT) X-Google-Smtp-Source: APXvYqyOyKdpsm4m35QeOQ3pTJX2jFmgQOuzIfuEa0t91NFWhNeI5r69RU10cYnNofGPVDiOEWkW X-Received: by 2002:a17:902:26c:: with SMTP id 99mr82035955plc.215.1563868827356; Tue, 23 Jul 2019 01:00:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563868827; cv=none; d=google.com; s=arc-20160816; b=hV4QbBlBqBd7mPzU/FZEduXk36pHFP7sTu8gY1fxgW6gqb5K7kbGyzwgBdMpEFYpkP 20MYaTQs3gj1a81Tm6/VfTnxX6CviSFGtbGy1JOg0zNxaTo4I6d3Mv9j4ALSUn4zTs1m lHlgLufuE/noRTalOgioMXxzceFm7T8+CENG92tU1OQ0WnAGN1lB5firuZaJ3u/w8+8Y dHCYtQUibCJluCOBMYV0bPJ6yBQAM4L4e03wV636k+MTkYtuW37wvZk79SybHd2EEOE/ UhCsJHJ+tiHTvR80WU6+lCSnhcldJIoDKhxjrx8tQ2Th1U4nycQaf5sMtmH5D3oZdBBc ECyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=WWFTKtpGRlvvtiWS/Mg0wAkpilGgkx7X1cSC4y5EWxE=; b=QpdhLszbORYNfXujSuIo8pQNYOhWaR2p/DYUwJqye68iB9Wf91duVZlqj1JkLJyopP bLoR2phqMfSaUjhIZqxX0JRam7ZGDn9hI8JJMtS32ERjvjUIt4ir1rb+dhgxlTmInYC2 IZ+R2AjGu8HkE3sgIswjeuu/ns7zxCKptLDKTZqc+mYOjc+Mci5KmrLX02BLWBHyX+76 p5NA4xLMhBamRq0X5AxZIGbXJTdd4i0ENwkYxPcuDAakbZ3uyBEgPDTFZQLkZssIbVOl uUiHgWu3Drl0cM6glHM8XgRWZijiMp1AkeruwQiyIT+1girEC9+JQUGpDQEPk7HMz79+ KBlQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="R2/O16xw"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p62si10819080pjp.66.2019.07.23.01.00.11; Tue, 23 Jul 2019 01:00:27 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="R2/O16xw"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731780AbfGVWdp (ORCPT + 99 others); Mon, 22 Jul 2019 18:33:45 -0400 Received: from mail-pg1-f194.google.com ([209.85.215.194]:42269 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726653AbfGVWdm (ORCPT ); Mon, 22 Jul 2019 18:33:42 -0400 Received: by mail-pg1-f194.google.com with SMTP id t132so18327362pgb.9 for ; Mon, 22 Jul 2019 15:33:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=WWFTKtpGRlvvtiWS/Mg0wAkpilGgkx7X1cSC4y5EWxE=; b=R2/O16xw6Vk/KNoxUlhUa5Y+bXgLiwKgbdav7p8y4DZGly/uyjCTGTMmALhIz+umS2 BzWjpf90ZaYSY/iJRimrYmRKxNKa5lfLyYlUtkqPpeXJE1zQboA2EQf93zE2W+kDjXt5 XiLOxoYWuYSBNhATVp5D+auF3i3e+jHCk2Ttg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=WWFTKtpGRlvvtiWS/Mg0wAkpilGgkx7X1cSC4y5EWxE=; b=hpZDCOy0JCbUPfPFfsl6Nr9TLAwmFl769VtfUCsjzwRiaaMeMA0NLS6U6pLeLdCFIE fPrFjE2EQkkGro0BgdslvWEOu3vJbXCIn06aD2ZF8lCneJJZVeFl61q1/O+LWPmuhucC xl4qUlD+Spag02/aVbJp4MlsLZY98e5TdaOikwtN9iGQwIYVzDd3GzEtzTdkLwOMivx3 oXs4pvcCERz66XbngfIrcvsGOV6JZt3XoKKeeH/MPM8gY8JzJubUGjHESa0EcN1hs3MF v2Q0Viy3Tg/+mC/55TKmNO8atPIhHALFrBz7x74py4QfNSS2hJyRDDz2+uCDSQ4hhbnE 481Q== X-Gm-Message-State: APjAAAV16p3JMVRZAgQHJ/tPxgTmG5Cb8CcaWs/jvNWnhb+KbiD3PiPy 88+Rv112lCHhJr2Oj/zqXAkojA== X-Received: by 2002:a17:90a:b011:: with SMTP id x17mr79797580pjq.113.1563834822065; Mon, 22 Jul 2019 15:33:42 -0700 (PDT) Received: from ravisadineni0.mtv.corp.google.com ([2620:15c:202:1:98d2:1663:78dd:3593]) by smtp.gmail.com with ESMTPSA id k186sm20614285pga.68.2019.07.22.15.33.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 22 Jul 2019 15:33:41 -0700 (PDT) From: Ravi Chandra Sadineni 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 1/2 V2] power: sysfs: Remove wakeup_abort_count attribute. Date: Mon, 22 Jul 2019 15:33:36 -0700 Message-Id: <20190722223337.36199-2-ravisadineni@chromium.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190722223337.36199-1-ravisadineni@chromium.org> References: <20190722182451.GB24412@kroah.com> <20190722223337.36199-1-ravisadineni@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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 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 -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 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