From patchwork Tue Jul 11 10:48:18 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arvind Yadav X-Patchwork-Id: 9834429 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 E0A5F60318 for ; Tue, 11 Jul 2017 10:50:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D28D028448 for ; Tue, 11 Jul 2017 10:50:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C79802844E; Tue, 11 Jul 2017 10:50:23 +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 71AB328448 for ; Tue, 11 Jul 2017 10:50:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932529AbdGKKtK (ORCPT ); Tue, 11 Jul 2017 06:49:10 -0400 Received: from mail-pf0-f193.google.com ([209.85.192.193]:33712 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932469AbdGKKtH (ORCPT ); Tue, 11 Jul 2017 06:49:07 -0400 Received: by mail-pf0-f193.google.com with SMTP id e199so18500823pfh.0; Tue, 11 Jul 2017 03:49:07 -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=AHgacZELOO7BSpIx1pMjNanGHEgqF22dddkvztzffss=; b=t7oX/yTKyTdbzXPX8YtXQr7ugHl8RSfhSX0B5zGV/4HzkAR1yf9kNusISb8KtZVefS NhDckcC1/dl6FjMOJMSG+kdBwKbia8ggxYbwDCQlNt6AWfTLA4tyOGWDlOKG1h33H5UI pAa8we0DXlhAxSmrhE62p7O0LDGdocJ7SP+bSYE60a4T2+d2rc5qDF7ExbLYJS4MKMks yVjWJ3oU+zMS98Rm0xT5aCzbejn4fE1sUDeFlz0HTL56To73Ey18SW/c+TFzXw0OprGa rHSkcBFD4OtujGWQxXt5N6YIrbQH9Py6N+HT5B+gTMhire6wNapID3zFK9evWkNjvB5B isuw== 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=AHgacZELOO7BSpIx1pMjNanGHEgqF22dddkvztzffss=; b=DnIae8EW6ai9f/iXehBz55DQrOM/L0LNfGEo/V1eVqwnZoj0HFHfDnklpH/jRoK0tj hAuBI6cdr20lhcF5dORKDQoTYH+ObwTdFwHXl45k7W+JAFFsCZQ0di39ue0728ikxugf AhgTuSS2RC8sJD3skZLn+haRdJ/rPCi4TM44hv6oT9O4w1RkhGKCixtn8cDiYp0Vb/N9 saCE/9AyUEBBGXnJ+92ADr3wL+NeUhY9PgiirmbBuYVp7RvPt3r4OffzelJ8kQFgdzpS Pp5JEYuMGeJjRsMndLh26ugJmC3n1HKHHFEWnjzOZHtCFmb9Lh9Q+aNLVJjDSEtRt8Au h90w== X-Gm-Message-State: AIVw110Q3JKLv1KAnr2OSDRWw4PCTSG3WC1gBWcIA3KWLaDV3evgIPBe UjYClJj+RMEQiQ== X-Received: by 10.98.87.29 with SMTP id l29mr49838631pfb.3.1499770146591; Tue, 11 Jul 2017 03:49:06 -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.49.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 11 Jul 2017 03:49:06 -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 5/7] platform/x86: panasonic-laptop: constify attribute_group structures. Date: Tue, 11 Jul 2017 16:18:18 +0530 Message-Id: <1499770100-18632-6-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 2505 600 4 3109 c25 drivers/platform/x86/panasonic-laptop.o File size After adding 'const': text data bss dec hex filename 2569 536 4 3109 c25 drivers/platform/x86/panasonic-laptop.o Signed-off-by: Arvind Yadav --- drivers/platform/x86/panasonic-laptop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/platform/x86/panasonic-laptop.c b/drivers/platform/x86/panasonic-laptop.c index 76b0a58..5c39b32 100644 --- a/drivers/platform/x86/panasonic-laptop.c +++ b/drivers/platform/x86/panasonic-laptop.c @@ -437,7 +437,7 @@ static ssize_t set_sticky(struct device *dev, struct device_attribute *attr, NULL, }; -static struct attribute_group pcc_attr_group = { +static const struct attribute_group pcc_attr_group = { .name = NULL, /* put in device directory */ .attrs = pcc_sysfs_entries, };