From patchwork Thu Jun 22 10:53:32 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arvind Yadav X-Patchwork-Id: 9804001 X-Patchwork-Delegate: rjw@sisk.pl Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 1996360386 for ; Thu, 22 Jun 2017 10:54:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0A226285C9 for ; Thu, 22 Jun 2017 10:54:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F2305285EE; Thu, 22 Jun 2017 10:54:16 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 82F5B285C9 for ; Thu, 22 Jun 2017 10:54:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753062AbdFVKyP (ORCPT ); Thu, 22 Jun 2017 06:54:15 -0400 Received: from mail-pg0-f67.google.com ([74.125.83.67]:34952 "EHLO mail-pg0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752934AbdFVKyO (ORCPT ); Thu, 22 Jun 2017 06:54:14 -0400 Received: by mail-pg0-f67.google.com with SMTP id f127so1946029pgc.2; Thu, 22 Jun 2017 03:54:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=OPDSU3QFD+Id82+x5i5uoPs6Zzw9e3AWtrC11RaxVLI=; b=DSpdFA36aHx0wFthQXurQtbtq21q7xybqJNvBpn7qavc5HmyQHZ5CTnBeffwaHPlHv hRyLK0BH5EgqW8efgKhVs6o9IIE/mU+SI1jZQcjc7/qkZiG9jjjA89QFP9lkoZmCoCgv eY2hl0UYSHDhsCh/7TVkr3w16sVKQuW+1dq3D8J9LuGd1Y9HFc1NC90zXhBlJUjVvkAN SkuCorDnon75E0K3HspF4OZQls7LDQsZyAQ/1eURIPO77zDluDBOY6BUokfwAlJMSMZw YGN88iq5IRy+a8qoJYvEmhI6ob42eiQsXElcxIerea0tjYRJCKmIY4eT1OqKxP39b3OP djIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=OPDSU3QFD+Id82+x5i5uoPs6Zzw9e3AWtrC11RaxVLI=; b=DjPO5Lnuy8ojd03niY4FLngd6g4I133Oy3tIOO7s8WHVusyYp6+2Tm3qk/ibRGayKk seBcPW0cCki9AyyxLJ3u40K0S3T6/5xYsHCmWaak3xtWNJCb9g3iWDyNKtC5i0GZ/bwa zXF5DkIVcaQNQFYImVTRKZ/cOzG/tXiZj7DOkF6b3jSo4rpffWgbPhBR3qtGjT7685BF 2zuMKDqDwY9NsMLv5fmj0oHTWo9BfaB8Z6KVKlhne3hskbGm2h1balWFuxrKite3epJv UgS2ycM4qx+HdkgHj8+HniAX0tTgAxaKLbEalY3nitRWmJAxN7dm4qkqhWKwYmp/+gYb hZNg== X-Gm-Message-State: AKS2vOx0RyORnYNzQCpYPxHTAzQL5Nhw0s1NLrpMkxN4U/ROhw0BjUwp ym0saGsK2HKjGg== X-Received: by 10.99.97.69 with SMTP id v66mr1910053pgb.217.1498128853916; Thu, 22 Jun 2017 03:54:13 -0700 (PDT) Received: from symbol-HP-Z420-Workstation.zebra.lan ([223.31.70.102]) by smtp.googlemail.com with ESMTPSA id x3sm3230674pgx.29.2017.06.22.03.54.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 22 Jun 2017 03:54:13 -0700 (PDT) From: Arvind Yadav To: rjw@rjwysocki.net, pavel@ucw.cz, len.brown@intel.com, gregkh@linuxfoundation.org Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] PM / QoS: constify *_attribute_group. Date: Thu, 22 Jun 2017 16:23:32 +0530 Message-Id: <572276af30704b5b79cca4e4864a2c3303e4ab4e.1498128683.git.arvind.yadav.cs@gmail.com> X-Mailer: git-send-email 1.9.1 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP File size before: text data bss dec hex filename 3890 1152 8 5050 13ba drivers/base/power/sysfs.o File size After adding 'const': text data bss dec hex filename 4250 800 8 5058 13c2 drivers/base/power/sysfs.o Signed-off-by: Arvind Yadav Acked-by: Pavel Machek --- drivers/base/power/sysfs.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/base/power/sysfs.c b/drivers/base/power/sysfs.c index 33b4b90..185a525 100644 --- a/drivers/base/power/sysfs.c +++ b/drivers/base/power/sysfs.c @@ -607,7 +607,7 @@ static ssize_t async_store(struct device *dev, struct device_attribute *attr, #endif /* CONFIG_PM_ADVANCED_DEBUG */ NULL, }; -static struct attribute_group pm_attr_group = { +static const struct attribute_group pm_attr_group = { .name = power_group_name, .attrs = power_attrs, }; @@ -629,7 +629,7 @@ static ssize_t async_store(struct device *dev, struct device_attribute *attr, #endif NULL, }; -static struct attribute_group pm_wakeup_attr_group = { +static const struct attribute_group pm_wakeup_attr_group = { .name = power_group_name, .attrs = wakeup_attrs, }; @@ -644,7 +644,7 @@ static ssize_t async_store(struct device *dev, struct device_attribute *attr, &dev_attr_autosuspend_delay_ms.attr, NULL, }; -static struct attribute_group pm_runtime_attr_group = { +static const struct attribute_group pm_runtime_attr_group = { .name = power_group_name, .attrs = runtime_attrs, }; @@ -653,7 +653,7 @@ static ssize_t async_store(struct device *dev, struct device_attribute *attr, &dev_attr_pm_qos_resume_latency_us.attr, NULL, }; -static struct attribute_group pm_qos_resume_latency_attr_group = { +static const struct attribute_group pm_qos_resume_latency_attr_group = { .name = power_group_name, .attrs = pm_qos_resume_latency_attrs, }; @@ -662,7 +662,7 @@ static ssize_t async_store(struct device *dev, struct device_attribute *attr, &dev_attr_pm_qos_latency_tolerance_us.attr, NULL, }; -static struct attribute_group pm_qos_latency_tolerance_attr_group = { +static const struct attribute_group pm_qos_latency_tolerance_attr_group = { .name = power_group_name, .attrs = pm_qos_latency_tolerance_attrs, }; @@ -672,7 +672,7 @@ static ssize_t async_store(struct device *dev, struct device_attribute *attr, &dev_attr_pm_qos_remote_wakeup.attr, NULL, }; -static struct attribute_group pm_qos_flags_attr_group = { +static const struct attribute_group pm_qos_flags_attr_group = { .name = power_group_name, .attrs = pm_qos_flags_attrs, };