From patchwork Wed Jul 5 10:34:54 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arvind Yadav X-Patchwork-Id: 9826297 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 89B33603B5 for ; Wed, 5 Jul 2017 10:35:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7AF82283C0 for ; Wed, 5 Jul 2017 10:35:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6E5D2283C9; Wed, 5 Jul 2017 10:35:14 +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 08EF9283C0 for ; Wed, 5 Jul 2017 10:35:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752370AbdGEKfM (ORCPT ); Wed, 5 Jul 2017 06:35:12 -0400 Received: from mail-pf0-f194.google.com ([209.85.192.194]:36044 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752345AbdGEKfM (ORCPT ); Wed, 5 Jul 2017 06:35:12 -0400 Received: by mail-pf0-f194.google.com with SMTP id z6so34886929pfk.3; Wed, 05 Jul 2017 03:35:11 -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=6qRM2WoRqm+lO8wM5CrHvTc1KVrdGJ1/UIoss4d23/I=; b=frrDmguQCEhC86Ngf3aWkpw7Jc7dxZXFKIdUj25b5kRXVMJ4QpMnvpn2RNxI9kAkzQ sdljdoxNo2bZC0de6gvZ3Tp0Az6UZaBD/fhVAuFiUyzucg5FeAKc2Fhzpu9fq9wvR7Vu +sGMLwTokyghXfiBhg+1tighP6Zwd9/VBruYL7heHV5wwUfAGRwxkpJLhoLMIckQ/k2Q ayIneG7nZuPWci/KwKpXUIsu+hxQTRzxLEyEVOKijxYWhbEfjgcwJiEQJGxeKTAJHIP+ 6c7HAUKhq5XiJVpAM40mjHx4pSq7c2uOyWAPks0TuVyWpyUqpigpMccoDjyNFiJpn07k dqBQ== 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=6qRM2WoRqm+lO8wM5CrHvTc1KVrdGJ1/UIoss4d23/I=; b=k9lA+iL0eGQ65w1fbVCIO1+kJ4bhGUbJTFqzVMU3kTXn13XW3uIh+oOjM4DG3lfvvi PbroLI7Avz7D5mhn1G2P4KxwI4vNlv/Vjt7t2POsP0zLOWuaXCFgYLVRzwvFQGS0xg2z YoY8VOSUiYr7TYM8x4lf4WWF05WJSJOVdhOCYUEJ+Fe63i3ygPI/a/2XPHoROswCWIB9 dhPH87FPiLWLNVY08Ez9AenGePYqmVdQFbgq+4kbRH8CxNY3FuvD8k2tiYhRFauZIHiG utctW2DZvyJEKn4KEp4PqwNG3y6jMOGNJL6C1Mwjnlx+H3G3WUTPJgC/4yGDVMpD8M0x iEqw== X-Gm-Message-State: AIVw1129gHmj5vJ+nA7D/KCW6WcdBQEa3vTx6nf3CUZH9ryuYN1YN5Dz +wtfm8cj0pTYUA== X-Received: by 10.98.194.141 with SMTP id w13mr12908705pfk.41.1499250911488; Wed, 05 Jul 2017 03:35:11 -0700 (PDT) Received: from symbol-HP-Z420-Workstation.zebra.lan ([223.31.70.102]) by smtp.googlemail.com with ESMTPSA id r62sm39080483pfl.45.2017.07.05.03.35.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 05 Jul 2017 03:35:10 -0700 (PDT) From: Arvind Yadav To: dmitry.torokhov@gmail.com Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] input: ims-pcu: Constify attribute_group structures. Date: Wed, 5 Jul 2017 16:04:54 +0530 Message-Id: <4d578e7696c17e4ae288707c723fbfb7a48e4ccb.1499250830.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 13547 1600 0 15147 3b2b drivers/input/misc/ims-pcu.o File size After adding 'const': text data bss dec hex filename 13675 1472 0 15147 3b2b drivers/input/misc/ims-pcu.o Signed-off-by: Arvind Yadav --- drivers/input/misc/ims-pcu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/input/misc/ims-pcu.c b/drivers/input/misc/ims-pcu.c index f4e8fbe..6bf82ea 100644 --- a/drivers/input/misc/ims-pcu.c +++ b/drivers/input/misc/ims-pcu.c @@ -1261,7 +1261,7 @@ static umode_t ims_pcu_is_attr_visible(struct kobject *kobj, return mode; } -static struct attribute_group ims_pcu_attr_group = { +static const struct attribute_group ims_pcu_attr_group = { .is_visible = ims_pcu_is_attr_visible, .attrs = ims_pcu_attrs, }; @@ -1480,7 +1480,7 @@ struct ims_pcu_ofn_bit_attribute ims_pcu_ofn_attr_##_field = { \ NULL }; -static struct attribute_group ims_pcu_ofn_attr_group = { +static const struct attribute_group ims_pcu_ofn_attr_group = { .name = "ofn", .attrs = ims_pcu_ofn_attrs, };