From patchwork Wed Jul 5 11:01:45 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arvind Yadav X-Patchwork-Id: 9826339 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 A726860317 for ; Wed, 5 Jul 2017 11:02:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8FE43283C4 for ; Wed, 5 Jul 2017 11:02:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 848E9283D0; Wed, 5 Jul 2017 11:02:05 +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 1F097283C4 for ; Wed, 5 Jul 2017 11:02:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751772AbdGELCE (ORCPT ); Wed, 5 Jul 2017 07:02:04 -0400 Received: from mail-pg0-f68.google.com ([74.125.83.68]:36532 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751696AbdGELCD (ORCPT ); Wed, 5 Jul 2017 07:02:03 -0400 Received: by mail-pg0-f68.google.com with SMTP id u36so31337746pgn.3; Wed, 05 Jul 2017 04:02:03 -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=urtRha8kbGIbqEBScOsMAW8SCtnMbslFiWmbMBZIY4M=; b=ah2Bo76Dr0riHwk/8uwv5q2mUjyO4iMpJOfZOTc1vXKsLzfGzHMaMFmIJCXiCetaQd nu7tBYash+2ROdqJihSQu+8kaI22Q8fc8dAlvgtkO/oztgGCp34W6vUIWSI+FCGjIaRE W+m6po2JJbJgBLXV8lzv6HBpDGxyfSoz6NFFblpTr7zAx8bf9U6DHkUtQqVK+VMvI2o9 MvQKKFYh9NOZyjfmjCu6C8I3GpQMoQXQmcrJ/tE8cwf/TZlkgR8HKuq1kUXQg0SXGVQg Vf9g+MNchltKSazgqn4nPvJQ623HniFfFWvt6iqW4SRkLOXQDPNpOVFZXa9I+iRUNLQA N3dQ== 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=urtRha8kbGIbqEBScOsMAW8SCtnMbslFiWmbMBZIY4M=; b=jJ2O8B3Ee+6tfXN71kqZso9E4LvfKrBjhp2mxXMJqjdmuXpb+keDnTE/EBsWykZq5e nCLzGMKfy7xeVxwog7vurVP8tD+rDrceywkr6xhmLV7VN6jRIbXFz1WzazWgBP9PQpx1 aLndFiuhjVmWXnJE9MfggjIP39Sfy41C4dAQD28XaYyL6bpIT2yOmrOgtmY687YL7u3m 6vlzkyRyZlOxV9e9pTkUbQyqJezAURB1syg81MlXBg9tTqtxHN4Ox9MTyerxTI0rfuFF x2dqLqb4h8D7PBZfmuAsRNrr4yzMwnuojlJPr3wTYPDhzQ31Gujks18p5tHK+mK+hqS7 q9HQ== X-Gm-Message-State: AIVw111vGPVbha/yl1BWrvtW0gj5V3/U4mweTBHweUnEXBoq+TT41A+Z meG+ACFdRgve7A== X-Received: by 10.84.172.131 with SMTP id n3mr21454630plb.14.1499252522567; Wed, 05 Jul 2017 04:02:02 -0700 (PDT) Received: from symbol-HP-Z420-Workstation.zebra.lan ([223.31.70.102]) by smtp.googlemail.com with ESMTPSA id 191sm3697644pfb.70.2017.07.05.04.02.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 05 Jul 2017 04:02:02 -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: psmouse: constify attribute_group structures. Date: Wed, 5 Jul 2017 16:31:45 +0530 Message-Id: <76743bb6b9b654259c6d40deec4515395be85478.1499252427.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 12850 740 12 13602 3522 drivers/input/mouse/psmouse-base.o File size After adding 'const': text data bss dec hex filename 12914 676 12 13602 3522 drivers/input/mouse/psmouse-base.o Signed-off-by: Arvind Yadav --- drivers/input/mouse/psmouse-base.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/input/mouse/psmouse-base.c b/drivers/input/mouse/psmouse-base.c index f73b47b..6a5649e 100644 --- a/drivers/input/mouse/psmouse-base.c +++ b/drivers/input/mouse/psmouse-base.c @@ -101,7 +101,7 @@ NULL }; -static struct attribute_group psmouse_attribute_group = { +static const struct attribute_group psmouse_attribute_group = { .attrs = psmouse_attributes, };