From patchwork Wed Jul 5 10:30:30 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arvind Yadav X-Patchwork-Id: 9826283 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 4A5A6603B5 for ; Wed, 5 Jul 2017 10:30:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3989D22376 for ; Wed, 5 Jul 2017 10:30:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2B222283B0; Wed, 5 Jul 2017 10:30:51 +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 C39F522376 for ; Wed, 5 Jul 2017 10:30:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751811AbdGEKat (ORCPT ); Wed, 5 Jul 2017 06:30:49 -0400 Received: from mail-pg0-f65.google.com ([74.125.83.65]:33791 "EHLO mail-pg0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751626AbdGEKat (ORCPT ); Wed, 5 Jul 2017 06:30:49 -0400 Received: by mail-pg0-f65.google.com with SMTP id u62so31232761pgb.0; Wed, 05 Jul 2017 03:30:48 -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=Zxu5BIRlaPrgf9y9Ov+gJMKsbt78q3OED1p3iFIQK+w=; b=WiAFjA669TeqqyUZ3+a/rTGyDRHxwF3tzOdoQjcvmF6iyWhZTsSDtD3zk32oBZvJAb 4alUor+SJRGjXIUhUNkCPP2W1eiEQ7jrF2md4WfuSEgR+3zRoezwRQPyiWiE49BahHYm spmC8cB2sh8Ygo8z4AU+TEplSpmmRUdK4HAALKGu4PQ3SyfVqkFBvEt+8VWnUtr79Jjn jlt7xYGjaQQ9kUzcKwRK68Y5Qs3Rl4A52Dt/TN6AGTk8fpZVkOKyxd63iLYVFbBKjTX/ QRvJ+whvk4eRABW2oCKqze2DZv+ab3BAw75PpHWWCe+pZnzD0umcxOmXHv859ZjjKNOS SM3w== 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=Zxu5BIRlaPrgf9y9Ov+gJMKsbt78q3OED1p3iFIQK+w=; b=A3o90npv/rrOL6ieie4iY6bgdLiIgHq7GO6t2VQa+gqt7bfvP1DEvvT423OvQu7eY0 TVGP4feWcq1uayn+Jj6NFngxrWiL+9xAn9ffgKj6k/BJdpYK7d/Z+1No3G7iUH2R0YZG 9j7LH0Tfh8yrGiZ+9TIhO1hC5R+JMDTnc8vV5dDZO6sFqvlDCBHsu72VUxG2cZH5TZ26 9u3YYAunTYR9qkXcwJ/K7VE7z4dQZMr8KlKu3nUIe73Sm1i2E5o6nyY8+kDHswFXGGfL VPb/XcTYIGpWcXxuNCI2Ffe4RX/0i6KpK239SfrpCprSn/xpNdrjxrz0wuvcZTJmann6 wIZg== X-Gm-Message-State: AIVw113fc4t6kEBBbnx83SumxHRdmQd4Je9ng5XaJqBiSkFD6fvoocmp BuzXjZeTHa3lCP/a X-Received: by 10.99.188.18 with SMTP id q18mr20277415pge.79.1499250648263; Wed, 05 Jul 2017 03:30:48 -0700 (PDT) Received: from symbol-HP-Z420-Workstation.zebra.lan ([223.31.70.102]) by smtp.googlemail.com with ESMTPSA id d89sm52680449pfl.7.2017.07.05.03.30.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 05 Jul 2017 03:30:47 -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 16:00:30 +0530 Message-Id: <910bd7f4f3001b8c1b3ad7d40eb6619c091b2b29.1499250565.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 4777 480 0 5257 1489 drivers/input/rmi4/rmi_f01.o File size After adding 'const': text data bss dec hex filename 4817 416 0 5233 1471 drivers/input/rmi4/rmi_f01.o Signed-off-by: Arvind Yadav --- drivers/input/rmi4/rmi_f01.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/input/rmi4/rmi_f01.c b/drivers/input/rmi4/rmi_f01.c index 7f7e917..aa1aabf 100644 --- a/drivers/input/rmi4/rmi_f01.c +++ b/drivers/input/rmi4/rmi_f01.c @@ -334,7 +334,7 @@ static ssize_t rmi_driver_package_id_show(struct device *dev, NULL }; -static struct attribute_group rmi_f01_attr_group = { +static const struct attribute_group rmi_f01_attr_group = { .attrs = rmi_f01_attrs, };