From patchwork Mon Jul 17 10:34:39 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arvind Yadav X-Patchwork-Id: 9844481 X-Patchwork-Delegate: rui.zhang@intel.com 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 4653760386 for ; Mon, 17 Jul 2017 10:35:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 38B5327FB3 for ; Mon, 17 Jul 2017 10:35:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2D47A27FB7; Mon, 17 Jul 2017 10:35:45 +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=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 E875727FB3 for ; Mon, 17 Jul 2017 10:35:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751508AbdGQKfg (ORCPT ); Mon, 17 Jul 2017 06:35:36 -0400 Received: from mail-pf0-f193.google.com ([209.85.192.193]:36782 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751476AbdGQKfS (ORCPT ); Mon, 17 Jul 2017 06:35:18 -0400 Received: by mail-pf0-f193.google.com with SMTP id a11so2881825pfj.3; Mon, 17 Jul 2017 03:35: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:in-reply-to:references :in-reply-to:references; bh=n4mJx3rG5ZUISj0TDfSB7mpKj4+992un1rI4ZjcoWKs=; b=FT6hxu/JZBxhUlbL3Nd0DQ1XgWTW4sHyQgAvL5EHp5JkGCtX5bBqjDx5NP8PhWILrJ 3rH/vkgY/ZCSO7JD7P4zuNn/hcqh7lzjTzXomECIhgMHh9vBsuyntCOS0WCQrhU1fqNa 00BNqTS58no37XrKoByTw5/K99TxbkMqbH9echLIWBbXtwR41mV5iTU/GFAwkd0EWLZg WR34J3CitvxIT+Qajan4RAtWytTdh02KCVorrKmG0Oqb2DIFwrrCEEAc0Uk4ebn0+0B0 5wig022B9iKJxGZGd0X0WXmwkRlJhFCFMP0QyAz4DOClCPrRLYeIn1+5TKPMXnMDG2dy CsPw== 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:in-reply-to :references:in-reply-to:references; bh=n4mJx3rG5ZUISj0TDfSB7mpKj4+992un1rI4ZjcoWKs=; b=fPU0aoCx6I5iPqAFlvReJx1tzFD/Y/eYEu5Z7K3Tf6ZLLkVHwRenVP7VvsMfDRX8UE YU7L64KphYfCGLplcD45UYBQrAVJlKTDV244hgtANOtNGQWk5OQs8DUZ+c4sdp6jxv8P vpECQNeDA8FZ0WZ8jvDQ3g+VzvmQi/3psRkaiyybXYOyCtI41BpPJNNLB8htX1FsXh+w CynesQAnUuWGFfHEP1cV3lyR56Fx/M5AZErHMT47VC50emKwuMOfCkUpUWCywQMzoBs4 AHwtfomgATKKC4ucpCB3nrFS5HYuvHCZtUhc5vagRMx3UpJcjmacuCRGh0z/pqdYWBld Nb7A== X-Gm-Message-State: AIVw113Unvgu7ZAw7HjKTcRrgBTj6a3ywK+AXWIDGt3GP0B7ZWeh+0Vj QAainSWpbmTCiA== X-Received: by 10.84.178.131 with SMTP id z3mr29630330plb.271.1500287718216; Mon, 17 Jul 2017 03:35:18 -0700 (PDT) Received: from symbol-HP-Z420-Workstation.zebra.lan ([223.31.70.102]) by smtp.googlemail.com with ESMTPSA id f70sm45874979pfk.27.2017.07.17.03.35.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 17 Jul 2017 03:35:17 -0700 (PDT) From: Arvind Yadav To: rui.zhang@intel.com, edubezval@gmail.com, andriy.shevchenko@linux.intel.com Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/2] thermal: int340x_thermal: Constify attribute_group structures. Date: Mon, 17 Jul 2017 16:04:39 +0530 Message-Id: X-Mailer: git-send-email 1.9.1 In-Reply-To: <3b42983a016cbb0d1fb3b6bab625b78abf843474.1500287619.git.arvind.yadav.cs@gmail.com> References: <3b42983a016cbb0d1fb3b6bab625b78abf843474.1500287619.git.arvind.yadav.cs@gmail.com> In-Reply-To: <3b42983a016cbb0d1fb3b6bab625b78abf843474.1500287619.git.arvind.yadav.cs@gmail.com> References: <3b42983a016cbb0d1fb3b6bab625b78abf843474.1500287619.git.arvind.yadav.cs@gmail.com> 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 3152 1096 8 4256 10a0 processor_thermal_device.o File size After adding 'const': text data bss dec hex filename 3216 1032 8 4256 10a0 processor_thermal_device.o Signed-off-by: Arvind Yadav --- drivers/thermal/int340x_thermal/processor_thermal_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/thermal/int340x_thermal/processor_thermal_device.c b/drivers/thermal/int340x_thermal/processor_thermal_device.c index ff3b36f..f02341f 100644 --- a/drivers/thermal/int340x_thermal/processor_thermal_device.c +++ b/drivers/thermal/int340x_thermal/processor_thermal_device.c @@ -127,7 +127,7 @@ enum proc_thermal_emum_mode_type { NULL }; -static struct attribute_group power_limit_attribute_group = { +static const struct attribute_group power_limit_attribute_group = { .attrs = power_limit_attrs, .name = "power_limits" };