From patchwork Tue Jul 11 10:48:15 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arvind Yadav X-Patchwork-Id: 9834411 X-Patchwork-Delegate: dvhart@infradead.org 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 3D40260318 for ; Tue, 11 Jul 2017 10:49:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2F43026861 for ; Tue, 11 Jul 2017 10:49:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 24364283FD; Tue, 11 Jul 2017 10:49:07 +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 D16AB26861 for ; Tue, 11 Jul 2017 10:49:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932394AbdGKKs7 (ORCPT ); Tue, 11 Jul 2017 06:48:59 -0400 Received: from mail-pf0-f196.google.com ([209.85.192.196]:33663 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932311AbdGKKs4 (ORCPT ); Tue, 11 Jul 2017 06:48:56 -0400 Received: by mail-pf0-f196.google.com with SMTP id e199so18500360pfh.0; Tue, 11 Jul 2017 03:48:56 -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; bh=rlAvUmhy+wX3QKz49T+NvUerslZxc6M6UyZNWJPdtQQ=; b=gBhhVrx+ohdZW4K/A9CU0KvfM9aGWvVfRgg4aeyd+upKw9inu7lxGTthYu49znplm9 TnRFKIEgC8sK/cy3T52u1Oba5f7X87pQ1wy5CJQhUlPnftPZloeE/tgTok3/jPQhFJss PilcPxqIYRoesaZIVtFn++SbBmUlnRu3Cn+cXM5h9hnF+D59Bp9LINM6HtV/N+QLmjsp JbI6U/1O2edwzHSEftG2zx7KwcjUfgAtlZ7D5hkF91x7+HYnit55TcP90SHE9bIldU6U YytbLc0kkfmP1SONrZjCmVUuXCrziz2ddJLJQ3BK9eW6gTdAuPMqpBdEwyTh/UZKZ6yI 3xqA== 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; bh=rlAvUmhy+wX3QKz49T+NvUerslZxc6M6UyZNWJPdtQQ=; b=b4jrpvKMqWyPaGgEw7TmiUkFBCHs5L5ng9xl0bm/Vr9Th62wLCCr78zodB9H7fgQPJ BJiFlLxVdRWCykXsPdRTnMY/FxXsdFn+Q4XGxWMS8eZGjTAxbuiQIHvMWoH6mYit0Vow aSSpFMtXgCywlkiqof7orsKV+UVSfofsL9yFy6glk5PHVlQyO9sjzAFOQ7/3O6ENEWD6 lonarLwxBzO0DUawLaTSsGTS7H36pCKhnAa3v5mS1n6cNALENOLFp9L1Ef+THT/sfupx UICMqNbh5pSRI7HBo+LVoMeT3GbVEFtYYRRZovA15R4RZZ9sX5Lt65SwjMp9nMkcrFok yvGg== X-Gm-Message-State: AIVw112g/YncsB9npCfLbK2TbvSa68mFubIWCUpeQ9CMc7MmkppYd3Ps sjPgvc8jI/LnyA== X-Received: by 10.84.169.36 with SMTP id g33mr23729453plb.52.1499770136280; Tue, 11 Jul 2017 03:48:56 -0700 (PDT) Received: from symbol-HP-Z420-Workstation.zebra.lan ([223.31.70.102]) by smtp.googlemail.com with ESMTPSA id r207sm29656163pfr.106.2017.07.11.03.48.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 11 Jul 2017 03:48:55 -0700 (PDT) From: Arvind Yadav To: dvhart@infradead.org, andy@infradead.org, jwoithe@just42.net, cezary.jackiewicz@gmail.com, corentin.chary@gmail.com, laforge@gnumonks.org, coproscefalo@gmail.com Cc: platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/7] platform/x86: compal-laptop: constify attribute_group structures. Date: Tue, 11 Jul 2017 16:18:15 +0530 Message-Id: <1499770100-18632-3-git-send-email-arvind.yadav.cs@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1499770100-18632-1-git-send-email-arvind.yadav.cs@gmail.com> References: <1499770100-18632-1-git-send-email-arvind.yadav.cs@gmail.com> Sender: platform-driver-x86-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: platform-driver-x86@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 6781 6144 34 12959 329f drivers/platform/x86/compal-laptop.o File size After adding 'const': text data bss dec hex filename 6845 6080 34 12959 329f drivers/platform/x86/compal-laptop.o Signed-off-by: Arvind Yadav --- drivers/platform/x86/compal-laptop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/platform/x86/compal-laptop.c b/drivers/platform/x86/compal-laptop.c index e1c2b6d..a8e4a53 100644 --- a/drivers/platform/x86/compal-laptop.c +++ b/drivers/platform/x86/compal-laptop.c @@ -718,7 +718,7 @@ static DEVICE_ATTR(pwm1_enable, &dev_attr_wake_up_mouse.attr, NULL }; -static struct attribute_group compal_platform_attr_group = { +static const struct attribute_group compal_platform_attr_group = { .attrs = compal_platform_attrs };