From patchwork Mon Jul 17 10:34:38 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arvind Yadav X-Patchwork-Id: 9844483 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 C385B60386 for ; Mon, 17 Jul 2017 10:35:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B601D27FB3 for ; Mon, 17 Jul 2017 10:35:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AAED127FB7; Mon, 17 Jul 2017 10:35:53 +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 66C1F27FB3 for ; Mon, 17 Jul 2017 10:35:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751475AbdGQKfS (ORCPT ); Mon, 17 Jul 2017 06:35:18 -0400 Received: from mail-pf0-f196.google.com ([209.85.192.196]:34762 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751380AbdGQKfQ (ORCPT ); Mon, 17 Jul 2017 06:35:16 -0400 Received: by mail-pf0-f196.google.com with SMTP id o88so1067246pfk.1; Mon, 17 Jul 2017 03:35:16 -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=0Tea86hHqdWeKFAXChWTQaCPg8G9K3P6Ih/W/oj1GgM=; b=Hu/q2cp/douD1rp9tEpt+4PjEDlNS9wDt/1Wx6a3jJp/+Bn0Lprsq+7k5moDmSaE5c sh2BkxLWyetZdEipPwn+Xr4edchr9xpSsZeFxIrE1SgDZCKaBl+icT6Tytzk6NeDaPId 4moqZlOH4fVDa4rQ2paKY1KBOO6/Wf2tBYgn369gTzqh5FYVV2MLZqlPfAEHs2qnNGgD Fmqa20fkw44XBv//aQ+kFgNrHek1xclYIPK7tQMY+zvWF5Ydq/Y/aViJCY37Lp4OuN4V DeIbk9FJaaycCFOKnNKfI0E0vXoXDJfKVH8EzWJjlQaFU3Cyd5yEJUlpPs0jEOH+G2P9 X/9Q== 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=0Tea86hHqdWeKFAXChWTQaCPg8G9K3P6Ih/W/oj1GgM=; b=himkiuafsQq2N51MKMr5kdZBhhFwU2NQjdOrYz4LAyabUAUOvfN00ZfD/UMeUKiMfN 1BYuX+yk+mCu0xZrJCwFdlN3gxlyI+F+aYXfSiOYSn2X9lgfqQcXnZQCRNpFSynNWrSl PRJJR+A3D2qZ+GwiLJ/zj4IITOnG7+4PyXiwjJ0O/VvOiFiUNQzwQ06oXcfG7d+0U3ti ERN5j7I1pR2gwt6x5mPOXnx2X4e3CQWw7Y3or2T12IM3o33EPEQ8M+aFKG4RtX0Pi/V3 2K/LP95+iPNfYdYD4u87gNqoVoj5iIIOCkHiBqNzt7IUP1iILpqFCQqpXdPajf18yBTg Ol3A== X-Gm-Message-State: AIVw113iHFX2G7Trq3CKz2lMaLg6xXU2jEMBT1ZQ76vgYqt64Fl0lRPV f0Vt7UpDAdqj1A== X-Received: by 10.84.234.23 with SMTP id m23mr573383plk.197.1500287715776; Mon, 17 Jul 2017 03:35:15 -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.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 17 Jul 2017 03:35:14 -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 1/2] thermal: int340x: constify attribute_group structures. Date: Mon, 17 Jul 2017 16:04:38 +0530 Message-Id: <3b42983a016cbb0d1fb3b6bab625b78abf843474.1500287619.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 1687 592 0 2279 8e7 int3400_thermal.o File size After adding 'const': text data bss dec hex filename 1751 528 0 2279 8e7 int3400_thermal.o Signed-off-by: Arvind Yadav --- drivers/thermal/int340x_thermal/int3400_thermal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/thermal/int340x_thermal/int3400_thermal.c b/drivers/thermal/int340x_thermal/int3400_thermal.c index a9ec94e..b2ffbed 100644 --- a/drivers/thermal/int340x_thermal/int3400_thermal.c +++ b/drivers/thermal/int340x_thermal/int3400_thermal.c @@ -104,7 +104,7 @@ static ssize_t current_uuid_store(struct device *dev, NULL }; -static struct attribute_group uuid_attribute_group = { +static const struct attribute_group uuid_attribute_group = { .attrs = uuid_attrs, .name = "uuids" };