From patchwork Mon Jul 3 07:59:04 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arvind Yadav X-Patchwork-Id: 9822123 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 5155260246 for ; Mon, 3 Jul 2017 07:59:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 47BD628503 for ; Mon, 3 Jul 2017 07:59:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 39FEC2852D; Mon, 3 Jul 2017 07:59:41 +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=unavailable 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 E8B9228503 for ; Mon, 3 Jul 2017 07:59:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752498AbdGCH7W (ORCPT ); Mon, 3 Jul 2017 03:59:22 -0400 Received: from mail-pg0-f66.google.com ([74.125.83.66]:35763 "EHLO mail-pg0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752267AbdGCH7T (ORCPT ); Mon, 3 Jul 2017 03:59:19 -0400 Received: by mail-pg0-f66.google.com with SMTP id d193so4009697pgc.2; Mon, 03 Jul 2017 00:59:19 -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=5EE4WqQgUiC/NS3kjj3wmMY0MWb5S76x4oYwJn95DcM=; b=nxjZvFNsfvpvE2OUlarUEeDttR4AYHFbQ9GpjdjYrXiNs/J9ByQcNVo/6BDsYFM/6F YO4tgV0xu9jfx20crnj2QKwgV8HdyWQqURkCfVwqxmnIHtVlltCw7xkbIPdr7SxR4/Z0 LePbOSfCCLGciYlugI8mM27B4wfYTwsw7yQbgTeAajwLfbyNyjii6kdVEQraQXRqIfKq yiwdUaJyAMu/Msn0McKDjridDL+faFHqG651LABsPMUt/hqRFKkWs726jm4pXDCv5oYM N72KbGawvU1CsRG+KSTiXt4pGWg+F4Nl2wnOREWEGLUQHC9h3Yq1ghcrELVNLxX+q4jL 9xOA== 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=5EE4WqQgUiC/NS3kjj3wmMY0MWb5S76x4oYwJn95DcM=; b=ZQbOgUIK5al8OegWJyozgcvK4RrMQ+dgMDgzAYb4l0OVtPBxtZvhu0L6MODXMqpjW5 DOPTqPk6JKHK2l3HMtsf85o8bwBtsCzB7KseJVjFVcTmcMQ7/uSQukfRLRc6DEM0Ss83 3WriKXztDcg5zlJsBtcbvU/ea2/fUXiHbkcuO1r76WEtqYToZFL3a9JzEqG7kthdHsZ9 ZnU4nAkOKvtgLNLEGZw5NgAqXwgqabtibZmzTGMIZfC0dLyRyA7LQUyTU6ZzT9hJW+5Y gJm3lVWg/Zhb5ze188yK8Z7Svjxa8J+JdqB3Z1tZw8OoW4+ObPM62AkgCzkIGwY07Zty QSaw== X-Gm-Message-State: AIVw110uRLOXQTQzXnmiQnzvXBiGY7of9y0l15P9B+LWCcPJ+vpCHUD2 MW5Ic2rWn6remSiqmfg= X-Received: by 10.99.110.8 with SMTP id j8mr8940422pgc.271.1499068758906; Mon, 03 Jul 2017 00:59:18 -0700 (PDT) Received: from symbol-HP-Z420-Workstation.zebra.lan ([223.31.70.102]) by smtp.googlemail.com with ESMTPSA id h80sm35082330pfk.80.2017.07.03.00.59.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 03 Jul 2017 00:59:18 -0700 (PDT) From: Arvind Yadav To: rjw@rjwysocki.net, viresh.kumar@linaro.org Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] cpufreq: cpufreq_stats: constify attribute_group structures. Date: Mon, 3 Jul 2017 13:29:04 +0530 Message-Id: <8211aa191c9b5924a804e4a3304cfb7534b77a13.1499068637.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 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 1655 256 4 1915 77b drivers/cpufreq/cpufreq_stats.o File size After adding 'const': text data bss dec hex filename 1695 192 4 1891 763 drivers/cpufreq/cpufreq_stats.o Signed-off-by: Arvind Yadav Acked-by: Viresh Kumar --- drivers/cpufreq/cpufreq_stats.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/cpufreq/cpufreq_stats.c b/drivers/cpufreq/cpufreq_stats.c index f570ead..d362739 100644 --- a/drivers/cpufreq/cpufreq_stats.c +++ b/drivers/cpufreq/cpufreq_stats.c @@ -135,7 +135,7 @@ static ssize_t show_trans_table(struct cpufreq_policy *policy, char *buf) &trans_table.attr, NULL }; -static struct attribute_group stats_attr_group = { +static const struct attribute_group stats_attr_group = { .attrs = default_attrs, .name = "stats" };