From patchwork Tue Jul 11 10:48:16 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arvind Yadav X-Patchwork-Id: 9834431 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 AD27A60393 for ; Tue, 11 Jul 2017 10:50:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9C76F28479 for ; Tue, 11 Jul 2017 10:50:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 913D8283F9; Tue, 11 Jul 2017 10:50:34 +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 50C6A2844C for ; Tue, 11 Jul 2017 10:50:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932438AbdGKKtG (ORCPT ); Tue, 11 Jul 2017 06:49:06 -0400 Received: from mail-pg0-f67.google.com ([74.125.83.67]:35765 "EHLO mail-pg0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932311AbdGKKtF (ORCPT ); Tue, 11 Jul 2017 06:49:05 -0400 Received: by mail-pg0-f67.google.com with SMTP id d193so16374781pgc.2; Tue, 11 Jul 2017 03:49:05 -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=oxbBPEJSbzhrb0zowHYUcmv7kwCOJJe7BeGMITvZ3OI=; b=cnRhWSZZrJWMCqdRX3K6PMwaR6W9Vc0S9tpMEC4xWpUMx8/ROEDRAjDMwcFICocnqA XaqTSx0JZMONFODCi5sxDIql2OB5vlRYLI9GknZp2ZqAkZfpXQOBAKcQf4Vb8Dr8bSyq 2CpKpEWAMliZvWkXWd2nZXLVakpaVxGgn6mi5wf2sAP7kguUlzbRSWwebmV1jo2OXp59 Ck+ZF36rBF9TdI3+RfF1ufXG6TWlk95SER4x2cXpeKvTZp0Kky2FHInuy3Kyu+OppvTP Hi/Wr6owfnkM9rNl4qrc6ImymIE5lWAwHf8BftOYx2R/FxBTsg4FtjF/0dVuCxR5WA4G qDaQ== 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=oxbBPEJSbzhrb0zowHYUcmv7kwCOJJe7BeGMITvZ3OI=; b=t7579V1R3GZHc6gT2snCl8e/ZR+X2v6He6JDgaeU/eDo9GdGAeYGleEVqQdPHCx4Wq kAzUvR4yJCX4mDc+U+sw3JkTnYIa/0vITJKvW0es4/sR2btRawJHzYDKIVQF0at6SniM bDA/yxNhLHs4+KrnRrAuTHJRCPd7po2DaJz1BqT8BBcaDTzkzYPxM5091huscldedBwP /snBsaH5h52tESg50kvvZtB1p6siHlNbFxOS1KpO+Cm5KkB5EAAOx4+zB21+fOVqv3bw ijmZcY+l3+MhbiaR1T3bdSxIGPNrJ63i75HgRWyTx91VpwqZE6cBNXnfqDo7k1fG43vQ M9wA== X-Gm-Message-State: AIVw110YzSu8a1JJ68Lp3Dtqpd9QwMSY7gBRL3+lHZXMSl9rRSPhVHKX to4/0vLjqB62PQ== X-Received: by 10.84.217.206 with SMTP id d14mr23025579plj.121.1499770139708; Tue, 11 Jul 2017 03:48:59 -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.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 11 Jul 2017 03:48:59 -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 3/7] platform/x86: samsung-laptop: constify attribute_group structures. Date: Tue, 11 Jul 2017 16:18:16 +0530 Message-Id: <1499770100-18632-4-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 8710 5452 23 14185 3769 drivers/platform/x86/samsung-laptop.o File size After adding 'const': text data bss dec hex filename 8774 5388 23 14185 3769 drivers/platform/x86/samsung-laptop.o Signed-off-by: Arvind Yadav --- drivers/platform/x86/samsung-laptop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/platform/x86/samsung-laptop.c b/drivers/platform/x86/samsung-laptop.c index 5c4dfe4..0c703fe 100644 --- a/drivers/platform/x86/samsung-laptop.c +++ b/drivers/platform/x86/samsung-laptop.c @@ -1232,7 +1232,7 @@ static umode_t samsung_sysfs_is_visible(struct kobject *kobj, return ok ? attr->mode : 0; } -static struct attribute_group platform_attribute_group = { +static const struct attribute_group platform_attribute_group = { .is_visible = samsung_sysfs_is_visible, .attrs = platform_attributes };