From patchwork Fri Jun 30 04:52:14 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arvind Yadav X-Patchwork-Id: 9818409 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 09A3860224 for ; Fri, 30 Jun 2017 04:52:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F048528573 for ; Fri, 30 Jun 2017 04:52:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E48CF285C8; Fri, 30 Jun 2017 04:52:30 +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=-6.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM 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 9EF5E28573 for ; Fri, 30 Jun 2017 04:52:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751715AbdF3Ew2 (ORCPT ); Fri, 30 Jun 2017 00:52:28 -0400 Received: from mail-pg0-f68.google.com ([74.125.83.68]:34439 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751599AbdF3Ew2 (ORCPT ); Fri, 30 Jun 2017 00:52:28 -0400 Received: by mail-pg0-f68.google.com with SMTP id j186so14096791pge.1; Thu, 29 Jun 2017 21:52:27 -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=naHavYfvqKSzMog14YdwYuMHicKVruSR+mhsPdLe7WA=; b=TNPvhir9OT1F9Jc60J2V7j/KvpNisNN6FjQp2u1Fdcow7tiRJiC5htKJc7iiY9k5QH sUbQfLtAAp/gSb9lhV3qqGOa5iKA0b+nqcWaKogbABeU5cnbysjapLv5SmbWhF8WmQao QkRVWlWgARhBWRkQ1KAfC+l27/nwmG/YDjeUJcwoOnQkQcpQ4UxBCZKGrMgy5buILv9d V3bpfblYqy6lmT3VgYoPaCV2S+IT8wYH0+H+iZUyjI45VJWt03NyFrVdur3DjNTvlNwy dX8Xsz1iGh/k04jcmxBNMBJTQmbjh0DcsqhVslTPNoJFf1KLFOIW02U3IEQjj2Rw56/4 o8eg== 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=naHavYfvqKSzMog14YdwYuMHicKVruSR+mhsPdLe7WA=; b=P4mN9Hj6w4F7VBWV3qkPAtv6LenjrBimYxpJ7eWkZ7N06gLMg6r8kijlmGnJ31TAFj lm1jDq41rY/+4s/lXD7xIuWiPX37EudriBs5MfgWDq6D41+LJW9TrUduLYSVs230bIDq VEC8pj0xUtruYgXG7OkzAhdQkSqqyaLCrNeELxQupzuzUarEm/kJg/+R1YDkmVs1cLKl UOMDgtV+OGci/YRJOqGkM+1j1IxxAlXgPU+jjkxVHHURP/YMzS4I4rWoj9Ap2EodaMW+ UgT2sdQ6yjJW4kSJjmNo18mM6CBd+YWWj5RX/yL8rIfziCVWWvM2cE3nCyldsxE7L6SN c1Qw== X-Gm-Message-State: AKS2vOxhkeJC7a9PgeJlAiNQT+ko2rHFdaGrkTBhgOYpy3kN7YWzZ7ye VNCyhwQ4z0kJFA== X-Received: by 10.84.236.76 with SMTP id h12mr22554120pln.10.1498798347190; Thu, 29 Jun 2017 21:52:27 -0700 (PDT) Received: from symbol-HP-Z420-Workstation.zebra.lan ([223.31.70.102]) by smtp.googlemail.com with ESMTPSA id y28sm14333677pfd.32.2017.06.29.21.52.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 29 Jun 2017 21:52:26 -0700 (PDT) From: Arvind Yadav To: rjw@rjwysocki.net, len.brown@intel.com, pavel@ucw.cz, rafael.j.wysocki@intel.com Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] PM / sleep: constify attribute_group structures. Date: Fri, 30 Jun 2017 10:22:14 +0530 Message-Id: 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 attribute_groups are not supposed to change at runtime. All functions working with attribute_groups provided by work with const attribute_group. So mark the non-const structs as const. File size before: text data bss dec hex filename 3802 624 32 4458 116a kernel/power/main.o File size After adding 'const': text data bss dec hex filename 3866 560 32 4458 116a kernel/power/main.o Signed-off-by: Arvind Yadav Acked-by: Pavel Machek --- kernel/power/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/power/main.c b/kernel/power/main.c index d401c21..42bd800 100644 --- a/kernel/power/main.c +++ b/kernel/power/main.c @@ -705,7 +705,7 @@ static ssize_t pm_freeze_timeout_store(struct kobject *kobj, NULL, }; -static struct attribute_group attr_group = { +static const struct attribute_group attr_group = { .attrs = g, };