From patchwork Mon Jul 3 08:10:33 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arvind Yadav X-Patchwork-Id: 9822159 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 3271960237 for ; Mon, 3 Jul 2017 08:10:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2898E2853A for ; Mon, 3 Jul 2017 08:10:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1D0D12854A; Mon, 3 Jul 2017 08:10:58 +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 B8F4C2853A for ; Mon, 3 Jul 2017 08:10:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752564AbdGCIKz (ORCPT ); Mon, 3 Jul 2017 04:10:55 -0400 Received: from mail-pg0-f66.google.com ([74.125.83.66]:34289 "EHLO mail-pg0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752558AbdGCIKy (ORCPT ); Mon, 3 Jul 2017 04:10:54 -0400 Received: by mail-pg0-f66.google.com with SMTP id j186so22363367pge.1; Mon, 03 Jul 2017 01:10:48 -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=3WtC2p1y0Wj+MaYGeFe+uLJibyA+cYpjs2EEtAUcNK0=; b=RyWoA++tfVqV6pOHjpgijv4YhIPR/wav/4Zw59rcvndp5e4BVvw9EA3MGyiDeEd06a w9iafp+qUJsWWt0gYqhlfPL5meHKCRkc9rA1Q6j0Wgx+b4op3ZS5N1gFpC1QSO85dzlv 52j70sp6xAgMxTkQaAbUdIDgOgV4OB3UDFwkf/mIrJRfE+ywpgulj72jQyUi3CLIPiTe knwkIQ2rUxPjfWmPz7C5pAEk8iGQ9/78wb+Sa7HhYcdA+e6axEllLSpeh68qNQrjSrpM +wWKeIPm2Zf2IvHaWIfoUGvaS2Uiwl3QjFB5NAZB34VcZgmZjPbei43wtZmwbVrqH0vK 2+/A== 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=3WtC2p1y0Wj+MaYGeFe+uLJibyA+cYpjs2EEtAUcNK0=; b=UunW82p7auJxJliLS1j8x8hP66eX+5luCrUr0tdI2GxNl/a8XwGn/QzmgpGaxBuhK7 ihOGVHoBOw0rZQ7MzBO0ipiODypVQ7/8QgpxAk8HNkPbsnBszaJCHrk1+NO23TAsu51i UfO74u7lu2rXqaVWilHiyoq+fieMGMfeOdxT/nMB/TeB1pZY5PEzXjiJp7173A+7hIlD +HZYlN0vVU50n+5jGputtzMXfiYZHxaYOLhm4eKoWZMJ6A868WKeCv6SESJ/F9QCXH7o 84DeeQ1qqpqrtqju1LxLsL/5GQMQIrUrj7rJEJzs9x1XxYb6Sp5GEdXFpFBXPdDZ5iqH F/Wg== X-Gm-Message-State: AIVw110fwNaYixuLwRjEV18dSK+/lbxkvIGbpGrLbXJ4g+FspV3QTXSX cSpU7baWX3KCeQ== X-Received: by 10.98.55.199 with SMTP id e190mr8720382pfa.15.1499069448371; Mon, 03 Jul 2017 01:10:48 -0700 (PDT) Received: from symbol-HP-Z420-Workstation.zebra.lan ([223.31.70.102]) by smtp.googlemail.com with ESMTPSA id 83sm4509103pfa.113.2017.07.03.01.10.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 03 Jul 2017 01:10:47 -0700 (PDT) From: Arvind Yadav To: srinivas.pandruvada@linux.intel.com, lenb@kernel.org, rjw@rjwysocki.net, rafael.j.wysocki@intel.com, viresh.kumar@linaro.org Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] cpufreq: intel_pstate: constify attribute_group structures. Date: Mon, 3 Jul 2017 13:40:33 +0530 Message-Id: <229e26ffc410cf4908c55ca0cb13906fd4bf4cf5.1499068985.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 15197 2552 40 17789 457d drivers/cpufreq/intel_pstate.o File size After adding 'const': text data bss dec hex filename 15261 2488 40 17789 457d drivers/cpufreq/intel_pstate.o Signed-off-by: Arvind Yadav Acked-by: Viresh Kumar --- drivers/cpufreq/intel_pstate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c index b7de5bd..4323f94 100644 --- a/drivers/cpufreq/intel_pstate.c +++ b/drivers/cpufreq/intel_pstate.c @@ -1212,7 +1212,7 @@ static ssize_t store_min_perf_pct(struct kobject *a, struct attribute *b, NULL }; -static struct attribute_group intel_pstate_attr_group = { +static const struct attribute_group intel_pstate_attr_group = { .attrs = intel_pstate_attributes, };