From patchwork Tue Jul 11 10:48:20 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arvind Yadav X-Patchwork-Id: 9834419 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 5CDCF60318 for ; Tue, 11 Jul 2017 10:49:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4DCB926861 for ; Tue, 11 Jul 2017 10:49:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 41394283FD; Tue, 11 Jul 2017 10:49:19 +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=ham 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 EB593283F9 for ; Tue, 11 Jul 2017 10:49:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932591AbdGKKtQ (ORCPT ); Tue, 11 Jul 2017 06:49:16 -0400 Received: from mail-pg0-f67.google.com ([74.125.83.67]:34827 "EHLO mail-pg0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932311AbdGKKtO (ORCPT ); Tue, 11 Jul 2017 06:49:14 -0400 Received: by mail-pg0-f67.google.com with SMTP id d193so16375704pgc.2; Tue, 11 Jul 2017 03:49:14 -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=u2UCOeCnshUVhcIOKXmo/zB1ZMfxuUak5Y9xUiDrXpE=; b=O5/KMwuOwcu6r77s6VZnoJjdNT7zAj6O26DNIUMLfvVGHLWCvTuZu7oclHxB3q4N4z n8tH8kzI6QJUHpP/bzvyypkAccVibbt+OVg3CdD6NsDqM6oczaUqf5XZqyQz8Q5QuLTa F/NlaWE4wzL0f2yELO9fOaDO+ahkMmcBZ38A1jiy7AsXp2aOs7HztobLkGxgAk7YUdMB 431pWPVwOXiB/i1QFUdu7EKwd93siM1jxU9gLg+q6bRv9RUDsU/raUOrpnACXS0ClwoZ QfKqzauRY04FnjNfGl45gyo2Wm5VhT/z7AsPmvhPwww++OwjXzBZoWN1uXC4FKIBnCWR 6A2A== 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=u2UCOeCnshUVhcIOKXmo/zB1ZMfxuUak5Y9xUiDrXpE=; b=QTpsyO6I9TG5x2FVQWAxiPVAJeNUa/U8TI/7uBS6B8q/mAOoxWom6wSGvHlHMaKdjP EgSE8THp54A2ebYfYvtQ5r7MNaNXKXwJtxFj9kIFUQ66EhhP3GZ6rZslsOClIR7w1jhS +vYVatyFLu/5Bl1Z9a2Lk7BoS0JK8haIZMx7bpd993+ERL/4MqJLZLAq/Pc9uHavDS0l Hynpa57YVozn9ipoCYmldhO15o3LrAnw+Y8tZXYoayfqZjtNQw5YRJUf8CA5UfDJcq/p JDg/SWI1xVQMiGMLU3l6GkSOBlgpUCO2X0/+yYkSN82XCiEARFQ0pJD2Ud1g7clfx6c7 YGsw== X-Gm-Message-State: AIVw1104JRXjkMUX1vLDAgO2Xu+o7VxiQJR/J3HPcMYYkyJvnsLIPrLL 5ExTPCOQZ8RLYQ== X-Received: by 10.84.177.131 with SMTP id x3mr22536367plb.83.1499770153702; Tue, 11 Jul 2017 03:49:13 -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.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 11 Jul 2017 03:49:13 -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 7/7] platform/x86: toshiba_acpi: constify attribute_group structures. Date: Tue, 11 Jul 2017 16:18:20 +0530 Message-Id: <1499770100-18632-8-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 26360 1072 24 27456 6b40 drivers/platform/x86/toshiba_acpi.o File size After adding 'const': text data bss dec hex filename 26424 1008 24 27456 6b40 drivers/platform/x86/toshiba_acpi.o Signed-off-by: Arvind Yadav --- drivers/platform/x86/toshiba_acpi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/platform/x86/toshiba_acpi.c b/drivers/platform/x86/toshiba_acpi.c index 88f9f79..bb1dcd7 100644 --- a/drivers/platform/x86/toshiba_acpi.c +++ b/drivers/platform/x86/toshiba_acpi.c @@ -2419,7 +2419,7 @@ static umode_t toshiba_sysfs_is_visible(struct kobject *kobj, return exists ? attr->mode : 0; } -static struct attribute_group toshiba_attr_group = { +static const struct attribute_group toshiba_attr_group = { .is_visible = toshiba_sysfs_is_visible, .attrs = toshiba_attributes, };