From patchwork Mon Jul 3 10:10: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: 9822405 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 9D93B602F0 for ; Mon, 3 Jul 2017 10:10:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8EF4D27D4D for ; Mon, 3 Jul 2017 10:10:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 81E3F2811A; Mon, 3 Jul 2017 10:10:20 +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 30ED127D4D for ; Mon, 3 Jul 2017 10:10:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752199AbdGCKKT (ORCPT ); Mon, 3 Jul 2017 06:10:19 -0400 Received: from mail-pf0-f193.google.com ([209.85.192.193]:36112 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752179AbdGCKKS (ORCPT ); Mon, 3 Jul 2017 06:10:18 -0400 Received: by mail-pf0-f193.google.com with SMTP id z6so25374271pfk.3; Mon, 03 Jul 2017 03:10:18 -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=Ge3kyjLK99IyU9DS5RBSif27alPasBu6P6sVg5h4s7c=; b=n9TvAeUFfQw+wTK+SwgAOjHPity9WpgVr5caoyNDoBvj1zIncPfbmEBAptikO12DB9 SiWCECIA+4XBHbUKqFWJgn+U+ELNcRTomHjLt1cYbLAaTFBEUYCAyoVrZUgopzd+Ukel Tj9Tdro516mHZUcugeClbBYX/NpmbLC648ITzmFlZ+zTdtjYhIW+iwvwKcMFCWgrMeZM MKvgCu7cVJso4bAwU+gVlyUJ9uuej83R2CX7gtm8GvtNDKPXWowHC/Mot7WKltDDXi99 OqTiwxgq4D7cIbASt8VZdqqnehuwtcOd3sNVYuURjLOJJjJMsiV+TlpGplVpfma1vm1y xpOg== 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=Ge3kyjLK99IyU9DS5RBSif27alPasBu6P6sVg5h4s7c=; b=aU+E7n+xRPyP0hVHNFAY997qWgdTwdmcgxCZ70Fz656MCfmASFOJisv9uSQXqJ59VW EzYCkQhbbHEh+QxU8wNO4ngdVefCNPHPe5B/q/zravrhLr2FkapG35cQd+bHoflbR5fj H7Exm2uO+VgDPtVRTFyleB6PG0HAZ9gdQf+/PoAO1Zoij1bk8mllUH+XcGREbPA8122i oxh5NPAd2jk2sC6oFM28OAZ6eX1G7xVL4J+qbliRnuucuHs5yX1o6RrgYegSO4EYUktN +JUauHBTEwE+ZpsCXoLGo8PhuZUmW5JmvYfrc+a95XiHpe/F+nxFCuhUy9iGVTj9Zt0F tNxw== X-Gm-Message-State: AIVw1128pZXBnxMbi8wnZCAuYR9KvIZLsODtDzI7gmWxY+fJODJ0l/tv 2ZgMQuVvE7Z6vNrOTPg= X-Received: by 10.99.96.204 with SMTP id u195mr9400382pgb.125.1499076617778; Mon, 03 Jul 2017 03:10:17 -0700 (PDT) Received: from symbol-HP-Z420-Workstation.zebra.lan ([223.31.70.102]) by smtp.googlemail.com with ESMTPSA id q29sm27768323pfg.11.2017.07.03.03.10.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 03 Jul 2017 03:10:17 -0700 (PDT) From: Arvind Yadav To: myungjoo.ham@samsung.com, kyungmin.park@samsung.com, cw00.choi@samsung.com Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] PM / devfreq: constify attribute_group structures. Date: Mon, 3 Jul 2017 15:40:04 +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 621 176 0 797 31d drivers/devfreq/governor_userspace.o File size After adding 'const': text data bss dec hex filename 670 144 0 814 32e drivers/devfreq/governor_userspace.o Signed-off-by: Arvind Yadav Reviewed-by: Chanwoo Choi Acked-by: MyungJoo Ham --- drivers/devfreq/governor_userspace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/devfreq/governor_userspace.c b/drivers/devfreq/governor_userspace.c index 1769760..77028c2 100644 --- a/drivers/devfreq/governor_userspace.c +++ b/drivers/devfreq/governor_userspace.c @@ -86,7 +86,7 @@ static ssize_t show_freq(struct device *dev, struct device_attribute *attr, &dev_attr_set_freq.attr, NULL, }; -static struct attribute_group dev_attr_group = { +static const struct attribute_group dev_attr_group = { .name = "userspace", .attrs = dev_entries, };