Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751573AbdGYWpJ (ORCPT ); Tue, 25 Jul 2017 18:45:09 -0400 Received: from mail-qt0-f194.google.com ([209.85.216.194]:35350 "EHLO mail-qt0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750768AbdGYWpI (ORCPT ); Tue, 25 Jul 2017 18:45:08 -0400 Date: Tue, 25 Jul 2017 18:45:52 -0400 From: Amitoj Kaur Chawla To: david.kershner@unisys.com, gregkh@linuxfoundation.org, sparmaintainer@unisys.com, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: [PATCH] staging: unisys: visorbus_main: constify attribute_group structures Message-ID: <20170725224552.GA3501@amitoj-Inspiron-3542> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1418 Lines: 45 Functions working with attribute_groups provided by work with const attribute_group. These attribute_group structures do not change at runtime so mark them as const. File size before: text data bss dec hex filename 14216 7304 832 22352 5750 drivers/staging/unisys/visorbus/visorbus_main.o File size after: text data bss dec hex filename 14408 7112 832 22352 5750 drivers/staging/unisys/visorbus/visorbus_main.o This change was made with the help of Coccinelle. Signed-off-by: Amitoj Kaur Chawla --- drivers/staging/unisys/visorbus/visorbus_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/unisys/visorbus/visorbus_main.c b/drivers/staging/unisys/visorbus/visorbus_main.c index 1c785dd..bba10dc 100644 --- a/drivers/staging/unisys/visorbus/visorbus_main.c +++ b/drivers/staging/unisys/visorbus/visorbus_main.c @@ -249,7 +249,7 @@ static struct attribute *channel_attrs[] = { NULL }; -static struct attribute_group channel_attr_grp = { +static const struct attribute_group channel_attr_grp = { .name = "channel", .attrs = channel_attrs, }; @@ -340,7 +340,7 @@ static struct attribute *dev_attrs[] = { NULL }; -static struct attribute_group dev_attr_grp = { +static const struct attribute_group dev_attr_grp = { .attrs = dev_attrs, }; -- 2.7.4