Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752000AbdHBW7v (ORCPT ); Wed, 2 Aug 2017 18:59:51 -0400 Received: from mail-qt0-f194.google.com ([209.85.216.194]:33488 "EHLO mail-qt0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751952AbdHBW7u (ORCPT ); Wed, 2 Aug 2017 18:59:50 -0400 Date: Wed, 2 Aug 2017 19:00:49 -0400 From: Amitoj Kaur Chawla To: linux-kernel@vger.kernel.org Subject: [PATCH] loop: constify attribute_group structure Message-ID: <20170802230049.GA29677@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: 1018 Lines: 34 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 27981 5489 480 33950 849e drivers/block/loop.o File size after: text data bss dec hex filename 28320 5421 480 34221 85ad drivers/block/loop.o This change was made with the help of Coccinelle. Signed-off-by: Amitoj Kaur Chawla --- drivers/block/loop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/block/loop.c b/drivers/block/loop.c index ef83349..a7f35a0 100644 --- a/drivers/block/loop.c +++ b/drivers/block/loop.c @@ -798,7 +798,7 @@ static struct attribute *loop_attrs[] = { NULL, }; -static struct attribute_group loop_attribute_group = { +static const struct attribute_group loop_attribute_group = { .name = "loop", .attrs= loop_attrs, }; -- 2.7.4