Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753556AbdF2TuW (ORCPT ); Thu, 29 Jun 2017 15:50:22 -0400 Received: from shards.monkeyblade.net ([184.105.139.130]:45234 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753500AbdF2TuK (ORCPT ); Thu, 29 Jun 2017 15:50:10 -0400 Date: Thu, 29 Jun 2017 15:50:04 -0400 (EDT) Message-Id: <20170629.155004.847683681702714728.davem@davemloft.net> To: arvind.yadav.cs@gmail.com Cc: stephen@networkplumber.org, bridge@lists.linux-foundation.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] net: bridge: constify attribute_group structures. From: David Miller In-Reply-To: References: X-Mailer: Mew version 6.7 on Emacs 24.5 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Thu, 29 Jun 2017 12:08:18 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 660 Lines: 18 From: Arvind Yadav Date: Thu, 29 Jun 2017 16:39:38 +0530 > 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 > 2645 896 0 3541 dd5 net/bridge/br_sysfs_br.o > > File size After adding 'const': > text data bss dec hex filename > 2701 832 0 3533 dcd net/bridge/br_sysfs_br.o > > Signed-off-by: Arvind Yadav Applied.