From patchwork Wed Jul 5 10:57: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: 9826335 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 8B21D60237 for ; Wed, 5 Jul 2017 10:57:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7BC3827F88 for ; Wed, 5 Jul 2017 10:57:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6DA2D283CF; Wed, 5 Jul 2017 10:57:21 +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 03A1927F88 for ; Wed, 5 Jul 2017 10:57:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752456AbdGEK5T (ORCPT ); Wed, 5 Jul 2017 06:57:19 -0400 Received: from mail-pf0-f195.google.com ([209.85.192.195]:34426 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751804AbdGEK5S (ORCPT ); Wed, 5 Jul 2017 06:57:18 -0400 Received: by mail-pf0-f195.google.com with SMTP id c24so20379433pfe.1; Wed, 05 Jul 2017 03:57:18 -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=GkoGvyw3J9VsRZAMIOagvYN4r9LqEjcVa46QBdykLUw=; b=W8a4uBRUnmIcp7w/TE1uWDlqCy0pCxPzDYY2KVThtpVTKPRAnhgC78y6XZawazoWvH Vhd8Si5J4CKYHMy9cXozq4ZptwsHQCYdt5JwbXKi5JoiB+J9ZmPx9GAKToNw4YQB8bt7 TVCzWNQxU7mbIQQ/orXNcXYLYlQRACozVljr/Alryt9G+1+YB+9BOjgSfjUIpchECC+X acHsvPou2C/aHgn8fkE415LBtjbaHU/UVOK5XoqnCyCjKGNs1VXCqxx8Rd4hok8M9rG7 04OmLkKSarD1UBQ6Zppzm5pUjeuaKyMdHK7ghFPRpJF3nTbHSnAbEoLynXrGz52Qvfv0 sBow== 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=GkoGvyw3J9VsRZAMIOagvYN4r9LqEjcVa46QBdykLUw=; b=CxaScV99E0zIpUFqp+ArtG7h6nIYZjAxaLjGnQecyZwaJpUHnJNKZO8X7IOEyKQfBo Ka56fVaNHHR1x5bNjPg/+oeZXQthOJR8otEq8+oA/i27wDamsrQT9T83yfNQlajqXwqT RR6a8UjchspbEit7T/s4oIODwNIZ+QahubZLsArcZbffa3N3y91/Wrr4JVqGFfWnFNcL MAKi5VyR/CagaVQ7VKefn0OBqaEZ18+Liypqq3Q3RdmIevaZ9aMzXzkyyHAFT2ctMrn9 MFWcLuGgXIfNfQQA4m4R1iKBi3oR0NzkknDa1VPcDBg/B4Bv0aH121p0Yihn1JJbDz0B fZqQ== X-Gm-Message-State: AIVw110TDNzcEwVOM3jT+2aFgS9LQC1Tbb5nutkfh6CQSvMCah1mHZw2 g7B7L9NsQmqv1vM/ X-Received: by 10.99.146.88 with SMTP id s24mr19995081pgn.85.1499252238040; Wed, 05 Jul 2017 03:57:18 -0700 (PDT) Received: from symbol-HP-Z420-Workstation.zebra.lan ([223.31.70.102]) by smtp.googlemail.com with ESMTPSA id v17sm64254614pgn.4.2017.07.05.03.57.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 05 Jul 2017 03:57:17 -0700 (PDT) From: Arvind Yadav To: dmitry.torokhov@gmail.com, benjamin.tissoires@redhat.com, linux@roeck-us.net Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] input: elantech: constify attribute_group structures. Date: Wed, 5 Jul 2017 16:27:00 +0530 Message-Id: <52e088c00d018502a9b6b7107486611602591a12.1499252216.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 16815 1424 0 18239 473f drivers/input/mouse/elantech.o File size After adding 'const': text data bss dec hex filename 16879 1360 0 18239 473f drivers/input/mouse/elantech.o Signed-off-by: Arvind Yadav --- drivers/input/mouse/elantech.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/input/mouse/elantech.c b/drivers/input/mouse/elantech.c index e73d968..b6fd752 100644 --- a/drivers/input/mouse/elantech.c +++ b/drivers/input/mouse/elantech.c @@ -1375,7 +1375,7 @@ static ssize_t elantech_set_int_attr(struct psmouse *psmouse, NULL }; -static struct attribute_group elantech_attr_group = { +static const struct attribute_group elantech_attr_group = { .attrs = elantech_attrs, };