From patchwork Wed Jul 5 10:24:00 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arvind Yadav X-Patchwork-Id: 9826273 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 3B6B260317 for ; Wed, 5 Jul 2017 10:24:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2B3AD27F88 for ; Wed, 5 Jul 2017 10:24:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1EF3A28384; Wed, 5 Jul 2017 10:24:31 +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.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID 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 A996D27F88 for ; Wed, 5 Jul 2017 10:24:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751804AbdGEKY3 (ORCPT ); Wed, 5 Jul 2017 06:24:29 -0400 Received: from mail-pf0-f196.google.com ([209.85.192.196]:36402 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751696AbdGEKY2 (ORCPT ); Wed, 5 Jul 2017 06:24:28 -0400 Received: by mail-pf0-f196.google.com with SMTP id z6so34830633pfk.3; Wed, 05 Jul 2017 03:24:28 -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; bh=9+QmDwWM1aSxMujWXhg27SX9nWxaWFMF1UOof4iE9Vg=; b=MC3/NiVV/M0A+f/D1YEt6kBtK3tLCmfTiGpDdNHeO1qAZRjsa4E6CrX6tuFbP5XPbt vmpanPwJnBEo0+lbgFC1wJUtWbN3eGCH2jz0+OdEXQHWp4Qa7vT0wTiN504YrKBNWxpm XanhEogQYc9QBeI8iN1464U/dgXFWvjA0XvSQHUyrfrvwRyGMc8/lVqGO74bHGHznL2T uV3r6FMI+wMcSuWfqjlEOYG86LHFGX7iKIcYbmth2iPJC0azAjkTzJXHpJs7t+8Prii5 oiNdfQUVO0KQ/+YQf0itibDugmR8FvlVHsYe3NDN9VwRP3nRMZG3x70xIfFQf/fu3fQG R6rg== 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; bh=9+QmDwWM1aSxMujWXhg27SX9nWxaWFMF1UOof4iE9Vg=; b=rKn8Rx5W39gMAgVG7jjTxjvPHvOA00OmkFpsGnZKe/x2aBW6St6+E5R1U7VqonYEcu VquTXjPoY8+7YXe+hcVIZqrLEldJ1Br/VpGQn2W268hgLMahzv+bLAdweL5rAhvZ81PO zSzK3LNLcI9/bi9i2EWPlNHJ9WXH8hRoq1Y5IJu3IgOKEZZILRGvNXhyQ/Jiggrhsj7m OEjIxlDbECm26WQRwnGuw71uGSEk8tRryCQMIHS+aDQMEGK0+pZrt20UEJhXC4XQ2UJh 5aphPdA5CK4/+RxxNowAuCVC8bqSa9zDb5LcLJ/libj3750012ottXvGR6uW9ZuruaXp klDA== X-Gm-Message-State: AIVw113J8eE5amImHbqz7Fw6m/xzoFgUKTDFlIgrVTbMMz0ulV3Q18ZG QIIiRT4XQf2ZQ4mW X-Received: by 10.99.143.94 with SMTP id r30mr19944979pgn.102.1499250267924; Wed, 05 Jul 2017 03:24:27 -0700 (PDT) Received: from symbol-HP-Z420-Workstation.zebra.lan ([223.31.70.102]) by smtp.googlemail.com with ESMTPSA id 133sm19049072pgc.19.2017.07.05.03.24.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 05 Jul 2017 03:24:27 -0700 (PDT) From: Arvind Yadav To: dmitry.torokhov@gmail.com, benjamin.tissoires@redhat.com Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] input: synaptics-rmi4: constify attribute_group structures. Date: Wed, 5 Jul 2017 15:54:00 +0530 Message-Id: <83ad64e25236b6ecba3666c21f74f2fe196a0a39.1499250094.git.arvind.yadav.cs@gmail.com> X-Mailer: git-send-email 1.9.1 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@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 5287 448 0 5735 1667 drivers/input/rmi4/rmi_f34.o File size After adding 'const': text data bss dec hex filename 5339 384 0 5723 165b drivers/input/rmi4/rmi_f34.o Signed-off-by: Arvind Yadav --- drivers/input/rmi4/rmi_f34.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/input/rmi4/rmi_f34.c b/drivers/input/rmi4/rmi_f34.c index b8ee78e..4cfe970 100644 --- a/drivers/input/rmi4/rmi_f34.c +++ b/drivers/input/rmi4/rmi_f34.c @@ -516,7 +516,7 @@ static DEVICE_ATTR(update_fw_status, 0444, NULL }; -static struct attribute_group rmi_firmware_attr_group = { +static const struct attribute_group rmi_firmware_attr_group = { .attrs = rmi_firmware_attrs, };