From patchwork Wed Jul 5 09:42:53 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arvind Yadav X-Patchwork-Id: 9826223 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 619E260317 for ; Wed, 5 Jul 2017 09:43:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 54310223B2 for ; Wed, 5 Jul 2017 09:43:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 482BA283C0; Wed, 5 Jul 2017 09:43:15 +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 E07AE223B2 for ; Wed, 5 Jul 2017 09:43:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751772AbdGEJnN (ORCPT ); Wed, 5 Jul 2017 05:43:13 -0400 Received: from mail-pg0-f66.google.com ([74.125.83.66]:34971 "EHLO mail-pg0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751626AbdGEJnM (ORCPT ); Wed, 5 Jul 2017 05:43:12 -0400 Received: by mail-pg0-f66.google.com with SMTP id d193so12657997pgc.2; Wed, 05 Jul 2017 02:43: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=qCUYzNBG5Q0+OKL4DlGGuB3tAe+uqiIGtL2tL3UPfb4=; b=IG+Tzcu59oxYfPV6bvmTOf9d7YS5vpilXr4+Iu3k5PJ8+pPiRL8bxK8x99L4XcJG4m iwkhfrVF9mLay7V359zqUkICUawwR0edfWOW/tfa6/uXyM47nVaaeAAEB2tWacEXruKG GCJNLfJfE4mnnKpXHDHLufVT7ChX83WT6Bd1NbgbBvaT+P0CBwV9hKWj2XZXwWqjAPmX 5kQU5tsnp6dDzQTrT1pFv8ZUIFPBlBwuES10mTuDs3h8ixlokgUM20RcuBrqUnut9zLo 6TjbEjR/AGeRTS1M7A/2KLHZUWijnRKySpweGGJx3aqvzrdi1mNbnY580WJIz+jZevoE gM0g== 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=qCUYzNBG5Q0+OKL4DlGGuB3tAe+uqiIGtL2tL3UPfb4=; b=iApXYJ62jsbn//xHqkMeNETGcAY6iaWxEJEUtMmbbDH3jGRheUmqfXJu9rIRSX+R+c iDC7P5qfzrb5S2OyO5gD+l3M+PBJ0+ObtKZT35w7w3vEE2WSVOPV6f7Azj00UD4lWcjc Rj9X3grqLnSEQN99LTc355z883TR7I32RHUHQCPRCYr2bT6HV4l/hMnrRFs7LJH9btje SqfT2M+hNns6Novatp+FxPgYqB2jiRlEICHlL93C+2LV2MfycaYHf5F3MsnYRbuVKVl+ DApflop5eylqX3ZJ3OaAlXSDpGt3SpnQyokXv9sMXAf0dSZ/ORYjbrI0NrkHUCBxY82s u9JA== X-Gm-Message-State: AIVw11160g3jtZiv/EPdlLRjTXT2/V0QYVYuthZllC91EvwCU6iJ8kw2 EdZD5rLE1UZMTpM5 X-Received: by 10.98.14.79 with SMTP id w76mr19177774pfi.72.1499247791411; Wed, 05 Jul 2017 02:43:11 -0700 (PDT) Received: from symbol-HP-Z420-Workstation.zebra.lan ([223.31.70.102]) by smtp.googlemail.com with ESMTPSA id i126sm48239963pgc.6.2017.07.05.02.43.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 05 Jul 2017 02:43:10 -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: serio: constify attribute_group structures. Date: Wed, 5 Jul 2017 15:12:53 +0530 Message-Id: <4448ab728b41d7e7648777cd90bcd3096da711bf.1499247619.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 6862 1008 4 7874 1ec2 drivers/input/serio/serio.o File size After adding 'const': text data bss dec hex filename 6990 880 4 7874 1ec2 drivers/input/serio/serio.o Signed-off-by: Arvind Yadav --- drivers/input/serio/serio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/input/serio/serio.c b/drivers/input/serio/serio.c index 30d6230..24a90c8 100644 --- a/drivers/input/serio/serio.c +++ b/drivers/input/serio/serio.c @@ -469,7 +469,7 @@ static ssize_t firmware_id_show(struct device *dev, struct device_attribute *att NULL }; -static struct attribute_group serio_id_attr_group = { +static const struct attribute_group serio_id_attr_group = { .name = "id", .attrs = serio_device_id_attrs, }; @@ -489,7 +489,7 @@ static ssize_t firmware_id_show(struct device *dev, struct device_attribute *att NULL }; -static struct attribute_group serio_device_attr_group = { +static const struct attribute_group serio_device_attr_group = { .attrs = serio_device_attrs, };