From patchwork Tue Jul 11 10:48:14 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arvind Yadav X-Patchwork-Id: 9834433 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 2FE9E60318 for ; Tue, 11 Jul 2017 10:50:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 22919283F9 for ; Tue, 11 Jul 2017 10:50:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2118628458; Tue, 11 Jul 2017 10:50:49 +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 BCEFF283F9 for ; Tue, 11 Jul 2017 10:50:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755024AbdGKKsz (ORCPT ); Tue, 11 Jul 2017 06:48:55 -0400 Received: from mail-pf0-f195.google.com ([209.85.192.195]:34606 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754986AbdGKKsx (ORCPT ); Tue, 11 Jul 2017 06:48:53 -0400 Received: by mail-pf0-f195.google.com with SMTP id c24so18508706pfe.1; Tue, 11 Jul 2017 03:48:53 -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=/cByUu7D2wCnfz9pS+mrY29nV3uGI4hL9oLlRgEAduM=; b=WEe/MgVZQ8zMPc+i1HkdJOQU7mhqWj36l+nAMVRo3T0+4SowkQSHaH3Qu8ftJ1S/N2 2IR1RABmxtA4Iof4aUqJgodJ3KWqn9Flr99b1FsPejx+Y0v3iBR9+hNrr3geocvV81z6 JoH9h7hXdnteYnvu5CDiq+3hshta/EbLggBcfK9flxxiHTLEW4WN7JE5ELzmy98UFhnp 9D9LUAchI+ZekXtmuEgzf3Wu+Oo+ElGOE98jtYfLW9tFrcslsqjGZ+sRHt4rUbYZ0vu1 /xdHhl39A3MGLtZ/eJHLCjV4+P6FLr2bQlZ5j1QO2rWTsagPbwg1+YRZvnYdLUnERnHt qOSw== 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=/cByUu7D2wCnfz9pS+mrY29nV3uGI4hL9oLlRgEAduM=; b=HKwdRa2qRxUkGPeSwrqyKGJMVZNWlyjf1M1QV0iBBg7zJ9sV6gIyiNJhpEEY+hK2WM GjDQKvO7VN9Cb9utPBKPCwFIn2/7Osisewb9qFIqA8RG6EDgrmfLFTxqYv8OJV13vveQ M4Jnd3NxkAxLsmw2ESQT8YfTq0JZS3apMr5kUj7GUIOZ1MNCNr86Ek/ZCOwwh1xzX6W0 MA8Tct/aE904LzQ5/ObErvJ0tNF7xY+xam7nRqlRT9EMzqWDOifrhFMVM5FlMEv+LNsn 6rHk+DEH1orj1og27maasXZ1K5PifdO+a758FKc5WS3dweYjd9AaolGt3psnYIeb+/2U UAeA== X-Gm-Message-State: AIVw113Deobq6q2J09J5XcXiiroSG6pTOE296I2XloyujboiOcMQAmIi aMvELJFre+X745xOp4w= X-Received: by 10.98.49.67 with SMTP id x64mr12746567pfx.22.1499770132865; Tue, 11 Jul 2017 03:48:52 -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.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 11 Jul 2017 03:48:52 -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 1/7] platform/x86: fujitsu-laptop: constify attribute_group structures. Date: Tue, 11 Jul 2017 16:18:14 +0530 Message-Id: <1499770100-18632-2-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 7474 1205 24 8703 21ff drivers/platform/x86/fujitsu-laptop.o File size After adding 'const': text data bss dec hex filename 7538 1141 24 8703 21ff drivers/platform/x86/fujitsu-laptop.o Signed-off-by: Arvind Yadav Reviewed-by: Jonathan Woithe --- drivers/platform/x86/fujitsu-laptop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/platform/x86/fujitsu-laptop.c b/drivers/platform/x86/fujitsu-laptop.c index c1a8528..7973342 100644 --- a/drivers/platform/x86/fujitsu-laptop.c +++ b/drivers/platform/x86/fujitsu-laptop.c @@ -317,7 +317,7 @@ static ssize_t radios_show(struct device *dev, struct device_attribute *attr, NULL }; -static struct attribute_group fujitsu_pf_attribute_group = { +static const struct attribute_group fujitsu_pf_attribute_group = { .attrs = fujitsu_pf_attributes };